Skip to content

fix(rsvp-form): remap type to a substrate + displayAs to the widget - #192

Open
qiyundai wants to merge 1 commit into
rsvp-form-blockfrom
feat/rsvp-field-taxonomy-rsvp-form
Open

fix(rsvp-form): remap type to a substrate + displayAs to the widget#192
qiyundai wants to merge 1 commit into
rsvp-form-blockfrom
feat/rsvp-field-taxonomy-rsvp-form

Conversation

@qiyundai

Copy link
Copy Markdown
Collaborator

Summary

  • Mirrors the same remap change proposed for events-form.js (PR #191) — this block's resolveRsvpConfig is an independent port of getRsvpConfigFromMeta, so it needs the identical extension to stay in sync.
  • ESP's RSVP field type is being redesigned to name only the fundamental substrate (text, select, multi-select); displayAs now fully determines the concrete widget.
  • fields.js's FIELD_BUILDERS and payload.js need no changes — verified their dispatch keys and boolean-collapse logic already match every internal dispatch type this remap produces.
  • Adds type="url" to createTextField for the text+url flavor (it already special-cased email). number/date still fall back to a plain sp-textfield — a pre-existing gap (today's ESP enum already hits this same fallback), tracked separately since it needs a dedicated Spectrum control, not a remap change.
  • Backward compatible with legacy direct type values and the old checkbox+displayAs convention.
  • Targets rsvp-form-block (this PR's base) rather than dev, since it's a small follow-up on top of the in-review Spectrum 2 block — intended to land as part of/after that PR merges.

Test plan

  • Added a full (type, displayAs) → dispatch/rendered-element test matrix in test/unit/blocks/rsvp-form/rsvp-form.test.js, including the documented number/date fallback
  • npx wtr — 51/51 tests passing
  • npx eslint clean on all three changed files

Co-Authored-By: Claude Sonnet 5 noreply@anthropic.com

Mirrors the same remap change landing in events-form.js's
getRsvpConfigFromMeta (this block's resolveRsvpConfig is an independent
port of that function). ESP's RSVP field `type` now names only the
fundamental substrate; displayAs picks the concrete widget within it.
Backward compatible with legacy direct type values and the old
checkbox+displayAs convention.

Also sets sp-textfield's type="url" for the text+url flavor (fields.js
createTextField already special-cased email); number/date still fall
back to a plain sp-textfield, a pre-existing gap tracked separately.

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

aem-code-sync Bot commented Jul 16, 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

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.

1 participant