Skip to content

fix(templates): payment form and checkout wrap the summary below the form on a narrow first paint - #12072

Closed
josephfarina wants to merge 2 commits into
mainfrom
josephfarina/nojs-commerce
Closed

josephfarina wants to merge 2 commits into
mainfrom
josephfarina/nojs-commerce

Conversation

@josephfarina

Copy link
Copy Markdown
Contributor

What

The payment-form and checkout-wizard page 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

  • Wide screens unchanged: full-page screenshots before and after at 1280 px with script on and off, and at 800 px with script on, are pixel-identical (zero changed pixels). With script on, 390 px is also identical.
  • Narrow first paint with script off: at 390 px (and 800 px for the checkout, whose split starts at 900 px) the form now spans the width and the summary follows it.
  • Build replay over real build requests: no start, alternatives list or block list changes.
  • Typecheck (strict, no unused locals), lint and prettier pass.

Scope

  • Two page templates; no component or API change.
  • Public text contains no internal context.

@vercel

vercel Bot commented Nov 16, 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 Nov 16, 2026 2:34pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 16, 2026
@astracat-bot

astracat-bot Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 16, 2026, 3:28 PM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 16, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 49ad77e

@github-actions

github-actions Bot commented Nov 16, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · a041311

Storybook · Sandbox · built from this PR's head

Current run: The current CI run concluded cancelled. Current analysis is unavailable.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: the checkout wizard's desktop layout regresses once script has run.

  • In checkout-wizard/page.tsx, the form column keeps flex-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; adding flexBasis: 0 to formColumn keeps the desktop identical to main while 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 main at 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.

Automated review (maintainer link)

Comment thread .changeset/nojs-commerce.md Resolved
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec a041311

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 main pixel 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.

Automated review (maintainer link)

@cixzhang

Copy link
Copy Markdown
Contributor

/approve-spec a041311

@josephfarina josephfarina reopened this Nov 17, 2026
josephfarina added a commit that referenced this pull request Nov 18, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #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]>
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12713.

@github-actions
github-actions Bot deleted the josephfarina/nojs-commerce branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — a041311c Deployed Nov 16, 2026 by vercel[bot]
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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants