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

[MWPW-159905] - Add config for full width and no border along with jarvis fix for standalone GNAV #3020

Merged
merged 12 commits into from
Oct 22, 2024

Conversation

Deva309
Copy link
Contributor

@Deva309 Deva309 commented Oct 8, 2024

Things covered as part of this PR:

  1. Add config as layout for supporting full width in Standalone GNAV.
  2. Add config for noBorder for removing border for adobe home.
  3. Relative url href removal added for custom Links
  4. Add Jarvis call for standalone GNAV

Resolves:
MWPW-159905
MWPW-160508

Test URLs:

QA:

Copy link
Contributor

aem-code-sync bot commented Oct 8, 2024

Page Scores Audits Google
📱 /?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI
🖥️ /?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

Copy link

codecov bot commented Oct 8, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.41%. Comparing base (1bdfd4a) to head (5477bc7).
Report is 23 commits behind head on stage.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #3020      +/-   ##
==========================================
+ Coverage   96.34%   96.41%   +0.07%     
==========================================
  Files         243      243              
  Lines       55284    55475     +191     
==========================================
+ Hits        53261    53485     +224     
+ Misses       2023     1990      -33     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@@ -4,7 +4,7 @@ const blockConfig = [
name: 'global-navigation',
targetEl: 'header',
appendType: 'prepend',
params: ['imsClientId', 'searchEnabled', 'unav', 'customLinks', 'jarvis'],
params: ['imsClientId', 'searchEnabled', 'unav', 'customLinks', 'jarvis', 'layout'],
Copy link
Contributor

Choose a reason for hiding this comment

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

You don't need to pass the param layout since it is not used in the block code through milo configs.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done removed from params.

const { getConfig, createTag, loadLink, loadScript } = await import(`${miloLibs}/utils/utils.js`);
const { default: initBlock } = await import(`${miloLibs}/blocks/${name}/${name}.js`);

const styles = [`${miloLibs}/blocks/${name}/${name}.css`, `${miloLibs}/navigation/navigation.css`];
styles.forEach((url) => loadLink(url, { rel: 'stylesheet' }));

const setNavLayout = () => {
const element = document.querySelector(targetEl);
if (element && layout === 'fullWidth') {
Copy link
Contributor

Choose a reason for hiding this comment

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

The element will always exist, so I believe we can skip the element check here.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

yes correct, removed element check condition.

Copy link
Contributor

Reminder to set the Ready for Stage label - to queue this to get merged to stage & production.

@Deva309 Deva309 changed the title [MWPW-159905] - Add config for full width Standalone GNAV [MWPW-159905] - Add config for full width and no border along with jarvis fix for standalone GNAV Oct 21, 2024
@milo-pr-merge milo-pr-merge bot merged commit 63ff041 into adobecom:stage Oct 22, 2024
18 checks passed
@milo-pr-merge milo-pr-merge bot mentioned this pull request Oct 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for Stage verified PR has been E2E tested by a reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

6 participants