-
Notifications
You must be signed in to change notification settings - Fork 169
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-146001 parallelize literals call #2187
Conversation
|
libs/blocks/merch/merch.js
Outdated
@@ -3,7 +3,13 @@ import { | |||
} from '../../utils/utils.js'; | |||
import { replaceKey } from '../../features/placeholders.js'; | |||
|
|||
export const PRICE_LITERALS_URL = 'https://milo.adobe.com/libs/commerce/price-literals.json'; | |||
if (!window.commerce) window.commerce = {}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I would like to avoid introducing a namespace like window.commerce
.
here the promise can be set on the fonction
similar to fetchEntitlements.promise
effectively becomes a module scoped data.
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. |
@npeltier, for the record, can you add the tacocat PR in the ticket description. |
@npeltier these changes are failing all Nala tests. Lets please connect and check the cause |
@npeltier - I'm seeing the extra DNS calls because the price literals are served from milo.adobe.com. I think there was a similar limitation with the Global Navigation placeholders and we managed to fix it. Would you be interested in updating the code and improve performance? cc @mokimo , @overmyheadandbody , @robert-bogos , @yesil |
We moved our placeholders from the milo sharepoint, to the federal one. We shouldn't make any prod requests to |
@mokimo @narcis-radu is there an onboarding documentation :) ? (cc @yesil ) |
i think that is it, will do a copy & update code here :) |
@npeltier - thanks! If you're updating the path as part of this PR, please make sure to update the JIRA ticket as well. Otherwise, I can create a new ticket for you if you want to treat it as a separate enhancement. |
@npeltier I created a ticket to write some docs. TL:DR; creating something under
You could use any of the origins, and/or www.adobe.com as fallback - just make sure to publish the sheet so it's available on |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Cool, awesome to see a new home for the price literals
i added it here. We still have a more "active" file i copied there too for now, i created https://jira.corp.adobe.com/browse/MWPW-147239 for that matter. Thanks to both of you guys! i'm just a few UT fixes away now :-] |
* Update code owners for feds (#2194) Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> * Harden preflight link checking (#2169) * Filter out empty `hrefs` before sending to spidy. * Harden link check to be more robust against Spidy API. * Update link check language. * Better onboarding support. * Adds fallbacks if `.milo/config` has not been added. * Fix for missing Word doc reference, under general tab. Resolves: [MWPW-146695](https://jira.corp.adobe.com/browse/MWPW-146695) Co-authored-by: Ryan Clayton <rclayton@adobe.com> * MWPW-146755: RTL merch icon padding (#2162) * RTL padding merch icon * dep update * MWPW-146001 parallelize literals call (#2187) * MWPW-146001 parallelize literals call * MWPW-146001 move promise to the function * MWPW-146001 fix commerce library * MWPW-146001 update literals endpoint * MWPW-146001 fixing commerce ut --------- Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com>
* actions scroller center & section grid center * update scroller test to cover all code branches * update test mock to avoid nav test * put back sticky and center styles * [Release] Stage to Main (#2208) * Update code owners for feds (#2194) Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> * Harden preflight link checking (#2169) * Filter out empty `hrefs` before sending to spidy. * Harden link check to be more robust against Spidy API. * Update link check language. * Better onboarding support. * Adds fallbacks if `.milo/config` has not been added. * Fix for missing Word doc reference, under general tab. Resolves: [MWPW-146695](https://jira.corp.adobe.com/browse/MWPW-146695) Co-authored-by: Ryan Clayton <rclayton@adobe.com> * MWPW-146755: RTL merch icon padding (#2162) * RTL padding merch icon * dep update * MWPW-146001 parallelize literals call (#2187) * MWPW-146001 parallelize literals call * MWPW-146001 move promise to the function * MWPW-146001 fix commerce library * MWPW-146001 update literals endpoint * MWPW-146001 fixing commerce ut --------- Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com> --------- Co-authored-by: Ruchika Sinha <69535463+Ruchika4@users.noreply.github.com> Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com>
* actions scroller center & section grid center * update scroller test to cover all code branches * update test mock to avoid nav test * put back sticky and center styles * [Release] Stage to Main (adobecom#2208) * Update code owners for feds (adobecom#2194) Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> * Harden preflight link checking (adobecom#2169) * Filter out empty `hrefs` before sending to spidy. * Harden link check to be more robust against Spidy API. * Update link check language. * Better onboarding support. * Adds fallbacks if `.milo/config` has not been added. * Fix for missing Word doc reference, under general tab. Resolves: [MWPW-146695](https://jira.corp.adobe.com/browse/MWPW-146695) Co-authored-by: Ryan Clayton <rclayton@adobe.com> * MWPW-146755: RTL merch icon padding (adobecom#2162) * RTL padding merch icon * dep update * MWPW-146001 parallelize literals call (adobecom#2187) * MWPW-146001 parallelize literals call * MWPW-146001 move promise to the function * MWPW-146001 fix commerce library * MWPW-146001 update literals endpoint * MWPW-146001 fixing commerce ut --------- Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com> --------- Co-authored-by: Ruchika Sinha <69535463+Ruchika4@users.noreply.github.com> Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com>
* MWPW-146001 parallelize literals call * MWPW-146001 move promise to the function * MWPW-146001 fix commerce library * MWPW-146001 update literals endpoint * MWPW-146001 fixing commerce ut
* actions scroller center & section grid center * update scroller test to cover all code branches * update test mock to avoid nav test * put back sticky and center styles * [Release] Stage to Main (adobecom#2208) * Update code owners for feds (adobecom#2194) Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> * Harden preflight link checking (adobecom#2169) * Filter out empty `hrefs` before sending to spidy. * Harden link check to be more robust against Spidy API. * Update link check language. * Better onboarding support. * Adds fallbacks if `.milo/config` has not been added. * Fix for missing Word doc reference, under general tab. Resolves: [MWPW-146695](https://jira.corp.adobe.com/browse/MWPW-146695) Co-authored-by: Ryan Clayton <rclayton@adobe.com> * MWPW-146755: RTL merch icon padding (adobecom#2162) * RTL padding merch icon * dep update * MWPW-146001 parallelize literals call (adobecom#2187) * MWPW-146001 parallelize literals call * MWPW-146001 move promise to the function * MWPW-146001 fix commerce library * MWPW-146001 update literals endpoint * MWPW-146001 fixing commerce ut --------- Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com> --------- Co-authored-by: Ruchika Sinha <69535463+Ruchika4@users.noreply.github.com> Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com>
* actions scroller center & section grid center * update scroller test to cover all code branches * update test mock to avoid nav test * put back sticky and center styles * [Release] Stage to Main (adobecom#2208) * Update code owners for feds (adobecom#2194) Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> * Harden preflight link checking (adobecom#2169) * Filter out empty `hrefs` before sending to spidy. * Harden link check to be more robust against Spidy API. * Update link check language. * Better onboarding support. * Adds fallbacks if `.milo/config` has not been added. * Fix for missing Word doc reference, under general tab. Resolves: [MWPW-146695](https://jira.corp.adobe.com/browse/MWPW-146695) Co-authored-by: Ryan Clayton <rclayton@adobe.com> * MWPW-146755: RTL merch icon padding (adobecom#2162) * RTL padding merch icon * dep update * MWPW-146001 parallelize literals call (adobecom#2187) * MWPW-146001 parallelize literals call * MWPW-146001 move promise to the function * MWPW-146001 fix commerce library * MWPW-146001 update literals endpoint * MWPW-146001 fixing commerce ut --------- Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com> --------- Co-authored-by: Ruchika Sinha <69535463+Ruchika4@users.noreply.github.com> Co-authored-by: Narcis Radu <github@narcisradu.ro> Co-authored-by: Blaine Gunn <Blainegunn@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Ryan Clayton <rgclayton@gmail.com> Co-authored-by: Ryan Clayton <rclayton@adobe.com> Co-authored-by: Axel Cureno Basurto <axelcureno@gmail.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com>
Before
After
Resolves: MWPW-146001
Test URLs:
Before: https://main--milo--adobecom.hlx.page/fr/drafts/npeltier/plans-card?martech=off
After: https://mwpw-146001--milo--npeltier.hlx.page/fr/drafts/npeltier/plans-card?martech=off
Before: https://main--cc--adobecom.hlx.live/products/substance3d/apps/designer?martech=off
After: https://main--cc--adobecom.hlx.live/products/substance3d/apps/designer?milolibs=mwpw-146001--milo--npeltier&martech=off
https://git.corp.adobe.com/wcms/tacocat.js/pull/570
https://git.corp.adobe.com/wcms/tacocat.js/pull/573