Skip to content
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

Open
wants to merge 9 commits into
base: stage
Choose a base branch
from

Conversation

Copy link

codecov bot commented Jan 2, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.39%. Comparing base (cf4c08b) to head (92a3aa1).
Report is 83 commits behind head on stage.

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.
📢 Have feedback on the report? Share it here.

Copy link
Contributor

github-actions bot commented Jan 3, 2025

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.

@sharmeeatadobe sharmeeatadobe changed the title [MWPW-162495][MWPW-162495] : Temporary fix to handle the extra <p> generated in HTML from Helix [MWPW-162495] : Temporary fix to handle the extra <p> generated in HTML from Helix Jan 8, 2025
@sharmeeatadobe sharmeeatadobe requested a review from a team as a code owner January 8, 2025 11:50
@sharmeeatadobe sharmeeatadobe requested a review from a team January 9, 2025 04:38
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.

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.

@@ -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');
Copy link
Contributor

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?

Copy link
Contributor Author

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

Comment on lines 90 to 91
const pElements = liEl.querySelectorAll('p');
pElements.forEach((pElement) => {
Copy link
Contributor

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

Suggested change
const pElements = liEl.querySelectorAll('p');
pElements.forEach((pElement) => {
liEl.querySelectorAll('p').forEach((pElement) => {

Copy link
Contributor Author

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

Comment on lines 458 to 459
const pElements = liEl.querySelectorAll('p');
pElements.forEach((pElement) => {
Copy link
Contributor

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

Suggested change
const pElements = liEl.querySelectorAll('p');
pElements.forEach((pElement) => {
liEl.querySelectorAll('p').forEach((pElement) => {

Copy link
Contributor Author

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

@sharmeeatadobe
Copy link
Contributor Author

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.

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.
@adeshmukh-1585 @narcis-radu @mokimo @praveenrv

@mokimo
Copy link
Contributor

mokimo commented Jan 13, 2025

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.

@narcis-radu
Copy link
Contributor

@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.
If adobe/helix-html2md#556 is not merged, we can think about merging this one instead.
I will request changes to make sure the code is not picked up after we have signoff from QA.

@narcis-radu narcis-radu self-requested a review January 13, 2025 14:35
Copy link
Contributor

@narcis-radu narcis-radu left a 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.

Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label Jan 21, 2025
@mokimo mokimo removed the Stale label Jan 21, 2025
@mokimo
Copy link
Contributor

mokimo commented Jan 21, 2025

Not stale.

Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label Jan 29, 2025
@mokimo
Copy link
Contributor

mokimo commented Jan 29, 2025

Not stale, however we should rebase to stage and ensure the branch is green from the unit tests / nala tests

@mokimo mokimo removed the Stale label Jan 29, 2025
@sharmeeatadobe
Copy link
Contributor Author

image UTs are successful in local run. Need a job re-run in this PR.

Copy link
Contributor

github-actions bot commented Feb 8, 2025

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.

@github-actions github-actions bot added the Stale label Feb 8, 2025
@mokimo mokimo removed the Stale label Feb 10, 2025
Copy link
Contributor

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.

@github-actions github-actions bot added the Stale label Feb 18, 2025
Copy link
Contributor

Closing this PR due to inactivity.

@github-actions github-actions bot closed this Feb 25, 2025
@mokimo mokimo reopened this Feb 25, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants