Skip to content

feat(templates): add the dialog wizard page template - #5798

Open
ernestt wants to merge 1 commit into
mainfrom
template-form-wizard-dialog
Open

feat(templates): add the dialog wizard page template#5798
ernestt wants to merge 1 commit into
mainfrom
template-form-wizard-dialog

Conversation

@ernestt

@ernestt ernestt commented Aug 31, 2026

Copy link
Copy Markdown
Contributor

Adds form-wizard-dialog, the fourth and last of the wizard templates: a three-step flow for scheduling a recurring report, run inside a Dialog.

Rubric score: 99/100 (grade A). Pass bar is B (75).

What this one is for

The container is the whole differentiator. A page wizard gets the full content width; a vertical rail can afford a description under every step. A modal gets 620px and a body that scrolls against maxHeight, so the step markers go compact, the action row pins to the bottom, and the budget is two to four short steps. Past that, the flow wants a page.

The title and the stepper are two pinned header rows rather than body content, because a stepper placed in the body slides out of view on the longest step — the one where knowing your position matters most.

Step 1 — report definition Step 2 — cadence, as a radiogroup

Inline, and why

The dialog renders with isInline and stays open. A real modal is promoted to the browser's top layer, where no ancestor transform or overflow: hidden can clip it — so an open one inside a scaled gallery tile paints over the whole gallery instead of inside its tile. The docsite's own template preview is also a Dialog, and Astryx forbids nesting dialogs.

isInline draws the same anatomy without the <dialog> element, the backdrop, or the modal behaviour. The module header spells out the four-line change back to a real modal, and what belongs on the page behind it. This follows the precedent already set by settings-dialog.

A bug found on the way

Layout inside the dialog was height="auto". An auto Layout sizes to its content and lets the dialog clip the overflow rather than scroll it, which on the Delivery step hid 14px of the summary outright and cut into the footer buttons. height="fill" puts the scroll where the module header always claimed it was: the content region scrolls 117px on that step, the action row stays put, nothing is unreachable.

Step 3 — footer pinned, body scrolls …scrolled to the summary at its foot

Also fixed while scoring: the cadence Field paired isGroupLabel with inputID, but FieldLabel drops htmlFor in group mode, so the id was inert and the radiogroup was falling back to a duplicate aria-label. Now wired the documented way — labelID + aria-labelledby — so the group takes the label the user can actually see.

Validation and confirmation

Blocking a step reports the count beside the button that is refusing to advance. Completing the flow raises a toast: a real modal would close, and closing is most of the confirmation, so with nothing to close the toast carries it and the draft resets.

Blocked, with the field marked Scheduled

Light, dark, narrow

Dark 420px — no overflow

Test plan

  • Drives end to end in the template viewer: three steps, blocked state, completion toast, reset
  • Radiogroup resolves its accessible name from the visible label via aria-labelledby
  • Delivery step scrolls its body; primary action fully visible on every step; nothing clipped
  • 420px viewport: no horizontal overflow
  • Light and dark
  • typecheck:template-docs, eslint and prettier clean

Made with Cursor

A three-step wizard inside a Dialog — scheduling a recurring report — for
flows short enough that leaving the page costs more than the modal's
constraints.

What the template is for, beyond the other three wizards: the container is
the differentiator. A page wizard gets the full content width and a vertical
rail can afford descriptions per step; a modal gets 620px and a body that
scrolls against maxHeight, so the step markers go compact, the action row
pins to the bottom, and the budget is two to four short steps. The header
carries the title and the stepper as two pinned rows, because a stepper
placed in the body slides out of view on the longest step — the one where
knowing your position matters most.

The dialog renders with `isInline` and stays open. A real modal is promoted
to the browser's top layer, where no ancestor transform or overflow can clip
it, so an open one inside a scaled gallery tile paints over the whole
gallery instead of inside its tile — and the docsite's own template preview
is itself a Dialog, which Astryx forbids nesting. Inline draws the same
anatomy without the <dialog> element, the backdrop, or the modal behaviour.
The module header spells out the four-line change back to a real modal, and
what to put behind it.

Layout uses height="fill" rather than auto. An auto Layout sizes to its
content and lets the dialog clip the overflow, which on the Delivery step
hid 14px of the summary and cut into the footer buttons. Filling the bounded
shell puts the scroll where it belongs: the content region scrolls 117px on
that step, the action row stays put, and nothing is unreachable.

Scoring 99/100 (A) against the template rubric.

Co-authored-by: Cursor <cursoragent@cursor.com>
@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Aug 31, 2026
@vercel

vercel Bot commented Aug 31, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Aug 31, 2026 11:29pm UTC

Request Review

@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

📚 Storybook Preview

View Storybook for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

🧪 Sandbox Preview

View Sandbox for this PR
GitHub Pages may take up to a minute to hydrate after deploy.

No new or modified components detected.

Bundle Size Summary

No component packages changed.

Accessibility Audit

Status: No accessibility violations detected.


Generated by PR Enrichment workflow | Storybook | Sandbox | View full report

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant