Repository navigation
fix(templates): the documentation page templates fit a phone - #12734
josephfarina wants to merge 5 commits into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Changes requested: the documentation design page now fits a 320 px phone, but the overview page's title still breaks inside "overview" at 320 px, so the changeset and description claim more than this head does.
- At 320 px the overview title still renders "Web / overvie / w" because the 168 px word does not fit the hero's 144 px content box, so please say in the changeset, the description and the spacer's comment that the title stays whole on phones 344 px and wider and still breaks once at 320 px, or give the hero about 24 px more width at that breakpoint, for example with less card padding.
The design page's example actions and Button preview now stay inside the card at 320 and 390 px, and both pages are pixel-identical at 1280 px. Approval needs only the overview claim, or the 320 px layout, fixed.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims (changeset and description):
- The overview title no longer breaks inside a word: false at 320 px ("Web / overvie / w"), true from 344 px (
documentation/page.tsx:247). - The design page's example actions and Button preview wrap instead of running past the card: verified at 320 and 390 px (
documentation-design/page.tsx:510-515,:660,:666). - Wide screens look the same as before: verified, 1280 px frames of both changed regions are identical.
- Before, at 320 px the overview title was squeezed and broke inside "overview": verified, 112 px text column.
- After, at 320 px the overview title breaks only between words: false, 144 px column for a 168 px word.
- Before, at 320 px the design page's actions and preview buttons ran past the card: verified.
- After, the actions wrap under the title and the preview wraps onto a second row: verified.
- The spacer hides below 640 px, the breakpoint other templates use: verified, the same query as form-wizard and settings-dialog.
- The rows wrap with
wrap="wrap", the preview centres its rows, and only templates change: verified. - At 320 px the overview title goes from four lines to two: false, three lines on both sides.
- At 320 px the design page goes from six buttons past the screen edge to none: verified under touch emulation.
- 1280 px is identical and 390 px changes only by the same changes: verified.
- The template render and integration tests pass: not run here; prettier, eslint and a strict typecheck of both templates pass.
Files:
.changeset/docs-pages-phone-fit.md: finding (overview claim).packages/cli/assets/templates/pages/documentation/page.tsx: finding (claimed outcome not reached at 320 px).packages/cli/assets/templates/pages/documentation-design/page.tsx: clear.
There was a problem hiding this comment.
Changes requested: the overview title now stays whole at 320 px in the neutral theme and the design page fits a phone, but the new hero style removes the hero's padding on wider screens, and the release note claims more than the change delivers.
- The new
herostyle inpackages/cli/assets/templates/pages/documentation/page.tsx(lines 24-33) setspaddingInlineStartandpaddingInlineEndwithdefault: null, which replaces the Card's own padding at every width, so above 640 px the hero's title, text and button sit flush against the card edge (0 px instead of 40 px);default: 'var(--spacing-10)'on both keys keeps wide screens as they were. - Miss: the changeset and description say the overview title no longer breaks inside a word, but at 320 px that holds only in the neutral theme (stone, butter, chocolate, gothic, matcha and y2k still break "overview"), so please scope the wording, for example "the overview page's title gets the hero card's full width on a phone, so in the neutral theme it no longer breaks inside a word".
With the padding default fixed, the "wide screens look the same" and "pixel-identical at 1280 px" statements become true again. The design page changes are ready as they are.
Claims and files checked
Review mode: incremental; reason: none
- Changed rules (0)
- Claim: the design page's example actions and Button preview wrap inside their card at 320 px: verified.
- Claim: the overview title no longer breaks inside a word: true in the neutral theme at 320 and 344 px, false in six other published themes.
- Claim: wide screens look the same and the 1280 px main regions are pixel-identical: false for the overview hero (inline padding 40 to 0 px above 640 px), true for the design page.
- Claim: at 320 px before, the overview title was squeezed into half the card and broke inside the word: verified.
- Claim: at 320 px before, the design page's actions and preview ran past the card: verified for the action group and the preview.
- Claim: the spacer is hidden at the 640 px breakpoint other templates use: verified.
- Claim: the hero's side inset narrows at that breakpoint so the longest word fits: inset verified, fit holds in the neutral theme only.
- Claim: the rows wrap and the preview centres its rows; CSS-only, no component changes: verified.
- Claim: at 320 and 344 px the overview title goes from three lines to two whole-word lines: verified in the neutral theme.
- Claim: the design page goes from six buttons past the screen edge to none: verified.
- Claim: at 390 px both pages change only by the same changes: verified.
- Claim: prettier, eslint and the template render and integration tests pass: verified.
- Claim: no new public API, default or interaction model: verified.
- File
.changeset/docs-pages-phone-fit.md: the wide-screen sentence and the title claim's scope (both findings above). - File
packages/cli/assets/templates/pages/documentation/page.tsx: the hero padding finding above. - File
packages/cli/assets/templates/pages/documentation-design/page.tsx: clear.
3fdb1d8 to
afbbb8c
Compare
4a0e784 to
cb71093
Compare
afbbb8c to
628f2d3
Compare
cb71093 to
54f1dba
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The head commit's message carries [skip ci], which keeps push and pull-request workflows from starting on it.
The overview hero now switches at 640 px through Card's own padding step and the shared media-query hook, so wide screens keep their 40 px inset (pixel-identical at 641 and 1280 px), the title stays whole at 320 and 344 px in the default theme, and the design page keeps every action and preview button inside its card. The release note now matches the change.
- Non-blocking: the new comment above
isNarrowinpackages/cli/assets/templates/pages/documentation/page.tsxcalls the spacer "the empty half" that keeps the text to a readable width, but afillStackItem only takes leftover width (0 px at 641 px and below, 178 px at 1280 px), so on a phone the gain comes from dropping its 32 px gap and the narrower inset; the inline suggestion keeps only that reason.
Claims and files checked
Review mode: full; reason: rebase
- Claim: the documentation page templates fit a phone: verified at 320 px (whole-word title in the default theme, no button outside its card).
- Claim: the overview hero gives its title the card's width: verified (a 176 px title column, the card's full content width at 320 px).
- Claim: in the default theme the title no longer breaks inside a word: verified at 320, 344 and 390 px; other published themes can still break it at 320 px, as the description says.
- Claim: the design page's actions and button preview wrap instead of running past their card: verified at 320 and 390 px.
- Claim: wide screens look the same as before: verified once script runs (pixel-identical at 641 and 1280 px); a server-rendered page shows the phone hero until it hydrates, by the stated mobile-first choice.
- Claim: before, the overview title was squeezed into half the card and broke inside the word: verified (a 112 px column in a 224 px card).
- Claim: before, the design page's actions and preview ran past the card: verified for Send to CLI, Fullscreen, Flat and Destructive; Open in Craft stayed inside.
- Claim: an empty growing item fills the other half and took width the title needed on a phone: partly inaccurate, the spacer only takes leftover width and on a phone its 32 px gap is what it cost (the non-blocking note).
- Claim: at 640 px and below the page drops the spacer and narrows the inset through the hook and breakpoint the form wizard uses, mobile first: verified.
- Claim: the rows wrap and the preview centres its rows, with no component change and no new styling dependency: verified.
- Claim: at 320 and 344 px the title goes from three lines with a broken word to two whole-word lines: verified.
- Claim: the design page goes from six buttons past the screen edge to none: verified as six past their card's edge, four of them past the screen edge, to none.
- Claim: both pages are pixel-identical at 1280 px and change at 390 px only by the same fixes: verified.
- Claim: prettier, eslint and the template tests pass: verified (66 test files, 297 tests).
- Claim: no new public API, default or interaction model, and no internal context: verified.
- File
.changeset/docs-pages-phone-fit.md: clear. - File
packages/cli/assets/templates/pages/documentation/page.tsx: the non-blocking comment note. - File
packages/cli/assets/templates/pages/documentation-design/page.tsx: clear.
54f1dba to
55e4a2f
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The head commit's message carries [skip ci], which keeps the push and pull-request workflows from starting on it.
At 320 px the overview hero's title now reads "Web / overview" in the default theme and every action and preview button on the design page stays inside its card, while 641 and 1280 px render pixel-identical to the base. This head rebases the same four commits onto the updated base branch, so the change itself is as before.
- Non-blocking: the comment above
isNarrowinpackages/cli/assets/templates/pages/documentation/page.tsxstill calls the spacer "the empty half" that keeps the text to a readable width, but afillStackItem only takes leftover width (0 px at 641 px and below, 178 px at 1280 px), so on a phone the gain comes from dropping its 32 px gap and the narrower inset; the open inline suggestion on that line keeps only that reason.
Claims and files checked
Review mode: full; reason: rebase
- Claim (release note): the documentation page templates fit a phone: verified at 320 px (whole-word title in the default theme, no button outside its card).
- Claim (release note): the overview hero gives its title the card's width: verified (a 176 px title column, the card's full content width at 320 px).
- Claim (release note): in the default theme the title no longer breaks inside a word: verified at 320 and 344 px, and at 320 and 375 px with a touch pointer.
- Claim (release note): the design page's actions and button previews wrap instead of running past their card: verified at 320 and 390 px.
- Claim (release note and description): wide screens look the same as before: verified once script runs (pixel-identical at 641 and 1280 px); a server-rendered page shows the phone hero until it hydrates, by the stated mobile-first choice.
- Claim: before, the overview title was squeezed into half the card and broke inside "overview": verified (a 112 px column in a 224 px card).
- Claim: other published themes can still break "overview" at 320 px: verified in stone.
- Claim: before, the design page's actions and button preview ran past the card and were cut off: verified for Send to CLI, Fullscreen, Flat and Destructive; Open in Craft stayed inside.
- Claim: after, the actions wrap under the example title and the preview's buttons wrap onto a second row: verified.
- Claim: an empty growing item fills the other half so the text keeps a readable width, and on a phone that half took width the title needed: inaccurate, the spacer only takes leftover width and on a phone its 32 px gap is what it cost (the non-blocking note).
- Claim: at 640 px and below the page drops the spacer and narrows the inset through the media-query hook the form wizard uses, mobile first: verified.
- Claim: each design row wraps and the preview centres its rows, with no component change and no new styling dependency: verified.
- Claim: at 320 and 344 px the title goes from three lines with "overview" broken to two lines of whole words: verified.
- Claim: the design page goes from six buttons past the screen edge to none: verified as six past their card's edge, four of them past the screen edge, to none.
- Claim: at 1280 px both pages are pixel-identical and at 390 px they change only by the same fixes: verified for 1280 px and for the design page at 390 px; the overview at 390 px takes the same inset and spacer switch as at 320 px.
- Claim: prettier, eslint and the template render and integration tests pass: verified (66 test files, 297 tests).
- Claim: no new public API, visual representation, default or interaction model, and no internal context: verified.
- File
.changeset/docs-pages-phone-fit.md: clear. - File
packages/cli/assets/templates/pages/documentation/page.tsx: the non-blocking comment note. - File
packages/cli/assets/templates/pages/documentation-design/page.tsx: clear.
5ac7076 to
4506975
Compare
55e4a2f to
f033aff
Compare
There was a problem hiding this comment.
Changes requested: the template code is correct and both pages now fit a 320 px phone, but two claims in the pull request's text are false at this head, so the fix is to correct that text and the comment that repeats one of them.
- Miss: the description's Evidence sentence says the overview title breaks at 344 px and that six buttons cross the screen edge, but on a 344 px page the base already shows "Web / overview" whole, and at 320 px four buttons cross the screen edge while six cross their card's edge, so it should read "At 320 px …" and "six buttons past their card's edge, four of them past the screen edge, to none".
- Miss: the description and the comment at
packages/cli/assets/templates/pages/documentation/page.tsx:213-216say the empty spacer holds the hero text to half the row, but afillStackItem only takes leftover width (0 px at 641 px, 178 px beside an 847 px text column at 1280 px), so apply the open suggestion on line 216 and describe the phone gain as the dropped 32 px gap and the narrower inset.
Both points were already present when this same patch was approved before the rebase, and that approval should have caught them.
Claims and files checked
Review mode: full; reason: rebase
- Release note: the documentation page templates fit a phone: verified at 320 px.
- Release note: the overview hero gives its title the card's width: verified (a 208 px title column, the card's full content width at 320 px).
- Release note: in the default theme the title no longer breaks inside a word: verified at 320 px, where the base breaks it, and at 344 px, where both are whole.
- Release note: the design page's actions and button previews wrap instead of running past their card: verified at 320 and 390 px.
- Release note and description: wide screens look the same as before: verified once script runs (pixel-identical at 641 and 1280 px); a server-rendered page shows the phone hero until it hydrates, by the stated mobile-first choice.
- Description: before, the overview title was squeezed into the card and broke inside "overview": verified at 320 px (a 144 px column in a 256 px card).
- Description: the other published themes can still break "overview" at 320 px: verified in stone.
- Description: before, the design page's actions and button preview ran past the card and were cut off: verified for Send to CLI, Fullscreen, Flat and Destructive; Open in Craft stayed inside.
- Description: after, the actions wrap under the example title and the preview's buttons wrap onto a second row: verified.
- Description: an empty growing item fills the other half of the hero so the text keeps a readable width, and on a phone that half took the title's width: false (second finding).
- Description: below 640 px the page drops the spacer and narrows the inset through the media-query hook the form wizard uses, mobile first: verified (the switch also applies at 640 px itself).
- Description: each design row now wraps and the preview centres its rows, with no component change and no new styling dependency: verified.
- Description: at 320 and 344 px the overview title goes from three broken lines to two whole lines: verified at 320 px, false at 344 px (first finding).
- Description: the design page goes from six buttons past the screen edge to none: false as stated, six past their card's edge and four past the screen edge (first finding).
- Description: at 1280 px both pages are pixel-identical, and at 390 px they change only by the same fixes: verified; the overview's 390 px change is the same inset and spacer switch as at 320 px.
- Description: prettier, eslint and the template render and integration tests pass: verified for prettier, eslint and the CLI template suite (67 files, 301 tests).
- Description: no new public API, visual representation, default or interaction model, and no internal context: verified.
- File
.changeset/docs-pages-phone-fit.md: clear. - File
packages/cli/assets/templates/pages/documentation/page.tsx: the spacer comment at lines 213-216 (second finding). - File
packages/cli/assets/templates/pages/documentation-design/page.tsx: clear.
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The head commit's message carries [skip ci], which keeps the push and pull-request workflows from starting on it.
The description and the comment above isNarrow now match what the code does, so both points from the last review are resolved. At 320 px the overview title reads "Web / overview" in the default theme and every design-page button stays inside its card, while 641 and 1280 px render pixel-identical to the base.
Claims and files checked
Review mode: incremental; reason: none
- Release note: the documentation page templates fit a phone: verified at 320 px.
- Release note: the overview hero gives its title the card's width: verified (a 208 px title column, the card's full content width at 320 px).
- Release note: in the default theme the title no longer breaks inside a word: verified at 320 px ("Web / overvie / w" on the base, "Web / overview" on the head).
- Release note: the design page's example actions and button previews wrap instead of running past their card: verified at 320 and 390 px.
- Release note and description: wide screens look the same as before: verified once script runs (pixel-identical at 641 and 1280 px); a server-rendered page shows the phone hero until it hydrates, by the stated mobile-first choice.
- Description: before, the hero title lost width to the spacer's gap and the card's wide inset and broke inside "overview": verified at 320 px (a 144 px column in a 256 px card).
- Description: after, the title uses the card's width and breaks only between words in the default theme, and other published themes can still break it at 320 px: verified (stone still breaks "overview").
- Description: before, each example's actions and the button preview ran past the card and were cut off: verified for Send to CLI, Fullscreen, Flat and Destructive; Open in Craft stayed inside.
- Description: after, the actions wrap under the example title and the preview's buttons wrap onto a second row: verified.
- Description: the spacer takes only leftover width, and on a phone its gap and the 40 px inset left the title too narrow: verified (0 px spacer at 641 px and below, 178 px beside an 847 px column at 1280 px, 32 px gap).
- Description: at 640 px and below the page drops the spacer and narrows the inset to 24 px through the media-query hook the form wizard uses, mobile first: verified; 640 px is the narrow breakpoint of the form wizard and settings dialog templates, while the other documentation templates switch at 768 px.
- Description: each design row now wraps and the preview centres its rows, with no component change and no new styling dependency: verified.
- Description: at 320 px the overview title goes from three broken lines to two whole lines, and the design page from six buttons past their card's edge (four past the screen edge) to none: verified.
- Description: at 1280 px both pages' main regions are pixel-identical once script runs, and at 390 px the overview takes the phone inset and drops the spacer while the design page changes only by the same wraps: verified.
- Description: prettier, eslint and the template render and integration tests pass: verified (CLI template suite, 67 files, 301 tests).
- Description: one defect restored, with no new public API, visual representation, default or interaction model and no internal context: verified.
- File
.changeset/docs-pages-phone-fit.md: clear. - File
packages/cli/assets/templates/pages/documentation/page.tsx: clear. - File
packages/cli/assets/templates/pages/documentation-design/page.tsx: clear.
- #12104 fix(templates): page templates keep their text on a 320 px phone Author: @josephfarina - #12734 fix(templates): the documentation page templates fit a phone Author: @josephfarina
|
Landed in #12879. |
User impact
Two documentation page templates broke on a phone:
Wide screens look the same as before.
Problem and solution fit
wrap="wrap"), so a control that does not fit moves to the next line, and the preview centers its rows.No component changes and no new styling dependency.
Evidence
Scope
Components: none (page templates only)
Testing
preflight: pass f898429 (checks at f033aff, same code; excused: copyright = untracked generated files on the test box; node tests = known environment-only files, and the release hand-off test passes alone)