Skip to content

fix(templates): the editor transactions table keeps names readable on a phone - #12315

Merged
josephfarina merged 2 commits into
mainfrom
josephfarina/editor-table-floor
Nov 17, 2026
Merged

josephfarina merged 2 commits into
mainfrom
josephfarina/editor-table-floor

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

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

  • Why does it squeeze? A Table column with no width gets 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.
  • Why does it matter? The names are the point of the table, and they become unreadable.
  • The fix: each column gets a floor, and its proportion matches that floor: name proportional(3, {minWidth: 180}), date and amount proportional(2, {minWidth: 120}), actions proportional(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:Table FR13: a column sets its own floor with proportional(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

  • Reproduction before the change: at 390 px, every column renders 82px wide, and with the icon beside it a name wraps a letter or two per line.
  • Result after the change: at 390 px the columns are 180/120/120/60 (480px). Names wrap at most once ("Blue Bottle / Coffee"), and the table scrolls sideways.
  • Desktop: at 768, 1024 and 1280 px the table fits its region (704/640/896px) with no scrollbar and no new keyboard stop. The columns share the width 3:2:2:1 instead of equally, so the name column is wider and the actions column narrower.
  • Checks: template prettier and eslint clean; the template package tests pass.

Scope

Components: editor template

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

  • Real browser (Chromium) at 390, 768, 1024 and 1280 px, in a Vite build of the template: column widths, region width and table width measured.

@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 17, 2026 11:59am UTC

Request Review

@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 17, 2026, 12:08 PM UTC

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

github-actions Bot commented Nov 17, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 2df84e5

Storybook · Sandbox · built from this PR's head

Package size: @astryxdesign/cli 5.33 MB packed (+163 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

@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 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 becomes 180 x 4 = 720px rather than 180 + 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 on main, 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 example proportional(180, {minWidth: 180}) for Transaction, proportional(96, {minWidth: 96}) for Date, proportional(88, {minWidth: 88}) for Amount and pixel(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 gains overflow-x: auto and 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.

Automated review (maintainer link)

@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: 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 main at 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.

Automated review (maintainer link)

@josephfarina
josephfarina merged commit 09d7045 into main Nov 17, 2026
80 checks passed
@github-actions
github-actions Bot deleted the josephfarina/editor-table-floor branch November 18, 2026 06:05

This branch was successfully deployed

1 active deployment
Preview — 2df84e51 Deployed Nov 17, 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