Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Header bottom nav #90

Closed
wants to merge 5 commits into from
Closed

Header bottom nav #90

wants to merge 5 commits into from

Conversation

hparwani2
Copy link

@hparwani2 hparwani2 commented Oct 3, 2023

Please always provide the GitHub issue(s) your PR is for, as well as test URLs where your change can be observed (before and after):

Fixes #39

Test URLs:

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 3, 2023

Hello, I'm the AEM Code Sync Bot and I will run some test suites that validate the page speed.
In case there are problems, just click the checkbox below to rerun the respective action.

  • Re-run PSI Checks

@aem-code-sync
Copy link

aem-code-sync bot commented Oct 3, 2023

Page Scores Audits Google
/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Copy link

@bosschaert bosschaert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Since nav-tree-utils.js seems like a re-usable library, it would be good to add some unit tests for it...

blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
@@ -281,22 +105,26 @@ export default async function decorate(block) {
const navMeta = getMetadata('nav');
const navPath = navMeta || (getLanguage() === 'en' ? '/_drafts/himanshu/nav' : `/${getLanguage()}/nav`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

'/_drafts/himanshu/nav' ? 😉

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it before merge

@JiangLong2019
Copy link

Hey @hparwani2, I'd like to review this but not exactly sure which function you implemented. Is it about changing hero images by mouseover?

blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.js Show resolved Hide resolved
@@ -281,22 +105,26 @@ export default async function decorate(block) {
const navMeta = getMetadata('nav');
const navPath = navMeta || (getLanguage() === 'en' ? '/_drafts/himanshu/nav' : `/${getLanguage()}/nav`);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove it before merge

scripts/nav-tree-utils.js Outdated Show resolved Hide resolved
scripts/nav-tree-utils.js Outdated Show resolved Hide resolved
position: unset;
}

/* stylelint-disable-next-line no-descending-specificity */

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

why eslint rule disable here ?

blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
blocks/header/header.css Outdated Show resolved Hide resolved
@aem-code-sync
Copy link

aem-code-sync bot commented Oct 4, 2023

Page Scores Audits Google
/ PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@github-actions
Copy link

github-actions bot commented Oct 4, 2023

🔸 4 visual differences detected

  • /career/yuya-yoshisue (main vs branch)
    Expected an image 1280px by 3441px, received 1280px by 3981px. 3026854 pixels (ratio 0.60 of all image pixels) are different.
  • /sidekick/blocks/hero (main vs branch)
    Expected an image 1441px by 4004px, received 1441px by 4052px.
  • /sidekick/blocks/carousel (main vs branch)
    Expected an image 1280px by 1306px, received 1280px by 1354px. 146329 pixels (ratio 0.09 of all image pixels) are different.
  • /sidekick/blocks/career-apply (main vs branch)
    40960 pixels (ratio 0.05 of all image pixels) are different.

The diff images are attached in the artifact

@hparwani2
Copy link
Author

Hey @hparwani2, I'd like to review this but not exactly sure which function you implemented. Is it about changing hero images by mouseover?

@JiangLong2019 I have created the bottom nav of the header or cateogoryTree of header. please refer the below screenshot.

Screenshot 2023-10-04 at 6 50 32 PM

@@ -0,0 +1,84 @@
import { createOptimizedPicture } from './lib-franklin.js';
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please consider moving this file under blocks/header if that's the only place its used.

header .mega-container .left-content-container .main-item-summary a h2 .icon.angle-right {
background-image: url('../../icons/angle-white-70.svg');
height: 24px;
width: 15px;
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

1rem=default browser font size (usually 16px)

if (children) {
const picture = createOptimizedPicture(data.image, '', false, [{ width: '800' }]);
li = htmlToElement(`<li class="drop menu-level-${level}-item">
<a class="link" href=${data.link}>${data.category}</a>
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The data.link here and everywhere should be governed by the page domain. For e.g. hlx.live should have links with hlx.live domain and similarly for preview and prod domains.

@sdmcraft sdmcraft added this to the Milestone-3 milestone Oct 5, 2023
@JiangLong2019
Copy link

  1. When mouseovers the link and overlap menu shows up, the other area is marked gray in the original site.
image
  1. The link does not open a new window in the original site.
image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

subtask-3: add bottom nav
5 participants