Repository navigation
fix(templates): on a phone the settings search moves under the title - #12475
josephfarina wants to merge 4 commits into
Conversation
… and a discount stays on one line
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
|
/approve-spec d715653 |
There was a problem hiding this comment.
Changes requested: on a phone the settings header now keeps "Settings" on one line with the search below it, but the order-detail discount still breaks between its sign and its amount.
packages/cli/assets/templates/pages/detail-page/page.tsxline 468: an en dash (U+2013) allows a line break after it even before a no-break space, so at 320 px the discount still shows "–" alone above "$15.00"; the minus sign,− {fmt(DISCOUNT)}(U+2212), keeps the two together.- The title and
.changeset/settings-template-phone-title.mdline 5 say the discount now stays on one line, which it does not at this head, so fix the code as above or drop that clause from both.
The /approve-spec on this head records the engineering-owner decision for both templates' phone-width arrangement. It binds this exact commit, so an engineering owner (the author included) posts /approve-spec <full head SHA> again on the head that carries the fix.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0)
- Claim: the settings title breaks mid-word at 320 px with the default theme: verified on the base.
- Claim: the title is a filling stack item that may shrink to zero: verified (a filling stack item grows and resets its minimum width to 0).
- Claim: the header row now wraps with a small gap, so the search moves under the title when both do not fit: verified at 320 px, on a 390 px touch phone and with a larger monospace heading.
- Claim: wide screens are unchanged: verified (1280 px renders are pixel-identical; 390 px with a mouse stays one row).
- Claim: the discount used an ordinary space, so a tight row broke the sign from the amount: verified on the base.
- Claim: a no-break space now keeps the discount together: false, it still breaks at 320 px.
- Claim: amounts breaking mid-number come from the metadata list item and are fixed in #12472: that pull request is open and changes that rule.
- Claim: the measurement table: verified for 320 px, the larger monospace font and 1280 px; the 390 px row holds with a mouse.
- Claim: the test plan: the template tests (277) pass and the changed files pass Prettier and ESLint; the wider test set and the typechecks were not rerun.
- Release note: a patch for the CLI: verified, the templates ship in that package.
- Release note: the settings search moves under the title instead of squeezing it: verified.
- Release note: the order detail page keeps the discount on one line: false, as above.
- File
.changeset/settings-template-phone-title.md: the release-note finding above. - File
packages/cli/assets/templates/pages/detail-page/page.tsx: the discount finding above. - File
packages/cli/assets/templates/pages/settings/page.tsx: clear.
…er breaks after the sign
|
/approve-spec 3bdfe22 |
There was a problem hiding this comment.
Changes requested: on a phone the settings header now keeps "Settings" on one line with the search below it, but the order-detail discount still takes two lines, now split inside the number.
packages/cli/assets/templates/pages/detail-page/page.tsxline 468: the metadata list item's value cell setsword-break: break-word, so the row still shrinks the amount and shows "− $15.0" above "0" at 360 px and on a 390 px touch phone (the base kept "$15.00" whole there); wrap the amount in<StackItem size="static">so it never shrinks, or hold this line until #12472 lands.- The title and
.changeset/settings-template-phone-title.mdline 5 say the discount now stays on one line, which it does not at this head, so make the fix hold or drop that clause from both.
The minus sign suggested in the earlier review is not enough on its own in this row, because that suggestion missed the value cell's word breaking. The engineering-owner /approve-spec on this head records the phone-width decision for both templates and binds this exact commit, so an engineering owner (the author included) posts /approve-spec <full head SHA> again on the head that carries the fix.
Claims and files checked
Review mode: incremental; reason: none
- changed rules (0)
- Claim: two page templates break words on a phone with a slightly wider font, and the settings one at 320 px with the default theme: verified on the base.
- Claim: the settings title is a filling stack item that may shrink to zero beside a search at its own width: verified (a filling stack item grows and resets its minimum width to 0).
- Claim: the narrow row squeezes the title until "Settings" breaks mid-word: verified on the base at 320 px and on a 390 px touch phone.
- Claim: the header row now wraps with a small gap, so the search moves under the title when both do not fit: verified at 320 px and on a 390 px touch phone.
- Claim: wide screens are unchanged: verified (1280 px renders are pixel-identical).
- Claim: the discount used an en dash and an ordinary space, so a tight row broke the sign from the amount: verified on the base at 360 px and on a 390 px touch phone.
- Claim: a minus sign does not allow a break after itself, unlike an en dash: verified for the characters, but in this row the amount still breaks inside the number.
- Claim: amounts breaking mid-number come from the metadata list item and are fixed in #12472: the cause is verified; that pull request is still open, and the discount now breaks the same way.
- Claim: the measurement table: verified for 320 px and 1280 px; the 390 px row holds with a mouse (checked earlier on the same settings code); the monospace row was not re-measured.
- Claim: the test plan: the template tests pass (383) and the changed files pass Prettier; the typechecks and the structure check were not rerun.
- Release note: a patch for the CLI: verified, the templates ship in that package.
- Release note: the settings search moves under the title instead of squeezing it: verified.
- Release note: the order detail page keeps the discount on one line: false, as above.
- File
.changeset/settings-template-phone-title.md: the release-note finding above. - File
packages/cli/assets/templates/pages/detail-page/page.tsx: the discount finding above. - File
packages/cli/assets/templates/pages/settings/page.tsx: clear.
|
/approve-spec ed9c492 |
There was a problem hiding this comment.
Approved: on a phone the settings header now keeps "Settings" on one line with the search below it, wide screens are unchanged, and CI is green on this head.
Dropping the discount change also clears both earlier findings, so nothing else is needed.
Claims and files checked
Review mode: incremental; reason: none
- Claim: the release note says the settings template's search moves under the title on a phone instead of squeezing "Settings" until it breaks mid-word — verified (
settings/page.tsx:80; Chromium at 320 px, 390 px, a 390 px touch phone and a monospace font). - Claim: the title says the settings search moves under the title on a phone — verified (same evidence).
- Claim: before this change the title breaks on a phone at 320 px and with a wider font — verified (the base shows "Setting" / "s" in each case).
- Claim: the title is a filling stack item that may shrink to zero beside a search at its own width — verified (a
fillstack item sets flex-grow 1 and min-width 0). - Claim: the row now wraps with a small gap, so the search moves under the title only when both do not fit — verified (
settings/page.tsx:80; an 8 px gap). - Claim: wide screens are unchanged — verified (430 px and 1280 px render pixel-identical).
- Claim: with the default theme at 390 px the title already fits on one line — font-dependent: with the fallback font used for this check the title already broke at 390 px before the change, and the change fixes that too.
- Claim: the listed CLI test suites pass — verified (they pass on this head, the two locale tests included).
- Claim: the CLI typechecks and the CLI structure check pass — verified (CI typecheck is green; the strict check reports no error in the settings template).
- Claim: a cold build replay shows no start, alternative or block-list change — consistent: the CLI build tests pass on this head, and build ranking reads template docs, which are unchanged.
- File:
packages/cli/assets/templates/pages/settings/page.tsx— clear. - File:
.changeset/settings-template-phone-title.md— clear.
- #12694 fix(cli): the Order Detail template's discount uses a minus sign held to its amount Author: @josephfarina - #12114 fix(templates): reset, reply, send and go-into icons mirror in right-to-left pages Author: @josephfarina - #12143 refactor(templates): example blocks lay out with HStack and VStack instead of flex wrappers Author: @josephfarina - #12158 fix(core): ChatComposer keeps its send action inside the composer on a narrow screen Author: @josephfarina - #12242 fix(cli): the npm commands the CLI runs for itself use npm's own noproxy setting Author: @josephfarina - #12283 fix(core): dark secondary text meets 4.5:1 on the neutral fill over the page and cards Author: @josephfarina - #12290 fix(Markdown): keep bulleted and numbered lists inside their column Author: @josephfarina - #12372 [fix] Heading: a missing level renders an h2 and warns, instead of crashing Author: @josephfarina - #12447 spec(AST-057): the swipe codemod's paths match it in any lifecycle folder Author: @josephfarina - #12475 fix(templates): on a phone the settings search moves under the title Author: @josephfarina - #12530 fix(cli): the contact-form template fits a phone; its section fills the width up to 800px Author: @josephfarina
|
Landed in #12812. |
The settings page template breaks its title on a phone once the theme's font is a little wider (a monospace body font, a larger text size), and at 320 px with the default theme too.
The header row holds the title (a filling stack item, which may shrink to zero) beside the search field (its own width). On a narrow screen the row squeezes the title until "Settings" breaks mid-word ("Setting" / "s"). The row now wraps with a small gap, so when both do not fit, the search moves under the title. Wide screens are unchanged (title and search fit one row).
Measured in Chromium:
Test plan:
CI=1 vitest run packages/cli/api/template packages/cli/api/build/kit/start.test.mjs packages/cli/foundation/discovery/template-destination.test.mjs: 296 pass; the two failures (useCollatorSwedish order anduseLocaleGerman date) come from the test machine's Node, which ships without full locale data, and do not touch this template.