Skip to content

Form builder UI: new-form restyle, section field lists, editor polish#1639

Merged
maebeale merged 3 commits into
mainfrom
maebeale/form-builder-ui
Jun 13, 2026
Merged

Form builder UI: new-form restyle, section field lists, editor polish#1639
maebeale merged 3 commits into
mainfrom
maebeale/form-builder-ui

Conversation

@maebeale

Copy link
Copy Markdown
Collaborator

🔗 Stacked PR — base branch is maebeale/form-preview. Merge #1635 and the preview PR first; GitHub will retarget this to main. Review only this PR's own diff.

What is the goal of this PR and why is this important?

  • Polishes the form-building admin UI: a consistent new-form page, per-section field previews, and clearer field-editor affordances.

How did you approach the change?

  • New-form restyle: adopts the shared purple hero layout used by the questions/sections editors; the editor eyebrow now reads "Edit".
  • Section field lists: a per-section expand toggle lists that section's fields vertically. New forms use a hard-coded SECTION_FIELD_NAMES map in FormBuilderServiceguarded by a spec that builds every section and asserts the map matches, so it can't silently drift. The sections editor lists the form's actual fields, falling back to the defaults for not-yet-added sections.
  • Field editor: expanding a field's options tray tints the row and adds bottom padding. Reuses the existing expandable-card Stimulus controller (no new toggle controller).

UI Testing Checklist

  • New-form page uses the purple hero layout; eyebrow on the editors reads "Edit".
  • On new + sections pages, each section expands to a vertical field list.
  • Expanding a field's options tints the row and has bottom padding.

Anything else to add?

  • Third of three stacked PRs (subtitle → preview → builder UI).

@maebeale maebeale force-pushed the maebeale/form-preview branch from 7d2e606 to 270c00f Compare June 13, 2026 17:57
@maebeale maebeale force-pushed the maebeale/form-builder-ui branch from 3170c5b to 615bddd Compare June 13, 2026 18:03
@maebeale maebeale force-pushed the maebeale/form-preview branch from 270c00f to 6e102bf Compare June 13, 2026 18:12
Base automatically changed from maebeale/form-preview to main June 13, 2026 18:19
maebeale and others added 3 commits June 13, 2026 14:20
- Restyle the new-form page with the shared purple hero layout used by the
  questions and sections editors; change the editor eyebrow to "Edit".
- Add a per-section expand toggle on the new-form and sections pages that
  lists the section's fields vertically. New forms use a hard-coded
  SECTION_FIELD_NAMES map (spec-guarded against builder drift); the sections
  editor lists the form's actual fields, falling back to the defaults.
- Expanding a field's options tray tints the row and adds bottom padding.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The new-form restyle added content_for(:page_bg_class) to forms/new.html.erb,
which the alignment guard requires to be enumerated in EXPECTED_MAPPINGS.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
The professional_info builder now creates two fields (Primary service
area + Additional service areas) where the constant still listed the old
single Primary Service Area(s), failing the drift-guard spec on CI.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@maebeale maebeale force-pushed the maebeale/form-builder-ui branch from 7ef8ef7 to e5af54c Compare June 13, 2026 18:21
@maebeale maebeale merged commit d0b453f into main Jun 13, 2026
3 checks passed
@maebeale maebeale deleted the maebeale/form-builder-ui branch June 13, 2026 18:26
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