-
Notifications
You must be signed in to change notification settings - Fork 174
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-157540: fix external modals #2806
Conversation
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
|
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stage #2806 +/- ##
=======================================
Coverage 95.89% 95.89%
=======================================
Files 173 173
Lines 45889 45889
=======================================
Hits 44005 44005
Misses 1884 1884 ☔ View full report in Codecov by Sentry. |
https://www.adobe.com/plans-fragments/modals/individual/modals-content-rich/all-apps/master.modal.html is not a valid url for the feature. It was only developed for TWP and D2P modals and tested against where miniplans page URLs were used. |
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.
Discussed with @3ch023 and looks good to me.
@@ -374,7 +374,7 @@ export async function openModal(e, url, offerType) { | |||
if (/\/fragments\//.test(url)) { | |||
const fragmentPath = url.split(/hlx.(page|live)/).pop(); | |||
modal = await openFragmentModal(fragmentPath, getModal); | |||
} else if (/^https?:/.test(url)) { |
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 rather try /^(https:/)?\//
? this way it's either https (original requirement) or relative path?
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 can, but what is the point of such validation?
if author will put an invalid URL with or without validation the modal will just not show up, so I am not sure what it brings
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.
ok if we neither wants https://... URLs i'm fine thought relative paths were an option
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.
lgtm (thought originally there was something to forbid http:// & relative paths)
Looks good to me too. Have checked it also together with @3ch023 and added the verified label. |
Go live 4th September blocker.
Fix external modals on catalog.
checkoutLinkConfig[columnName] is an external CRM modal
https://www.adobe.com/plans-fragments/modals/individual/modals-content-rich/all-apps/master.modal.html
that gets localized and becomes '/plans-fragments/modals/individual/modals-content-rich/all-apps/master.modal.html'
that doesn't pass regex later on on openModal
} else if (/^https?:/.test(url)) {
Resolves: https://jira.corp.adobe.com/browse/MWPW-157540
Test URLs: