feat(templates): add the checkout wizard page template - #5660
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
A multi-step wizard paired with a running summary that recalculates as answers change. The pairing is the point: the wizard alone is form-wizard, and what separates this one is that a total stays on screen and stays correct while the steps advance, which is the shape any flow needs when a price, quota or budget has to survive the sequence. The summary is a card beside the form on wide screens and collapses inline above it on narrow ones, so the number is reachable at both sizes without the layout keeping a rail it cannot afford. The form column owns the whole sequence end to end — progress on top, the step in the middle, the way out at the bottom — rather than pinning a page-wide action bar that would span the summary too. Validation is per step and only surfaces after an attempt, so a step never opens pre-reddened. A step that has been tried and left broken keeps its error on the stepper, which is what makes going back worth doing. Graded against the template rubric v1.3: 99/100, grade A. Zero raw HTML elements, zero raw SVG icons, zero custom CSS declarations. The one point off is the description's synonym slot, which leans on the name for "checkout" and "cart" instead of spelling them out. Co-authored-by: Cursor <cursoragent@cursor.com>
b82cd86 to
b390106
Compare
xinzi-bot
left a comment
There was a problem hiding this comment.
Thanks—the running summary is a useful wizard shape. Three paths need fixing: clicking a future Step bypasses the validation that should gate each advance; Canada and the UK still require a US ZIP; and an invalid promo still says “Press Apply” after Apply ran. These are all in this template, not inherited from #5659.
[Automated review]
cixzhang
left a comment
There was a problem hiding this comment.
Checkout users can skip required data, lose focus, and reach a Pay button that does nothing. This confirms xinzi-bot’s three exact-head findings and adds two broader failures:
- The transition model validates only footer Continue: Step/compact navigation skips fields, invalid actions do not focus the first error, and Pay never submits or confirms. Canada/UK postal codes and invalid promo results are also incorrect.
- Responsive mode watches viewport width, not host width. At 1280px viewport / 600px host, the form shrinks to 168px beside a 360px summary; narrow visual and keyboard order also disagree.
- Template metadata uses a value outside
TemplateCategory, and this public CLI addition has no CLI changeset.
Please make every forward path validate/focus/complete, adapt from available width, and restore metadata/release gates.
[Reviewed by Robohands]
Summary
A multi-step wizard paired with a running summary that recalculates as answers change.
The pairing is the whole point. The wizard on its own is
form-wizard; what separates this one is that a total stays on screen and stays correct while the steps advance — the shape any flow needs when a price, quota or budget has to survive the sequence.The summary is a card beside the form on wide screens and collapses inline above it on narrow ones, so the number stays reachable at both sizes without the layout keeping a rail it cannot afford. The form column owns the sequence end to end (progress on top, the step in the middle, the way out at the bottom) rather than pinning a page-wide action bar that would span the summary too.
Validation is per step and only surfaces after an attempt, so a step never opens pre-reddened. A step that has been tried and left broken keeps its error on the stepper, which is what makes going back worth doing.
Rubric result — 99/100, grade A
Graded against Template Grading Rubric v1.3. Pass bar is B (75).
Counts came from exhaustive scans, not sampling:
<string>and<number>.<svg>/<path>; every icon is a heroicon throughIconor anicon=prop.stylex.create, nostyle={{}}, noclassName, noxstyle. Spacing is entirely token-valued Astryx props, which the rubric does not count.LayoutwithcontentWidth={1000}, correct for aForm -category. Two-column split that stacks on narrow, no global app chrome, nohrefanywhere so nav is inert./template-assets/paths, all resolving to checked-in files. No absolute URLs or placeholder services.'use client'as the first statement after the license header (house convention), default export, imports confined to@astryxdesign/core/*,@heroicons/react/*andreact, realistic fixtures, no dead code.The one point off
Doc metadata 5b scores 2/3 — the synonyms slot is half-present. "a total, quota, or price" supplies the interchangeable example domains, but the alternate words a searcher actually types (cart, checkout, order, basket, payment) are left implicit.
Leaning on the name to carry "checkout" does not count: the rubric's own ablation found
descriptionis the only field whose removal degrades retrieval, and removingnamechanged nothing. Folding those synonyms in would take this to 100 — happy to do it in this PR if you'd rather not carry the finding.Scope
Template plus its one gallery registration line. The five sibling wizard templates are registered in the same file in my working tree and are deliberately not included; they ship in their own PRs.
Also left out: an unrelated
apps/template-viewer/vite.config.tschange that points the dev viewer at the docsite'spublic/so image templates preview correctly. Generic dev tooling, not needed for this template to work.Test plan
scripts/template-score-ledger.mjs --dry-run.pnpm -F @astryxdesign/cli typecheck:template-docsclean.page/checkout-wizardhas no entry today. Say the word and I'll--pushthe scorecard.Made with Cursor
Screenshots
All four captured with zero page errors and zero console errors.
Desktop 1280px, light. Summary as a card beside the form; both columns measure from the same 1000px cap, so "Checkout", "Review your cart" and "Continue" share one content line.
Desktop 1280px, dark.
Narrow 390px, light. The summary collapses inline above the form and keeps the total on its trigger, so the number survives the narrow layout. The stepper collapses to bars with the current step named below it.
Narrow 390px, dark.