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-151517] - Remove condition for promobar hidden on mobile from gnav #2538

Merged
merged 18 commits into from
Jul 29, 2024

Conversation

Deva309
Copy link
Contributor

@Deva309 Deva309 commented Jul 4, 2024

Description

Removed the condition that hides the gnav promobar on mobile. We now have the ability to set separate copies for each viewport. The acceptance criteria to on and off the promobar only for mobile comes with a CLS issue, so it is not part of this PR, as discussed with the PDMs.
For example:
Screenshot 2024-07-16 at 10 30 54 AM

To avoid CLS impact, we need to adhere to the character count limits specified in the design specs for the feds promo bar, also mentioned in the ticket. Additionally, this information has been included in the authoring documentation for the aside promo bar.
Screenshot 2024-07-04 at 10 29 25 AM

Resolves:

Test URLs:

Copy link

codecov bot commented Jul 4, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.70%. Comparing base (c0395ae) to head (a2d8d53).
Report is 4 commits behind head on stage.

Additional details and impacted files
@@           Coverage Diff           @@
##            stage    #2538   +/-   ##
=======================================
  Coverage   95.69%   95.70%           
=======================================
  Files         172      172           
  Lines       45359    45359           
=======================================
+ Hits        43406    43409    +3     
+ Misses       1953     1950    -3     

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

libs/styles/styles.css Outdated Show resolved Hide resolved
Copy link
Contributor

aem-code-sync bot commented Jul 8, 2024

Page Scores Audits Google
/drafts/devashish/promo-bar/feds-promobar?martech=off PERFORMANCE A11Y SEO BEST PRACTICES SI FCP LCP TBT CLS PSI

@@ -4,7 +4,7 @@
--global-height-nav: 64px;
--global-height-breadcrumbs: 33px;
/* stylelint-disable-next-line custom-property-pattern */
--global-height-navPromo: 65px;
--global-height-navPromo: 72px;
Copy link
Contributor

@mokimo mokimo Jul 8, 2024

Choose a reason for hiding this comment

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

Have there been any considerations regarding the two-line, 80px use-case utilizing a min-height here? To me it seems like that use-case would lead to CLS currently. (Suggested CLS Strategy within the design specs)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

According to the design specifications, the goal is to ensure that the feds promobar displays as a single line on all viewports. This character count limit is also included in the authoring documentation, following the design specifications.
So, with that we can ignore the case of two-line copy.

Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed it spawns on two lines between 1200 and 1270px

Copy link
Contributor

Choose a reason for hiding this comment

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

@narcis-radu is right, the Promo spans two rows between 1200 and 1287px. Either the copy needs to be adapted or some styles.

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes. Based on discussions with Joel Blytt the character count limit in design specs will be updated so that promobar displays on single line for this range also.

Copy link
Contributor

github-actions bot commented Jul 9, 2024

This pull request is not passing all required checks. Please see this discussion for information on how to get all checks passing. Inconsistent checks can be manually retried. If a test absolutely can not pass for a good reason, please add a comment with an explanation to the PR.

@Deva309 Deva309 requested a review from mokimo July 9, 2024 05:26
promoMeta.remove();
});

