8000 Move federal code to utils by mokimo · Pull Request #3591 · adobecom/milo · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

Move federal code to utils #3591

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

Merged
merged 3 commits into from
Feb 21, 2025
Merged

Move federal code to utils #3591

merged 3 commits into from
Feb 21, 2025

Conversation

mokimo
Copy link
Contributor
@mokimo mokimo commented Jan 30, 2025

Description

The due the growing usage of the federal project and thus the federated.js file - we should move the code to the milo core utils as it has became a core feature.

This should provide performance benefits as this can currently lead to being a render blocking request where certain key features such as decorate.js require to load federated.js before the LCP.

Screenshot 2025-01-30 at 12 26 42

Implications

We seem to have one deep import adobecom/dme-partners · edsdme/blocks/partners-navigation/utilities/utilities.js based on a quick search...

We will need to keep the federated.js file around to avoid breaking changes.

Resolves: MWPW-166847

Test URLs:

Copy link
Contributor
aem-code-sync bot commented Jan 30, 2025
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 Jan 30, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 96.49%. Comparing base (fca2718) to head (89bf1e9).
Report is 38 commits behind head on stage.

Additional details and impacted files
@@            Coverage Diff             @@
##            stage    #3591      +/-   ##
==========================================
+ Coverage   96.47%   96.49%   +0.02%     
==========================================
  Files         260      259       -1     
  Lines       60826    60840      +14     
==========================================
+ Hits        58684    58710      +26     
+ Misses       2142     2130      -12     

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

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.

A couple of curiosities

Copy link
Contributor
@vhargrave vhargrave left a comment

Choose a reason for hiding this comment

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

looks very good and clever execution on the deprecated federated.js file.
@mokimo Could you potentially create a ticket for the Yugo team though to stop importing this deprecated file so we can properly delete it?
Here's one of their tickets that I found if you want to clone - https://jira.corp.adobe.com/browse/MWPW-165786

@narcis-radu
Copy link
Contributor

@salonijain3 , @bandana147 , @sharmrj - it would be great to get your point of view as well

return fedsPlaceholderConfig;
};
import { getFederatedContentRoot, getFederatedUrl, getFedsPlaceholderConfig } from './utils.js';
// DO NOT USE THIS FILE, THIS IS HERE FOR HISTORY PURPOSES AND AVOIDING BREAKING CHANGES.
Copy link
Contributor

Choose a reason for hiding this comment

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

It might be worth having a console.warn() here to let any stray users know that they should no longer be importing this file. Maybe we could put a date on removing it entirely.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I thought about it, however we only have one consumer which I created a ticket for. I dislike console.warn since it would end up on the end-users device as well. Not much harm if its only when someone checks the dev-tools, but nothing that we should have on prod either though

Copy link
Contributor
github-actions bot commented Feb 4, 2025

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

Copy link
@SilviuLCF SilviuLCF left a comment

Choose a reason for hiding this comment

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

@milo-pr-merge
Copy link
Contributor
milo-pr-merge bot commented Feb 6, 2025

Skipped 3591: "Move federal code to utils" due to file "libs/blocks/global-navigation/global-navigation.js" overlap. Merging will be attempted in the next batch

@milo-pr-merge
Copy link
Contributor
milo-pr-merge bot commented Feb 7, 2025

Skipped 3591: "Move federal code to utils" due to file "libs/blocks/global-footer/global-footer.js" overlap. Merging will be attempted in the next batch

@milo-pr-merge
Copy link
Contributor
milo-pr-merge bot commented Feb 11, 2025

Skipped 3591: "Move federal code to utils" due to file "libs/blocks/global-navigation/global-navigation.js" overlap. Merging will be attempted in the next batch

@milo-pr-merge
Copy link
Contributor
milo-pr-merge bot commented Feb 13, 2025

Skipped 3591: "Move federal code to utils" due to file "libs/blocks/global-navigation/utilities/utilities.js" overlap. Merging will be attempted in the next batch

@milo-pr-merge
Copy link
Contributor
milo-pr-merge bot commented Feb 18, 2025

Skipped 3591: "Move federal code to utils" due to file "libs/blocks/global-footer/global-footer.js" overlap. Merging will be attempted in the next batch

@milo-pr-merge
Copy link
Contributor
milo-pr-merge bot commented Feb 19, 2025

Skipped 3591: "Move federal code to utils" due to file "libs/blocks/global-navigation/global-navigation.js" overlap. Merging will be attempted in the next batch

@milo-pr-merge
Copy link
Contributor
milo-pr-merge bot commented Feb 20, 2025

Skipped merging 3591: Move federal code to utils due to failing or running checks

@mokimo mokimo merged commit 60ccc33 into adobecom:stage Feb 21, 2025
12 checks passed
@mokimo mokimo mentioned this pull request Feb 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants
0