fix(rsvp-form): remap type to a substrate + displayAs to the widget - #192
Open
qiyundai wants to merge 1 commit into
Open
fix(rsvp-form): remap type to a substrate + displayAs to the widget#192qiyundai wants to merge 1 commit into
qiyundai wants to merge 1 commit into
Conversation
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>
|
Hello, I'm the AEM Code Sync Bot and I will run some actions to deploy your branch and validate page speed.
Commits
|
2 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
events-form.js(PR #191) — this block'sresolveRsvpConfigis an independent port ofgetRsvpConfigFromMeta, so it needs the identical extension to stay in sync.typeis being redesigned to name only the fundamental substrate (text,select,multi-select);displayAsnow fully determines the concrete widget.fields.js'sFIELD_BUILDERSandpayload.jsneed no changes — verified their dispatch keys and boolean-collapse logic already match every internal dispatch type this remap produces.type="url"tocreateTextFieldfor thetext+urlflavor (it already special-casedemail).number/datestill fall back to a plainsp-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.checkbox+displayAsconvention.rsvp-form-block(this PR's base) rather thandev, 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
test/unit/blocks/rsvp-form/rsvp-form.test.js, including the documented number/date fallbacknpx wtr— 51/51 tests passingnpx eslintclean on all three changed filesCo-Authored-By: Claude Sonnet 5 noreply@anthropic.com