Repository navigation
fix(templates): the editor transactions table keeps names readable on a phone - #12315
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested. The phone fix works - at 390px the name column goes from 82px to 180px and "Blue Bottle Coffee" wraps twice instead of twelve times - but the same floor changes widths the description does not cover, so one adjustment is needed before this is ready.
width: proportional(1, {minWidth: 180})sits beside three width-less columns, so the table's minimum width becomes180 x 4 = 720pxrather than180 + 60 + 60 + 60; measured in Chromium, a 1024px window renders the table at 720px inside a 640px region, so the region gains a horizontal scrollbar and a keyboard stop and the trailing 80px of the action column is cut (it fits at 640px onmain, with names already wrapping at most twice), and a 768px window overflows by 16px. Give every column a floor that adds up instead of one that multiplies - for exampleproportional(180, {minWidth: 180})for Transaction,proportional(96, {minWidth: 96})for Date,proportional(88, {minWidth: 88})for Amount andpixel(56)for the action column - which keeps the phone result and leaves 768px and 1024px fitting as they do today.
Two smaller notes: the Evidence line "at 390 px, the name column is about 60px wide" states the floor, not the rendered width, which measures 82px; and the changeset describes only the phone outcome, so it is worth saying that the table also scrolls sideways on narrower desktop windows once the widths are settled. At 1280px the table renders pixel-identically to main, as the description says.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims:
- Release note: the name column has a 180px floor, so the table scrolls sideways instead of squeezing names to a letter or two per line - verified for a phone (390px: 180px column, names wrap at most once), but incomplete: the same floor also makes the table scroll between about 769px and 1104px.
- On a phone every column was squeezed and a name wrapped one or two letters per line - verified (390px on
main: 82px column, the first name on 12 lines). - A column with no width takes an equal share with a 60px floor - verified in Table's width resolution.
- The name cell holds an icon, a gap and two lines of text - verified in the template's cell renderer.
- The Table docs advise a per-column floor for a text-heavy column - verified in Table's shipped guidance.
- Table's contract lets a column set its own floor with
proportional(value, {minWidth}), and its scroll region takes over when floors no longer fit - verified in the current record and in the browser (the region gainsoverflow-x: autoand a keyboard stop). - Evidence: at 390px the name column is about 60px wide - false as stated; it measures 82px.
- Evidence: after the change names wrap at most once and Amount is one swipe away - verified at 390px (Amount sits at 360-540px in a 326px region).
- Evidence: at 1280px the table renders identically before and after - verified; the frames are pixel-identical.
- Evidence: template typecheck and lint - verified; the template typechecks at both revisions and the changed file lints clean.
Files:
.changeset/editor-template-name-floor.md- clear as a patch note for the CLI package; its wording covers only the phone outcome.packages/cli/assets/templates/pages/editor/page.tsx- the finding above; the import, the comment and the rest of the template are consistent with it.
There was a problem hiding this comment.
Approved pending CI: CI has not finished on this head yet.
Every column now has a floor whose share matches it, so the table needs 480px: on a 390px phone names wrap at most once and the table scrolls sideways, while 768px, 1024px and 1280px windows fit with no scrollbar, which resolves the earlier 720px minimum. The release note and the description match what the template renders.
Claims and files checked
Review mode: incremental; reason: none
Claims:
- Release note: each column now has a floor (name 180px, date and amount 120px, actions 60px) whose share matches it - verified in the template's four column widths.
- Release note: the table needs at least 480px - verified; the table's computed minimum width is 480px.
- Release note: narrower than that, such as on a phone, the table scrolls sideways instead of squeezing names - verified at 390px (the scroll region scrolls; names take one or two lines).
- Release note: windows that give the table 480px or more do not scroll, with a larger name column and a smaller actions column - verified at 768px, 1024px and 1280px.
- On a phone every column was squeezed and names wrapped a letter or two per line - verified on
mainat 390px (82px columns, 10 to 15 lines per name). - A column with no width gets an equal share with a 60px floor - verified in Table's width resolution.
- The name cell holds an icon, a gap and two lines of text - verified in the template's cell renderer.
- With each share matching its floor, the minimum is the sum of the floors, 480px, and the scroll region takes over below it - verified in Table's width resolution and in the browser.
- Table's contract lets a column set its own floor, and its docs advise against relying on the 60px floor for a text-heavy column - verified in the current Table record and docs.
- Only the template's column widths change, with no Core change - verified; the diff is the template and a release note.
- Before: at 390px every column renders 82px wide - verified.
- After: at 390px the columns are 180/120/120/60 (480px), names wrap at most once, and the table scrolls - verified.
- Desktop: at 768px, 1024px and 1280px the table fits its 704px, 640px and 896px region with no scrollbar and no new keyboard stop, sharing the width 3:2:2:1 - verified.
- Template formatting and lint are clean and the template tests pass - verified (prettier, eslint, 52 template command tests; the page also typechecks).
- Scope checklist: one defect restored, no new public API, default or interaction model, no internal context - verified.
Files:
.changeset/editor-template-name-floor.md- clear; an accurate patch note for the CLI package.packages/cli/assets/templates/pages/editor/page.tsx- clear; the widths, import and comment agree with the release note.
User impact
On a phone, the editor template's "Recent Transactions" table squeezed every column into the card, so a name like "Blue Bottle Coffee" wrapped one or two letters per line. Now the name column keeps a readable width, and the table scrolls sideways when its columns no longer fit.
Problem and solution fit
widthgets an equal share with a 60px floor. The name cell holds an icon, a gap and two lines of text, so 60px leaves room for about two letters.proportional(3, {minWidth: 180}), date and amountproportional(2, {minWidth: 120}), actionsproportional(1, {minWidth: 60}). A proportional table's minimum is the largest floor ÷ share, so with matching shares the floors add up to 480px instead of multiplying. Below 480px the Table's existing scroll region takes over.Expected behavior and authority
component:TableFR13: a column sets its own floor withproportional(value, {minWidth}). The Table docs say not to rely on the 60px floor for a text-heavy column.Smallest restoration
Four column widths in
packages/cli/assets/templates/pages/editor/page.tsx. No Core change.Evidence
Scope
Components: editor template
Testing