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 157587 | [Geo-Routing][Page Performance] Removing the georouting modal background image #2891

Merged
merged 9 commits into from
Sep 18, 2024

Conversation

aishwaryamathuria
Copy link
Contributor

@aishwaryamathuria aishwaryamathuria commented Sep 17, 2024

In Current Milo pages with low contrast background image in LCP (https://www.adobe.com/products/photoshop.html) or having smaller subject image in LCP the georouting modal is getting tagged as LCP.
Browser keeps looking for LCP till user interacts with the page and hence once Geo Modal comes up in such cases the modal gets tagged increasing the LCP count and impacting the page performance.
As per the latest design decision update in the ticket https://jira.corp.adobe.com/browse/MWPW-157587 opening this PR to remove the georouting image from the modal for all Milo pages.

Resolves: MWPW-157587

Test URLs:

@aishwaryamathuria aishwaryamathuria requested a review from a team as a code owner September 17, 2024 06:39
Copy link
Contributor

aem-code-sync bot commented Sep 17, 2024

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run PSI checks
  • Re-sync branch
Commits

Copy link
Contributor

aem-code-sync bot commented Sep 17, 2024

Copy link

codecov bot commented Sep 17, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.24%. Comparing base (840e037) to head (65a40a2).
Report is 7 commits behind head on stage.

Additional details and impacted files
@@           Coverage Diff           @@
##            stage    #2891   +/-   ##
=======================================
  Coverage   96.23%   96.24%           
=======================================
  Files         237      236    -1     
  Lines       54242    54200   -42     
=======================================
- Hits        52198    52163   -35     
+ Misses       2044     2037    -7     

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

@aishwaryamathuria aishwaryamathuria added needs-verification PR requires E2E testing by a reviewer run-nala Run Nala Test Automation against PR labels Sep 17, 2024
@spadmasa spadmasa self-assigned this Sep 17, 2024
@mokimo
Copy link
Contributor

mokimo commented Sep 17, 2024

@aishwaryamathuria do we still need any of https://github.com/adobecom/milo/tree/stage/libs/features/georoutingv2/img ? The background images sound like they can be removed as well

@@ -140,19 +136,6 @@
padding: initial;
}

@media (min-width: 480px) {
.dialog-modal.locale-modal-v2 {
background-image: url('/libs/features/georoutingv2/img/GeoModal_BG_Map_Tablet.png');
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to remove the image from assets

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 I have removed this image from repo


@media (min-width: 1200px) {
.dialog-modal.locale-modal-v2 {
background-image: url('/libs/features/georoutingv2/img/GeoModal_BG_Map_Desktop.png');
Copy link
Contributor

Choose a reason for hiding this comment

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

we need to remove the image from assets

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 I have removed this image from repo

@narcis-radu
Copy link
Contributor

@aishwaryamathuria - let's remove the images if they aren't used anymore. Thank you!

@aishwaryamathuria
Copy link
Contributor Author

aishwaryamathuria commented Sep 17, 2024

@narcis-radu @robert-bogos @mokimo
I have removed the 3 png images.. Could you please review?
globe-grid.png is referred for fallback routing.. Could you confirmed if it is enabled anywhere or it can be removed as well?
CC: @salonijain3

svgDiv = createTag('div', { class: 'georouting-bg' }, getMobileBg());
}
const georoutingWrapper = createTag('div', { class: 'georouting-wrapper fragment', style: 'display:none;' }, svgDiv);
const georoutingWrapper = createTag('div', { class: 'georouting-wrapper fragment', style: 'display:none;' });
Copy link
Contributor

Choose a reason for hiding this comment

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

Unrelated to this PR, but I see the display declaration is being kept and overridden by CSS with !important. Does this need to stay like this? Could we use a modifier class instead of adding the style via JS? Could we remove the style attribute at a later point? It's just a bit confusing to see
Screenshot 2024-09-17 at 16 36 05

Copy link
Contributor Author

Choose a reason for hiding this comment

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

@overmyheadandbody This would currently be required as the getDetails function that fetches and adds the modal to the DOM is called before showModal that fetches the georoutingv2.css and till that time the modal needs to be hidden. We would either need to add this as class to a different css file that gets loaded before and then apply this class here.
We can probably explore this as a part of a different PR? Could you share your thoughts on the same?

@narcis-radu @mokimo @robert-bogos Could you share your inputs on the same?

Copy link
Contributor

This PR is currently in the needs-verification state. Please assign a QA engineer to verify 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 Sep 18, 2024
@milo-pr-merge milo-pr-merge bot merged commit dbc56a7 into stage Sep 18, 2024
23 checks passed
@milo-pr-merge milo-pr-merge bot deleted the MWPW-157587 branch September 18, 2024 09:16
@milo-pr-merge milo-pr-merge bot mentioned this pull request Sep 18, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Ready for Stage run-nala Run Nala Test Automation against PR verified PR has been E2E tested by a reviewer
Projects
None yet
Development

Successfully merging this pull request may close these issues.

10 participants