Skip to content

MWPW-206340: Fix RSVP terms cell dropping bullets and running paragraphs together - #322

Open
qiyundai wants to merge 3 commits into
devfrom
MWPW-206340-rsvp-terms-cell-fix
Open

MWPW-206340: Fix RSVP terms cell dropping bullets and running paragraphs together#322
qiyundai wants to merge 3 commits into
devfrom
MWPW-206340-rsvp-terms-cell-fix

Conversation

@qiyundai

@qiyundai qiyundai commented Sep 2, 2026

Copy link
Copy Markdown
Collaborator

Summary

Fixes MWPW-206340: the events-form RSVP terms/description cell had two rendering bugs reported by QA.

  • Missing bullet: addTerms() deleted every authored <li> outright instead of preserving it — a leftover from an old consent-checkbox mechanism (each <li> used to become a checkbox) that's since been fully replaced by the JSON/country-index-driven consent suite (addConsentSuite/loadConsent, a separate DOM subtree unrelated to this cell).
  • Concatenated paragraphs: .event-terms-wrapper had no vertical-stacking layout, so authored <p> paragraphs rendered side-by-side on one line instead of stacking.

Changes

  • addTerms() now moves the cell's direct <p>/<ul>/<ol> children into the wrapper together, in document order, instead of separately stripping <li>. Scoped to direct children (:scope >) so a <p> nested inside a <li> (common from rich-text paste) stays inside its list item rather than being pulled out as a stray sibling.
  • Reused the existing field-group-wrapper column-layout class instead of adding a duplicate CSS rule, and added minimal ul/ol bullet spacing using the file's existing --spacing-* tokens.
  • Rewrote/added unit tests in describe('addTerms', ...) covering bullet preservation, authoring-order variations, and the nested-<p>-in-<li> case.

Test plan

  • npm run lint passes clean
  • npx wtr test/unit/blocks/events-form/events-form.test.js --node-resolve --port=2000 — couldn't get a clean run in the dev sandbox (headless Chrome can't reach the CDN-hosted Milo module the test harness depends on, reproducible on unmodified dev too); please confirm green in CI/local
  • Manual code review by two independent review passes (correctness + code quality)

…phs together

addTerms() deleted every authored <li> outright instead of preserving it
(a vestige of an old consent-checkbox mechanism now fully superseded by
the JSON/country-index-driven consent suite), and .event-terms-wrapper
had no vertical-stacking layout, so authored <p> paragraphs rendered
side-by-side on one line instead of stacking.

Move <p>/<ul>/<ol> together in document order (scoped to the cell's
direct children, so a <p> nested inside a <li> stays inside its list
item) instead of separately stripping <li>, and reuse the existing
field-group-wrapper column-layout class instead of duplicating it.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
@aem-code-sync

aem-code-sync Bot commented Sep 2, 2026

Copy link
Copy Markdown

Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
In case there are problems, just click a checkbox below to rerun the respective action.

  • Re-run all PSI checks
  • Re-run failed PSI checks
  • Re-sync branch
Commits

Comment thread event-libs/v1/blocks/events-form/events-form.js Outdated
@michaelready
michaelready self-requested a review September 4, 2026 23:50
@qiyundai qiyundai added this to the 26.38 milestone Sep 4, 2026
Real block markup nests authored p/ul/ol one level deeper (row > cell)
than addTerms accounted for, so the previous :scope selector matched
nothing and the whole terms row was deleted on production pages.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants