Repository navigation
fix(templates): payment form and checkout wrap the summary below the form on a narrow first paint - #12072
fix(templates): payment form and checkout wrap the summary below the form on a narrow first paint#12072josephfarina wants to merge 2 commits into
Conversation
…form on a narrow first paint
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 49ad77e |
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested: the checkout wizard's desktop layout regresses once script has run.
- In
checkout-wizard/page.tsx, the form column keepsflex-basis: auto, so at 1280 px the Shipping step, and any later step whose content is wider than the space beside the 360 px summary, wraps the order summary below the form; addingflexBasis: 0toformColumnkeeps the desktop identical tomainwhile the narrow first paint still wraps. - The release note's "Wide screens look the same" (and the description's "Wide screens unchanged") is false for the checkout wizard until that fix lands; the 1280 px comparison holds for the first (cart) step only.
The narrow first-paint fix itself works in both templates, and the payment form is unchanged on wide screens and on phones after script runs. The engineering owner's /approve-spec covers this head only, so the push with the fix needs it again.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Claim: both templates no longer squeeze the form beside the summary on a narrow screen before script runs, and the summary wraps below: verified (server markup at 390 px for both templates, 800 px for the checkout).
- Claim: wide screens look the same: false for the checkout wizard (Shipping step at 1280 px wraps); true for the payment form.
- Claim: before script, narrow screens painted the desktop split with words broken one letter per line: verified on
mainat 390 px. - Claim: the row may now wrap and the form column has a minimum width: verified (
checkout-wizard/page.tsx:231,:694,:703;payment-form/page.tsx:166-179,:308). - Claim: once script runs, each page switches to its phone layout exactly as before: verified (390 px with script, pixel-identical for both templates).
- Claim: CSS only, with no script and no change to the desktop first paint: verified for the first step; the checkout desktop changes on later steps.
- Claim: full-page shots at 1280 px and 800 px are pixel-identical: true for the payment form and the checkout cart step; false for the checkout Shipping step at 1280 px.
- Claim: with script off, the narrow form spans the width and the summary follows (390 px; 800 px for the checkout): verified.
- Claim: build replay shows no recommendation changes: verified by inspection (no template doc or registry input changed).
- Claim: typecheck, lint and Prettier pass: verified (a strict typecheck with unused-locals checks reports nothing in either template; ESLint and Prettier pass on the three files).
- Claim: two page templates, no component or API change: verified.
- Claim: public text contains no internal context: verified.
- File
.changeset/nojs-commerce.md: finding (the wide-screen sentence). - File
packages/cli/assets/templates/pages/checkout-wizard/page.tsx: finding (desktop wrap from:231). - File
packages/cli/assets/templates/pages/payment-form/page.tsx: clear.
|
/approve-spec a041311 |
There was a problem hiding this comment.
Approved pending CI: the CI workflow has not finished on this head yet.
Both templates now wrap the order summary below the form on a narrow first paint, while wide screens and each page's phone layout after script runs render as on main. An engineering owner's /approve-spec for this head covers the first-paint direction, which no current spec settles yet. One optional follow-up: the checkout contract test's form-column pattern now matches a cart-row StackItem, so it could be tightened when the test is next touched.
Claims and files checked
Review mode: same-head; reason: none
- Changed rules (0): none.
- Claim: before script runs, a narrow screen no longer squeezes the form beside the order summary, and the summary wraps below it: verified in both templates at 390 px, and at 800 px for the checkout.
- Claim: wide screens look the same: verified; the checkout with script on at 1280 px (cart, shipping, shipping with errors), 950 px and 800 px, the payment form at 1280, 800 and 768 px, and the 1280 px first paint of both templates match
mainpixel for pixel. - Claim: before this change the narrow first paint showed the desktop split with words broken one letter per line: verified on
main. - Claim: the side-by-side row may wrap and the form column has a minimum width: verified (
checkout-wizard/page.tsx:232,:695,:704;payment-form/page.tsx:166-179,:308,:313). - Claim: once script runs, each page switches to its phone layout exactly as before: verified at 390 px in both templates.
- Claim: CSS only, with no script and no change to the desktop first paint: verified.
- Claim: screenshots at 1280 px with script on and off, at 800 px with script on, and at 390 px with script on are identical: verified for both templates.
- Claim: with script off, the form spans the width and the summary follows it at 390 px, and at 800 px for the checkout, whose split starts above 900 px: verified.
- Claim: the build replay shows no change to which templates are suggested: verified by inspection; no template doc or recommendation input changed.
- Claim: typecheck, lint and Prettier pass: verified; a strict typecheck with unused-locals checks reports nothing in either template, and ESLint and Prettier pass.
- Claim: two page templates, no component or API change: verified.
- Claim: public text contains no internal context: verified.
- File
.changeset/nojs-commerce.md: clear. - File
packages/cli/assets/templates/pages/checkout-wizard/page.tsx: clear (optional contract-test follow-up above). - File
packages/cli/assets/templates/pages/payment-form/page.tsx: clear.
|
/approve-spec a041311 |
…ry below the form on a narrow first paint
…ry below the form on a narrow first paint
- #12072 fix(templates): payment form and checkout wrap the summary below the form on a narrow first paint Author: Joey Farina <[email protected]> - #12274 fix(core): cap the Selector family's trigger-width list minimum at the viewport Author: josephfarina <[email protected]> - #12215 fix(cli): advise keeping one dependency when two packages declare one provider ID Author: Joey <[email protected]> - #12322 [experimental] export --reverse: use the project's own copy of an aliased file, or restore the page's copy with its paths entry Author: josephfarina <[email protected]> - #12403 docs(core): Text's as and PowerSearch's statusVariant list every value their types allow Author: Joey Farina <[email protected]> - #12494 fix(templates): dashboard templates use page sections, not cards, for page regions Author: Joey Farina <[email protected]> - #12282 fix(cli): theme build --check and doctor ignore which CLI release, and which command name, built a theme Author: Joey Farina <[email protected]> - #12420 fix(Chat): ChatToolCalls and ChatDictationButton without a required prop name it and the fix in development Author: Joey Farina <[email protected]> - #12205 fix(cli): equally scored icons put first one whose id the query names in full Author: Joey Farina <[email protected]> - #12455 fix(core): a theme sets the room between a checkbox or a switch and its label Author: josephfarina <[email protected]> - #12658 perf(cli): the first theme build after a CLI upgrade reuses the JavaScript it compiled from a theme's local modules Author: Joey <[email protected]> - #12323 [experimental] export: React logs no render timings while the export draws a page Author: Joey Farina <[email protected]>
|
Landed in #12713. |
What
The
payment-formandcheckout-wizardpage templates pick their stacked phone layout with script. Before script runs on a narrow screen (a server-rendered first paint, or a page with script off), they painted the desktop split: the form squeezed beside the order summary, with words broken one letter per line.Now the side-by-side row is allowed to wrap, and the form column has a minimum width, so on that narrow first paint the order summary wraps below the form and both read normally. Once script runs, each page switches to its phone layout exactly as before.
Why
Content should be readable on the first paint. This uses CSS only (flex wrap and a minimum width), with no script and no change to the desktop first paint.
Evidence
Scope