it('Exist on mobile', async () => {
Copy link
Contributor

Choose a reason for hiding this comment

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

I think we could have more descriptive test names that tell the reader when the promobar should or should not exist on mobile, i.e. when we have content for mobile

@mokimo
Copy link
Contributor

mokimo commented Jul 9, 2024

Let's wait for the consonant/design sign-off on the ticket before merging this. From what I've seen, once you got a branch ready - you send that over on the Jira, have them sign off and then raise the PR. @ryanmparrish would that be the correct flow involving any (design) changes for blocks?

@spadmasa spadmasa added verified PR has been E2E tested by a reviewer and removed verified PR has been E2E tested by a reviewer labels Jul 10, 2024
@prativas22
Copy link

Validated the promobar functionality in Devices and observed that after enabling the promobar for the device, the Gnav does not show up on both the iPhone and the iPad. For Gnav, the iPhone does not display the Hamberg symbol.

Note: Android device is working as expected

URL:
https://mwpw-151517-promobar--milo--deva309.hlx.page/drafts/prativa/aside-promo-bar

iphone device: (both safari and chrome browser have same result)
Safari browser:
image
landscape orientation: no Gnav
image
iPad Device:
Safari
image

In iPad landscape orientation, the gnav displays as expected:
image

A JIRA ticket has been created to track the details. Refer to https://jira.corp.adobe.com/browse/MWPW-154090 for further details. Validation would be done after the bug fix.

@salonijain3 @sigadamvenkata

@spadmasa spadmasa added the do not merge PR should not be merged yet label Jul 10, 2024
@mokimo
Copy link
Contributor

mokimo commented Jul 12, 2024

@Deva309 there seems to be design feedback on the Ticket

@milo-pr-merge
Copy link
Contributor

milo-pr-merge bot commented Jul 18, 2024

Error merging 2538: [MWPW-151517] - Remove condition for promobar hidden on mobile from gnav Base branch was modified. Review and try the merge again.

@milo-pr-merge
Copy link
Contributor

milo-pr-merge bot commented Jul 18, 2024

Error merging 2538: [MWPW-151517] - Remove condition for promobar hidden on mobile from gnav 1 review requesting changes and 3 approving reviews by reviewers with write access.

@narcis-radu
Copy link
Contributor

To avoid CLS impact, we need to adhere to the character count limits specified in the design specs for the feds promo bar, also mentioned in the ticket

@Deva309 - I see that between 1200px and 1270px the promo bar content is displayed on two rows
Screenshot 2024-07-19 at 11 25 42

@@ -571,6 +570,11 @@ header.global-navigation {
overflow: auto;
}

.global-navigation.has-promo .feds-navItem--megaMenu .feds-popup {
max-height: calc(100vh - 100% - var(--global-height-navPromo));
box-sizing: border-box;
Copy link
Contributor

Choose a reason for hiding this comment

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

Most of the elements in the global navigation are context-box and this might generate some confusion when setting padding

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@narcis-radu Yes, but this case involves the megamenu, where scrolling is necessary if its height and width exceed the screen dimensions. To address this, we calculate the height for the megamenu and add a scroll. However, due to content-box, it only sets the scroll for the content area, but we need scrolling for both the content and the surrounding spacing. I've now moved it closer to overflow:auto, which is only required for the scroll functionality.

Copy link
Contributor

Choose a reason for hiding this comment

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

We already have scrolling functionality on Production and the box-sizing is content-box, don't we ?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this was needed to compensate the 40px padding which was not included in height and the bottom-most link in the large menu was getting cut off from the scrolling.
image

@@ -4,7 +4,7 @@
--global-height-nav: 64px;
--global-height-breadcrumbs: 33px;
/* stylelint-disable-next-line custom-property-pattern */
--global-height-navPromo: 65px;
--global-height-navPromo: 72px;
Copy link
Contributor

Choose a reason for hiding this comment

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

I noticed it spawns on two lines between 1200 and 1270px

@spadmasa spadmasa added needs-verification PR requires E2E testing by a reviewer and removed verified PR has been E2E tested by a reviewer Ready for Stage labels Jul 19, 2024
@prativas22
Copy link

@Deva309
Copy link
Contributor Author

Deva309 commented Jul 19, 2024

To avoid CLS impact, we need to adhere to the character count limits specified in the design specs for the feds promo bar, also mentioned in the ticket

@Deva309 - I see that between 1200px and 1270px the promo bar content is displayed on two rows Screenshot 2024-07-19 at 11 25 42

@narcis-radu
Yes, I missed this range. I will check with the PMs to see if the range of 1200px to 1286px, where the content for the feds promobar wraps to two lines, applies to any widely used devices. If it does, we will need to update the character count limit.

@Deva309 Deva309 requested a review from narcis-radu July 19, 2024 12:02
Copy link
Contributor

@overmyheadandbody overmyheadandbody left a comment

Choose a reason for hiding this comment

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

The flex-wrap declaration should be revisited, as it has the potential to affect a large number of production pages.

@@ -702,5 +706,6 @@ header.global-navigation {

.feds-navItem--megaMenu .feds-popup {
align-items: center;
flex-wrap: wrap;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why is this needed? Is it desirable to have columns span on multiple rows in certain scenarios? Doesn't this interfere with the feds-crossCloudMenu-wrapper element, since it's also inside the popup? This is how this tweak affects the current Photoshop page:
Screenshot 2024-07-23 at 15 39 27

Since this doesn't seem to be related to the promo, it might be good to remove this.

Copy link
Contributor

Choose a reason for hiding this comment

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

This was added to fix one of the issues where the left side of the large menu gets cut from left side (1200-1300px range). I'll remove this due to above issue and as its unrelated to promobar change. We will log a separate bug for this.

Screenshot 2024-07-24 at 12 47 44 PM

Copy link
Contributor

Choose a reason for hiding this comment

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

5 columns have never been supported in the dropdown. The initial Consonant guidelines (which I can't locate currently due to how many changes they had on their platform 😅 ) stated that a maximum of 4 columns should be added in a dropdown menu.

@@ -4,7 +4,7 @@
--global-height-nav: 64px;
--global-height-breadcrumbs: 33px;
/* stylelint-disable-next-line custom-property-pattern */
--global-height-navPromo: 65px;
--global-height-navPromo: 72px;
Copy link
Contributor

Choose a reason for hiding this comment

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

@narcis-radu is right, the Promo spans two rows between 1200 and 1287px. Either the copy needs to be adapted or some styles.

@@ -569,6 +568,11 @@ header.global-navigation {
padding: 40px 0 0;
max-height: calc(100vh - 100%);
overflow: auto;
box-sizing: border-box;
Copy link
Contributor

Choose a reason for hiding this comment

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

I don't see any box-size model properties adapted to justify this change. Why is it needed?

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this was needed to compensate the 40px padding which was not included in height and the bottom-most link in the large menu was getting cut off from the scrolling as shown.

Screenshot 2024-07-24 at 1 29 19 PM

@mokimo mokimo self-requested a review July 24, 2024 16:54
Copy link
Contributor

@overmyheadandbody overmyheadandbody left a comment

Choose a reason for hiding this comment

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

Thanks for making the changes!

@spadmasa spadmasa added verified PR has been E2E tested by a reviewer Ready for Stage and removed needs-verification PR requires E2E testing by a reviewer labels Jul 26, 2024
@milo-pr-merge milo-pr-merge bot merged commit 386f817 into adobecom:stage Jul 29, 2024
21 checks passed
@milo-pr-merge milo-pr-merge bot mentioned this pull request Jul 29, 2024
rohitsahu pushed a commit to rohitsahu/milo that referenced this pull request Jul 29, 2024
* stage:
  MWPW-150557 - Split Marquee CLS issues on consuming sites (adobecom#2636)
  Mwpw 147034: Custom border color + badge/border color decoupling [merch card] (adobecom#2613)
  [MWPW-151517] - Remove condition for promobar hidden on mobile from gnav (adobecom#2538)

# Conflicts:
#	libs/deps/merch-card.js
rohitsahu pushed a commit to rohitsahu/milo that referenced this pull request Jul 30, 2024
* stage:
  [MWPW-153611] [Gray Box] environment aware links (adobecom#2622)
  MWPW-153580: Add Opt-In Feature for CaaS Badge Display (adobecom#2625)
  [MWPW-154335] [callout] Spacing issue encountered when the call-out section is added (adobecom#2628)
  MWPW-150557 - Split Marquee CLS issues on consuming sites (adobecom#2636)
  Mwpw 147034: Custom border color + badge/border color decoupling [merch card] (adobecom#2613)
  [MWPW-151517] - Remove condition for promobar hidden on mobile from gnav (adobecom#2538)
  MWPW-154998 [MEP][MILO] Manifests do not execute in the right order when there is a disabled manifest (adobecom#2632)
  mwpw-154965: Fetch federal stage content from hlx.page instead of stage.adobe.com (adobecom#2618)
  Correct error messages for duplicate files on the stage to main workflow (adobecom#2621)
  MWPW-153245 [merch][analytics] dispatch wcomp events, and let default lh (adobecom#2610)
  Revert "MWPW-146528[MILO][MEP][ANALYTICS] Add attribute to content changed by Target for analytics and MWPW-152274" (adobecom#2627)
  MWPW-128600 Locale Tool: Langstore points to langstore/en (adobecom#2615)
  Fix for errors in dynamically loaded scripts in test cases (adobecom#2619)
  MWPW-146528[MILO][MEP][ANALYTICS] Add attribute to content changed by Target for analytics and MWPW-152274 (adobecom#2593)
  Bootstrapper script for milo feds blocks (adobecom#2560)
  Revert "[MWPW-152968] mWeb - Passing ECID to Branch.io banner - Implementation" (adobecom#2612)

# Conflicts:
#	libs/deps/merch-card.js
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.

9 participants