-
Notifications
You must be signed in to change notification settings - Fork 180
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-162495] : Temporary fix to handle the extra <p> generated in HTML from Helix #3412
base: stage
Are you sure you want to change the base?
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## stage #3412 +/- ##
==========================================
+ Coverage 96.53% 98.39% +1.86%
==========================================
Files 274 79 -195
Lines 61849 10149 -51700
==========================================
- Hits 59705 9986 -49719
+ Misses 2144 163 -1981 ☔ View full report in Codecov by Sentry. |
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. |
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'm not loving the change, I'd rather find a way to get the Helix fix merged in. Could we get someone from Experience League to check the Helix fix? Can we get someone from the Helix team to look at this?
Approving, since this currently seems like the lesser of evlis, but it's definitely not ideal.
libs/blocks/merch-card/merch-card.js
Outdated
@@ -451,6 +451,20 @@ const addStartingAt = async (styles, merchCard) => { | |||
|
|||
export default async function init(el) { | |||
if (!el.querySelector(INNER_ELEMENTS_SELECTOR)) return el; | |||
// TODO: Remove after bugfix PR adobe/helix-html2md#556 is merged | |||
const liELs = el.querySelector('ul')?.querySelectorAll('li'); |
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.
Couldn't you use el.querySelectorAll('ul li')
directly?
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.
Pushed the code change, please review
libs/blocks/brick/brick.js
Outdated
const pElements = liEl.querySelectorAll('p'); | ||
pElements.forEach((pElement) => { |
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.
Nit: no need to cache in here
const pElements = liEl.querySelectorAll('p'); | |
pElements.forEach((pElement) => { | |
liEl.querySelectorAll('p').forEach((pElement) => { |
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.
Pushed the code change, please review
libs/blocks/merch-card/merch-card.js
Outdated
const pElements = liEl.querySelectorAll('p'); | ||
pElements.forEach((pElement) => { |
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.
Nit: same as the comment from brick.js
const pElements = liEl.querySelectorAll('p'); | |
pElements.forEach((pElement) => { | |
liEl.querySelectorAll('p').forEach((pElement) => { |
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.
Pushed the code change, please review
Agree to this 100%. We were not keen on making the change from our end since this is too hacky and unnecessary code change in the blocks. The Helix PR getting merged will be the best approach to solve the issue. |
Yeah, we should not merge this for now and observe adobe/helix-html2md#556 - but get this fix in place for when we absolutely need to merge it. So approvals & sign-offs form QA, but hold off on merging. |
@sharmeeatadobe - thank you for providing the temporary fix. As you, @overmyheadandbody and @mokimo suggested, we should only merge this if it's absolutely necessary. Let's get it properly tested, @ancy28sr , @SilviuLCF though. |
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.
Requesting changes to block the automated workflow. See thread for details.
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
Not stale. |
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
Not stale, however we should rebase to stage and ensure the branch is green from the unit tests / nala tests |
87b0dd1
to
92a3aa1
Compare
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
This PR has not been updated recently and will be closed in 7 days if no action is taken. Please ensure all checks are passing, https://github.com/orgs/adobecom/discussions/997 provides instructions. If the PR is ready to be merged, please mark it with the "Ready for Stage" label. |
Closing this PR due to inactivity. |
<p>
generated in HTML from HelixResolves: Multiple
Aside block
MWPW-162806
Test URLs:
Brick block
MWPW-162495
Test URLs:
Merch-card and Merch-offer-select
MWPW-162799
Test URLs: