-
Notifications
You must be signed in to change notification settings - Fork 191
MWPW-162398 enable mas preview #4148
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
Conversation
adobecom#3357) Revert "MWPW-140452 - Icon authoring in milo using the federal repo and individual SVG assets (adobecom#3259)" This reverts commit 81a5770.
MWPW-165774 [Mobile-GNAV] page is not scrollable in live page (adobecom#3495) * check for new nav when disabling ios scroll * shortened the check from the previous commit Co-authored-by: Raghav Sharma <118168183+sharmrj@users.noreply.github.com>
@@ -273,6 +279,16 @@ export class AemFragment extends HTMLElement { | |||
{ fields: {}, id, tags, settings }, | |||
); | |||
} | |||
|
|||
async generatePreview() { | |||
const { previewFragment } = await import('https://mas.adobe.com/studio/libs/fragment-client.js'); |
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.
Thanks @npeltier for explaining the concept, I'm good now :)
@@ -16,6 +17,8 @@ import { | |||
|
|||
import { toQuantity } from './utilities.js'; | |||
|
|||
const PREVIEW_REGISTERED_SURFACE = { 'wcms-commerce-ims-ro.+': 'acom', 'CreativeCloud_.+': 'ccd', "CCHome.+": 'adobe-home' }; |
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.
can we make this logic automatic? This is going to increase consumer onboarding effort where we need to make a PR there for future consumers.
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 see a regression in the merch-addon, can you confirm if this is ok?
https://main--milo--npeltier.aem.page/drafts/ilyas/mas/merch-card
https://mwpw-162398--milo--npeltier.aem.page/drafts/ilyas/mas/merch-card (updated)
@yesil assuming you are talking about https://mwpw-162398--milo--npeltier.aem.page/drafts/ilyas/mas/merch-card ;-)
looks better now |
…obecom#4195) Revert "Improve carousel accessibility (adobecom#4103)" This reverts commit 34d2016.
| `lana-tags` | Enables logging via lana[^1][^2] with the given tags. e.g:`ccd`. | | `false` | | ||
| `lana-sample-rate` | Sets the sampling rate, see [^1] for details. | 1 | `false` | | ||
| `language` | language of the price literal, e.g: per license | en or locale language if set | `false` | | ||
| `preview` | enable preview (will only work on corp network), can be overriden with parameter `mas.preview=off` | false / off | `false` | |
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.
lets add also possible values to description:
enable preview (will only work on corp network), can be overriden with parameter mas.preview=off
to enable preview, set it to 'on' or provide surface, e.g.
preview="on"
or
preview="acom"
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.
no, you can't override promotions anymore, will add "on/true" even anything but "off/false" works
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 see, thx, i updated PR description to reflect
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.
approving, however a few thoughts:
- since we can't cover this with Nala we could add a unit test for aem-fragment change, mocking fragment-client.js library
- M@S gallery pages could potentially have same logic, aem.page -> preview="on", aem.live -> preview="off". We would need to make sure nala tests go to aem.live only.
| `lana-tags` | Enables logging via lana[^1][^2] with the given tags. e.g:`ccd`. | | `false` | | ||
| `lana-sample-rate` | Sets the sampling rate, see [^1] for details. | 1 | `false` | | ||
| `language` | language of the price literal, e.g: per license | en or locale language if set | `false` | | ||
| `preview` | enable preview (will only work on corp network), can be overriden with parameter `mas.preview=off` | false / off | `false` | |
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 see, thx, i updated PR description to reflect
libs/features/mas/docs/ccd.html
Outdated
@@ -29,7 +29,7 @@ <h1 id="ccd-gallery" tabindex="-1">CCD Gallery <a class="header-anchor" href="#c | |||
<p>Switch country/language: <a class="locale-toggle spectrum-Link spectrum-Link--secondary" value="US,en" href="?country=US&language=en">Country: US, language: en</a> OR <a class="locale-toggle spectrum-Link spectrum-Link--secondary" value="FR,fr" href="?country=FR&language=fr">Country: FR, language: fr</a></p> | |||
<h2 id="ccd-slice-card" tabindex="-1">CCD Slice Cards <a class="header-anchor" href="#ccd-slice-card" title="Permalink to this heading">#</a></h2> | |||
<div class="three-merch-cards ccd-slice"> | |||
<merch-card><aem-fragment fragment="0ef2a804-e788-4959-abb8-b4d96a18b0ef"></aem-fragment></merch-card> | |||
<merch-card><aem-fragment fragment="0ef2a804-e788-4959-abb8-b4d96a18b0ef" preview="true"></aem-fragment></merch-card> |
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.
this is not needed, right?
it('overrides correctly preview surface configuration from parameter mas.preview', () => { | ||
const config = { commerce: {}, preview: '' }; | ||
window.sessionStorage.setItem('wcsApiKey', 'user-test'); | ||
window.sessionStorage.setItem('mas.preview', 'nala'); |
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.
not a valid use-case afaik?
Error merging 4148: MWPW-162398 enable mas preview Pull Request is not mergeable |
1 similar comment
Error merging 4148: MWPW-162398 enable mas preview Pull Request is not mergeable |
* [MWPW-173100][NALA] Automation test script for Timeline block (adobecom#4301) Update nala automation tests for timeline * Fixing replace check for Gnav test url (adobecom#4333) Fixing replace check for test url * MWPW-170229: Show action scroller nav on resize (adobecom#4311) * MWPW-170229: Show action scroller nav on resize * MWPW-170229: Debounce scroll and resize events * [MWPW-173161] - Refactor preflight to export checks (adobecom#4109) * MWPW-170805 initial refactoring of seo checks. * MWPW-170805 update the links method to cache its result * MWPW-170805 allow for document to be passed * update preflight * update performance checks * update assets checks * don't pass url if not necessary to assets * cache image result * import mini-preflight in utils * hotfix - seo title typos * hotfixes * hotfix * hotfix * Removed unnecessary comments * fixed linter errors * removed old performance panel unit tests * Mwpw 170378 preflight assets unit test (adobecom#4131) * added unit tests for assets tab in preflight * fixed linting * centralized checks imports * added unit tests --------- Co-authored-by: Victor Hargrave <vhargrave@adobe.com> Co-authored-by: Sino Kholkhojaev <132879006+skholkhojaev@users.noreply.github.com> * MWPW-162398 enable mas preview (adobecom#4148) * Revert "MWPW-140452 - Icon authoring in milo using the federal repo a… (adobecom#3357) Revert "MWPW-140452 - Icon authoring in milo using the federal repo and individual SVG assets (adobecom#3259)" This reverts commit 81a5770. * [Release] Stage to Main (adobecom#3497) MWPW-165774 [Mobile-GNAV] page is not scrollable in live page (adobecom#3495) * check for new nav when disabling ios scroll * shortened the check from the previous commit Co-authored-by: Raghav Sharma <118168183+sharmrj@users.noreply.github.com> * [Release] Stage to Main (adobecom#3817) * ENB-7820: Add values for event95 (adobecom#3782) * Add values for event95 * Fix failing test case * Remove spaces * Minimal Impact: Add extra key for other features * Minimal Impact: change function name * [MWPW-168691] - Aside cta shrink JP (adobecom#3785) * [MWPW-168691] cta shrink fix * [MWPW-168691] update * [MWPW-168691] update * [MWPW-168691] update * [MWPW-168691] update * [MWPW-168691] update * [MWPW-168691] update * [MWPW-168691] update * [MWPW-168691] updated solution * Revert "[MWPW-168691]" This reverts commit a70f9ca. Revert "[MWPW-168691] update" This reverts commit 6aac2bc. Revert "[MWPW-168691] update" This reverts commit c0c6a34. Revert "[MWPW-168691] update" This reverts commit 017edf0. Revert "[MWPW-168691] update" This reverts commit 219e5fd. Revert "[MWPW-168691] update" This reverts commit a7df2b5. Revert "[MWPW-168691] update" This reverts commit 299a7d7. Revert "[MWPW-168691] update" This reverts commit 6709515. Revert "[MWPW-168691] cta shrink fix" This reverts commit c90eea6. * MWPW-168691: Prevent cta jp word wrap on large screens * MWPW-168691: Fix notification jp cta * MWPW-168691: Hide wbr cta for tablet and desktop --------- Co-authored-by: Ratko Zagorac <ratkozagorac@gmail.com> * MWPW-169371 : Adding countryCode config to UNav (adobecom#3793) * Adding countryCode config to UNav * Updating countryCode for uk * Updating for upperCase * Passing countryCode according to MAS mapping for UCv3 cart --------- Co-authored-by: Snehal Sonawane <sonawane@snehals-mbp.corp.adobe.com> Co-authored-by: Snehal Sonawane <sonawane@Snehals-MacBook-Pro.local> * MWPW-167716 Remove await from both gnav and georouting (adobecom#3680) Made georouting and globalnavigation non blocking * Lnav title and headline text overflow support (adobecom#3781) * Lnav title text overflow support * Fix for chevron icon top position * Adding white space break for localnav menus * Adding white space break for localnav menus * Adding white space break for localnav list menus * Inclufing white spaces to non menu items * [MWPW-169500] SEO- Links check failing breaks Preflight (adobecom#3803) fixed preflight seo links check * MWPW-169732 Fetch resources from adobe.com/federal instead of https://main--federal--adobecom.aem.live/federal (adobecom#3813) * on prod federal content for the standalone gnav and footer needs to come from * handled situations where we're stage and when we're neither stage nor prod * MWPW-169416 [MEP] stop treating remove action differently in preview (adobecom#3789) * truly remove elements, even in preview * unit test update * fix for MWPW-169416, new remove action in MEP * lint clean-up --------- Co-authored-by: John Pratt <jpratt@adobe.com> --------- Co-authored-by: Swati Mukherjee <swati020494@gmail.com> Co-authored-by: Dušan Kosanović <dusan.kosanovic@hitthecode.com> Co-authored-by: Ratko Zagorac <ratkozagorac@gmail.com> Co-authored-by: sonawanesnehal3 <152426902+sonawanesnehal3@users.noreply.github.com> Co-authored-by: Snehal Sonawane <sonawane@snehals-mbp.corp.adobe.com> Co-authored-by: Snehal Sonawane <sonawane@Snehals-MacBook-Pro.local> Co-authored-by: Raghav Sharma <118168183+sharmrj@users.noreply.github.com> Co-authored-by: Bandana Laishram <bandanalaishram@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Vivian A Goodrich <101133187+vgoodric@users.noreply.github.com> Co-authored-by: John Pratt <jpratt@adobe.com> * MWPW-167191 Removed an unnecessary css url() that was causing a console error (adobecom#3824) MWPW-167191 Removed an unnecessary css url() that was causing a console error (adobecom#3630) * updated an svg inside a url() in the globalnav css to have data:image/svg+xml;utf8 inorder to prevent a console error * changed a ; to a , * Removed the svg as it was unnecessary Co-authored-by: Raghav Sharma <118168183+sharmrj@users.noreply.github.com> * MWPW-162398 draft * MWPW-162398 enable mas preview - getSettings will consider preview attribute of mas-commerce-service presence as the fact it should be using preview, - if preview is on, then using mas' previewFragment client library to act like adobeio, but on browser, - surface used (for stuff like placeholders) is either computed depending on wcs api key, or coming from preview parameter value, - is url is .page, or www.stage, then preview is set by default, - preview configuration can be overriden with masPreview parameter (url or local storage) set to off for disabling, or a value to use another surface (if api key is not corresponding to a registered surface) * some fixes * some other fixes * some doc and changes * small fixes * Reduce gnav lana sampleRate to 0.01% (adobecom#4150) * review comment * Revert "Improve carousel accessibility (adobecom#4103)" from prod (adobecom#4195) Revert "Improve carousel accessibility (adobecom#4103)" This reverts commit 34d2016. * some fixes * review comments --------- Co-authored-by: milo-pr-merge[bot] <169241390+milo-pr-merge[bot]@users.noreply.github.com> Co-authored-by: Okan Sahin <39759830+mokimo@users.noreply.github.com> Co-authored-by: Raghav Sharma <118168183+sharmrj@users.noreply.github.com> Co-authored-by: Swati Mukherjee <swati020494@gmail.com> Co-authored-by: Dušan Kosanović <dusan.kosanovic@hitthecode.com> Co-authored-by: Ratko Zagorac <ratkozagorac@gmail.com> Co-authored-by: sonawanesnehal3 <152426902+sonawanesnehal3@users.noreply.github.com> Co-authored-by: Snehal Sonawane <sonawane@snehals-mbp.corp.adobe.com> Co-authored-by: Snehal Sonawane <sonawane@Snehals-MacBook-Pro.local> Co-authored-by: Bandana Laishram <bandanalaishram@gmail.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Vivian A Goodrich <101133187+vgoodric@users.noreply.github.com> Co-authored-by: John Pratt <jpratt@adobe.com> Co-authored-by: Chris Peyer <chrischrischris@users.noreply.github.com> * MWPW-171672: Copy to clipboard for checkout CTAs (adobecom#4171) * added copying to clipboard * lint fix * moved to a separate module * used getMetadata * added a tooltip * fixed brackets * added ClipboardItem * updated tests * replaced the icon * updated unit test * MWPW-172886 [MEP][MILO] Dynamic content on RFI page via referrer | MEP (adobecom#4273) * first commit * Enhance path normalization to include localhost and simplify previous page match logic * Refactor checkForPreviousPageMatch to accept referrer as a parameter and add comprehensive tests * Remove commented suggestion for error handling * Refactor checkForPreviousPageMatch to use lastVisitedPage parameter for improved clarity * Exposing close gnav function for clients (adobecom#4274) * Exposing close gnav function for clients * Lint fix * Add a check if the gnav is in open state before calling toggle * MWPW-173759: Unordered list styling for merch cards (adobecom#4298) * MWPW-173759: Unordered list styling for merch cards * style specificity fix * [MWPW-173502] Remove hash from how-to schema (adobecom#4299) * [MWPW-174367] Inline fragment not behaving as expected in block (adobecom#4317) * Initial checkin. Working state. * Move replacecell handling to utils from fragments * Fix: Replace hardcoded string with constant for replacecell handling * Refactor: Replace constant OVERRIDE_AUTO_INLINE with inline string in modal handling * Unit testing. * Unit testing. * Removed unnecessary test statement. --------- Co-authored-by: Vivian A Goodrich <vgoodric@adobe.com> * MWPW-172018 Update default price for CIS umbrella regions to TM (adobecom#4323) Co-authored-by: Bozo Jovicic <bozo@hitthecode.com> * MWPW-173830: Add tooltip to notification pill (adobecom#4295) * MWPW-173830: Add tooltip to notification pill * MWPW-173830: PR feedback and add checks * MWPW-173528 Fix Safari mobile preview (adobecom#4231) * MWPW-173528 Fix Safari mobile preview Safari requires that the spoofed user agent be set on the load event and not before that. * Show the currently selected device view * Remove flicker when switching between devices * Fix CodeQL Incomplete URL substring sanitization --------- Co-authored-by: Biljana Cvijanovic <hit11757@adobe.com> Co-authored-by: Bandana Laishram <bandanalaishram@gmail.com> Co-authored-by: Ratko Zagorac <90400759+zagi25@users.noreply.github.com> Co-authored-by: Robert Bogos <146744221+robert-bogos@users.noreply.github.com> Co-authored-by: Victor Hargrave <vhargrave@adobe.com> Co-authored-by: Nicolas Peltier <1032754+npeltier@users.noreply.github.com> Co-authored-by: milo-pr-merge[bot] <169241390+milo-pr-merge[bot]@users.noreply.github.com> Co-authored-by: Okan Sahin <39759830+mokimo@users.noreply.github.com> Co-authored-by: Raghav Sharma <118168183+sharmrj@users.noreply.github.com> Co-authored-by: Swati Mukherjee <swati020494@gmail.com> Co-authored-by: Dušan Kosanović <dusan.kosanovic@hitthecode.com> Co-authored-by: Ratko Zagorac <ratkozagorac@gmail.com> Co-authored-by: sonawanesnehal3 <152426902+sonawanesnehal3@users.noreply.github.com> Co-authored-by: Snehal Sonawane <sonawane@snehals-mbp.corp.adobe.com> Co-authored-by: Snehal Sonawane <sonawane@Snehals-MacBook-Pro.local> Co-authored-by: Vivian A Goodrich <101133187+vgoodric@users.noreply.github.com> Co-authored-by: John Pratt <jpratt@adobe.com> Co-authored-by: Chris Peyer <chrischrischris@users.noreply.github.com> Co-authored-by: Mira Fedas <30750556+mirafedas@users.noreply.github.com> Co-authored-by: Jan Ivan Viloria <158211769+ivanvatadobe@users.noreply.github.com> Co-authored-by: Angelo Statescu <angelostatescu.adobe@gmail.com> Co-authored-by: Rares Munteanu <overmyheadandbody@gmail.com> Co-authored-by: Dave Linhart <132396886+AdobeLinhart@users.noreply.github.com> Co-authored-by: Vivian A Goodrich <vgoodric@adobe.com> Co-authored-by: Bozo Jovicic <37440641+bozojovicic@users.noreply.github.com> Co-authored-by: Bozo Jovicic <bozo@hitthecode.com>
www.stage
, then preview is set by default,Resolves: MWPW-162398

Test URLs: