Skip to content

fix(templates): on a phone the settings search moves under the title - #12475

Closed
josephfarina wants to merge 4 commits into
mainfrom
josephfarina/settings-template-phone-title
Closed

josephfarina wants to merge 4 commits into
mainfrom
josephfarina/settings-template-phone-title

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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:

width before after
default theme, 390 1 line, one row unchanged
default theme, 320 "Settings" on 2 lines 1 line, search under it
monospace 20 px, 390 "Settings" on 2 lines 1 line, search under it
1280 one row unchanged (pixel-identical)

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 (useCollator Swedish order and useLocale German date) come from the test machine's Node, which ships without full locale data, and do not touch this template.
  • CLI typechecks (template docs, JSON API, strict, authoring contract, API declarations) and the CLI structure check.
  • Cold build replay: no start, alternative or block list changes.

@vercel

vercel Bot commented Nov 17, 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 18, 2026 10:07pm UTC

Request Review

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

astracat-bot Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 18, 2026, 10:18 PM UTC

@github-actions

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · ed9c492

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.38 MB packed (+57 B); no new dependencies.

Not run on this PR: add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.


Generated by PR Enrichment workflow | View full report

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec d715653

@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: 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.tsx line 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.md line 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.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 3bdfe22

@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: 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.tsx line 468: the metadata list item's value cell sets word-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.md line 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.

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as draft November 18, 2026 21:57
@josephfarina josephfarina changed the title fix(templates): on a phone the settings search moves under the title, and a discount stays on one line fix(templates): on a phone the settings search moves under the title Nov 18, 2026
@josephfarina
josephfarina marked this pull request as ready for review November 18, 2026 21:57
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec ed9c492

@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: 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 fill stack 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.

Automated review (maintainer link)

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

Copy link
Copy Markdown
Contributor Author

Landed in #12812.

@github-actions
github-actions Bot deleted the josephfarina/settings-template-phone-title branch November 19, 2026 06:04

This branch was successfully deployed

1 active deployment
Preview — ed9c492a Deployed Nov 18, 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant