Skip to content

fix(table): a children-mode table scrolls instead of breaking words - #12709

Closed
josephfarina wants to merge 6 commits into
mainfrom
josephfarina/table-children-mode-narrow
Closed

josephfarina wants to merge 6 commits into
mainfrom
josephfarina/table-children-mode-narrow

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

User impact

A Table in children mode (TableHeader, TableBody, TableRow, TableCell) that has more columns than fit its container, such as a 12-column table on a 390 px phone, shrinks every column to fit. Words break letter by letter, and headings are cut to a few letters ("Thr…"). The table becomes hard to read on phones. A data-driven Table with the same columns keeps its 60 px column floors and scrolls inside its Scroll region instead of shrinking every column to fit.

Problem and solution fit

  • Why do the columns collapse? Children mode lays the table out with table-layout: auto. The header cells use the truncate style, which sets max-width: 0. The wrap cells also set max-width: 0, plus word-break: break-word. In automatic layout, these caps make every column contribute zero width, so the table never grows wider than its container.
  • Why does this harm the reader? Because the table cannot grow, the Scroll region never starts. The text then breaks wherever it must, and the headings are cut.
  • Why does that matter? Children mode is how authors compose tables by hand, and on a phone the table is the main content of the page.

When the cells wrap (the default), the fix removes the zero caps and the break at any letter, so the table takes the width its content needs and the existing Scroll region scrolls it. A table under textOverflow="truncate" keeps its header and body caps and lays out as before.

Expected behavior and authority

  • component:Table FR24 and DEC-6 (added here): in children mode with wrapping cells, each column takes the width its content needs, a word breaks only when it alone cannot fit its column, a header label stays on one line, and the Scroll region scrolls columns that do not fit. Under truncate, cells keep to the Table's box. Data-driven widths follow FR13.
  • component:Table FR1: Table renders one Scroll region around the table. FR13 and its "Width-less explicit columns" representative state say the existing Scroll region provides horizontal overflow when data-mode floors exceed the available space. Children mode now uses the same region in the same way.
  • component:TableCell FR2: a cell wraps or truncates its text per the Table's textOverflow.
  • component:TableHeaderCell FR2: a header cell truncates its text. It still does when its column is narrower than its label, which can happen in data mode.
  • component:Markdown DEC-6 (amended here): Markdown's table part no longer restyles Table's wrap defaults to undo the zero caps, because Table now sizes those columns from content. It keeps only what it adds: per-column floors on the text box, visible overflow, and header labels that wrap.

Smallest restoration

  • wrapStyles.cell keeps overflow: hidden and overflow-wrap: break-word. It drops max-width: 0 and word-break: break-word, so a word breaks only when it cannot fit its column.
  • When the table wraps, header cells use a new headerOverflowStyles.cell, which is the truncate style without max-width: 0. Under textOverflow="truncate", header cells keep overflowStyles.cell like the body cells.
  • A children-mode table under textOverflow="truncate" is unchanged: its header and body cells keep max-width: 0, so its columns stay within its box, with or without a header section.
  • Visible change beyond the narrow case: the columns of a wrapping children-mode table that already fits now follow their content instead of sharing the width equally. The changeset says so.
  • Wrap cells take their word-break from a private variable the table sets per layout: break-word in data mode, so a long token inside a fixed-width cell (a flex row with an avatar and an email, say) still wraps inside its cell, as before; normal in children mode, where the table also resets its own word-break, so one inherited from an ancestor such as a chat bubble cannot shrink a column below its longest word. Data-mode panel and empty-state rows read nothing new.
  • Markdown's table part drops its own copy of the same fix (max-width: none, word-break: normal and the cell's overflow-wrap), which now repeats Table; its tables lay out as before.
  • Data mode uses table-layout: fixed, which sets column widths from the column definitions. Neither max-width nor the minimum content width changes them, so data-mode tables keep their exact geometry.

Evidence

  • Reproduction before the change: a 12-column children-mode table at 390 px (342 px content box). The table is 342 px wide, columns are 31 to 57 px, words break mid-word, and headings are cut.
  • Result after the change: the same table lays out at about 824 to 882 px. It scrolls inside its Scroll region, every heading shows in full, and words stay whole.
  • Representative unchanged path: data-mode tables measure the same column widths at 390 px and 1280 px with and without the change (6- and 8-column tables).
  • Regression test or other mutation-sensitive proof: TableHeaderCell tests check that a children-mode header cell carries the zero cap under truncate, as the body cell does, and none under wrap, and that a children-mode table resets word-break while a data-mode table sets none of its own and gives only its wrap cells break-word. The new Core/Table story ChildrenModeNarrow has a play function that checks three things: the Scroll region scrolls, no heading is cut, and no cell breaks inside a word. The story play guard now runs it. On a Storybook built from the base it fails, and with this change it passes.

Scope

Components: Table, TableCell, TableHeaderCell, Markdown (its table part)

  • 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

  • pnpm exec vitest run --project ui packages/core/src/Table: all pass, including the new TableHeaderCell case.
  • Storybook build, then node .github/scripts/story-play-guard.js for core-table--children-mode-narrow, in real Chromium: it passes with the change and fails on the base.
  • pnpm exec vitest run --project ui packages/core/src/Table packages/core/src/Markdown packages/core/src/Chat: all pass.
  • pnpm check:knowledge: aligned.
  • prettier --check and eslint on the changed files.

Writing rubric results

Record rubric over component:Table FR24, its verification row, DEC-6 and the compatibility bullet and builder-impact cell it adds, and the amended component:Markdown DEC-6 paragraph:

  • R1 narration: present tense; each states what the component does.
  • R2 research: none.
  • R3 evidence: the verification row names the test file and the story, no pull request.
  • R4 rejected alternatives: Table DEC-6 records two (equal shares with caller widths; a Markdown-only fix). Markdown DEC-6 drops its rejected option that Table DEC-6 now decides.
  • R5 change references: none.
  • R6 open questions: none added.
  • R7 project status: none.

preflight: pass e92f9ff

A Table in children mode uses automatic table layout. Its header cells
kept the truncate style's zero max-width, and its wrap cells kept a zero
max-width and a break at any letter. In automatic layout that holds
every column at zero, so a table wider than its container shrank every
column until words broke letter by letter and headings were cut.

Header cells now truncate without the zero cap, and wrap cells break a
word only when it cannot fit. A children-mode table that does not fit
now scrolls inside its own box, as a data-driven Table does. Data mode
uses fixed layout, which sets column widths itself, so its columns do
not change.

The new ChildrenModeNarrow story's play checks the scroll, full headings
and whole words, and the story play guard now runs it.
@vercel

vercel Bot commented Nov 18, 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 19, 2026 11:29am UTC

Request Review

@astracat-bot

astracat-bot Bot commented Nov 18, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 11:45 AM UTC

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 18, 2026
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 18, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 4bf71aa

@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 wrap path is a clean fix: a children-mode table that does not fit now scrolls in its own Scroll region, with full headings and whole words, and the data-driven path is byte-identical (seven data-mode frames at 390px and 1280px match the base, and the generated public API delta is empty). Two things need a correction before this lands, both in the truncate path and the release note.

  • Under textOverflow="truncate" in children mode, body cells keep max-width: 0, so with the header cap gone each column takes exactly its heading's width: in a 318px box with six compact columns the Jobs column goes from 53px to 45px and 9,804 is ellipsised where the base showed it in full, and the same table without a TableHeader section is unchanged (53px columns, no scrolling) — carry the render mode in the table context and apply the zero cap only in data mode, where table-layout: fixed already sets the widths, or say in the release note that truncating tables are not covered.
  • The changeset says "A Table in children mode that is wider than its container scrolls inside its own box", which the truncating table above does not do, and the Scope checkbox "No new public API, visual representation, default, or interaction model is hidden under the bug-fix label" sits beside a re-layout of every children-mode table that already fits (the Children mode story moves from equal 416px columns to 272/653/323px) — name the wrapping scope and the new content-driven column widths in the note.

Non-blocking: the headerOverflowStyles JSDoc's second sentence is 31 words and narrates the old behavior; "There is no zero max-width: in automatic layout it would hold every column at zero width." keeps the constraint and drops the history.

Claims and files checked

Review mode: full; reason: no-earlier-review

  • Children mode lays out with automatic table layout, and the header and wrap cells capped their width at zero on the base — verified in both trees.
  • The Scroll region never started on the base for a narrow children-mode table, and does at this head — verified in Chromium on both trees.
  • The quoted Table, TableCell and TableHeaderCell contract claims — verified against the current records.
  • No knowledge record changes — verified.
  • Body cells under truncate are unchanged — false as stated: the declaration is unchanged, the rendered result is not.
  • Data-driven tables keep their exact geometry — verified, including a wrap column holding one unbreakable 69-character token.
  • The 12-column 390px before and after figures — not reproduced; the six-column reproduction agrees in kind.
  • The new story fails on the base and passes at this head — verified in substance by measuring its three assertions on both trees.
  • The Table suite (48 files, 906 tests) passes, and prettier and eslint are clean on the changed files — verified.
  • The static Storybook build with the story-play guard — not run here.
  • No new public API, visual representation or default is hidden — partly false: every children-mode table that already fits is re-laid out.
  • Public text carries no internal context — verified.
  • .changeset/table-children-mode-narrow.md — finding above.
  • .github/scripts/story-play-guard.js — clear; the listed story id matches the new story in Core/Table.
  • apps/storybook/stories/Table.stories.tsx — clear; the play assertions are mutation-sensitive for the wrap path and silent on truncate.
  • packages/core/src/Table/TableHeaderCell.tsx — clear; one import and one style slot.
  • packages/core/src/Table/table.stylex.ts — findings above.

Automated review (maintainer link)

Comment thread packages/core/src/Table/table.stylex.ts Resolved
Comment thread packages/core/src/Table/table.stylex.ts Resolved
@github-actions

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 4bf71aa

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
TableBody 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
TableFooter 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
TableHeader 3.5 kB (0) · 3.3 kB CSS (0) — ✓ · ✓ · ✗
8 more components
Component Size LoC Visual · A11y · RTL
TableRow 7.1 kB (0) · 4.0 kB CSS (−16 B) — ✓ · ✓ · ✗
lab/CommentThread 372.3 kB (+31 B) · 2.4 kB CSS (0) — — · — · —
Table 121.7 kB (+2 B) · 19.8 kB CSS (0) — ✓ · ✓ · —
lab/Comments 379.3 kB (+1 B) · 2.5 kB CSS (0) — — · — · —
TableSelectionToolbar 76.7 kB (0) · 14.1 kB CSS (0) — ✓ · ✓ · ✓
Markdown 205.3 kB (−5 B) · 22.1 kB CSS (0) — — · — · —
TableHeaderCell 104.4 kB (−9 B) · 19.1 kB CSS (0) — ✓ · ✓ · ✓
TableCell 104.6 kB (−13 B) · 19.3 kB CSS (0) — ✓ · ✓ · ✓

Package size: @astryxdesign/core 7.68 MB packed (+375 B); no new dependencies.

Touched components checked; for the full suites, add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.

CI impact: 0 job-min per update · pool 0% · standard runners · 1 CI action or script file changed (not measured)
Before After Change
Job-minutes per PR update 219 219 0
Runner pool, runner-minutes a day 71,349 71,349 0 (0%)
Average concurrent jobs 49.5 49.5 0
Time to green (median → this run) — — —
Runs a day 326 326 0

Not measured (the jobs that use these keep their recent minutes above): .github/scripts/story-play-guard.js.

Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.

Current run: CI concluded cancelled; parts of this report may be missing.


Generated by PR Enrichment workflow | View full report

@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 9a33c55

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026

@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 children-mode fix works: a wrapping hand-composed table that does not fit now scrolls in its own Scroll region with whole headings and words, and truncating and Markdown tables match the base pixel for pixel. The earlier truncate regression and the release-note wording are fixed. One correction remains:

  • word-break: break-word on the data-mode <table> (BaseTable.tsx:117) is inherited by the row-expansion panel and empty-state cells, so in a 320px data table an expanded row's HStack label "Artifact" now splits as "Artif / act" and the row grows from 53px to 73px where the base kept the word whole; limit the break to wrap body cells (for example a private per-layout custom property that wrapStyles.cell reads) and add a data-mode panel case to the tests.
Claims and files checked

Review mode: full; reason: spec-record

  • A wrapping children-mode table that does not fit now scrolls in its own box: verified in Chromium (527px of content in a 318px Scroll region, marked scrollable).
  • It no longer squeezes columns until words split and headings are cut: verified against the base (53px columns, five cut headings, three-line words).
  • Wrap is the children-mode default: verified in the table's default resolution.
  • Fitting children-mode columns now follow their content: verified (the Children mode story goes from 416/416/416px to 272/653/323px).
  • A truncating children-mode table keeps to its box and lays out as before: verified, pixel-identical with and without a header.
  • On the base, children mode used automatic layout with zero width caps on header and wrap cells: verified in the base source.
  • The cited Table, TableCell and TableHeaderCell contract claims: verified against the current records.
  • The new Table requirement and decision and the amended Markdown decision: owner-approved for this head.
  • The wrap cell keeps its overflow and overflow-wrap and drops the zero cap and the word break: verified.
  • Header cells use the new style when the table wraps and the truncating style otherwise: verified.
  • The data-mode table word-break keeps long tokens wrapping inside cells as before: true for cells, but it also reaches expanded-row and empty-state content (finding above).
  • The children-mode table word-break stops an inherited break from shrinking columns: verified inside an ancestor that sets one.
  • Markdown drops its copy of the fix and its tables lay out as before: verified, five Markdown table stories pixel-identical.
  • Data-mode tables keep their exact geometry: column widths verified identical in six stories; row geometry in expanded panels changes (finding above).
  • The 12-column 390px before and after figures: not reproduced; the six-column reproduction agrees in kind.
  • The new header-cell tests check the zero cap and the per-layout word break: verified; both fail on the base and pass on this head.
  • The new story's play checks fail on the base and pass on this head: verified in substance by measuring its three facts on both trees; the guard itself was not run here.
  • Table, Markdown and Chat unit tests pass, knowledge records are aligned, and prettier and eslint are clean: verified.
  • No new public API: verified, the generated API delta is empty.
  • No visual change hidden under the fix: the column change is named; the data-mode panel change is not (finding above).
  • Public text carries no internal context: verified.
  • .changeset/table-children-mode-narrow.md: clear.
  • .github/scripts/story-play-guard.js: clear; the story id matches.
  • apps/storybook/stories/Table.stories.tsx: clear.
  • docs/specs/components/Markdown/Markdown.spec.md: clear; the decider line is unchanged.
  • docs/specs/components/Table/Table.spec.md: clear.
  • packages/core/src/Markdown/Markdown.tsx: clear.
  • packages/core/src/Table/BaseTable.tsx: finding above.
  • packages/core/src/Table/TableHeaderCell.test.tsx: clear; no data-mode panel case.
  • packages/core/src/Table/TableHeaderCell.tsx: clear.
  • packages/core/src/Table/table.stylex.ts: clear; the earlier truncate finding is fixed.

Automated review (maintainer link)

Comment thread packages/core/src/Table/BaseTable.tsx Resolved
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 8824dd3

@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 run on this head yet.

A wrapping children-mode Table now keeps whole words and full headings and scrolls in its own box, while truncating, data-driven and Markdown tables measure as before. The earlier truncate-header and data-mode word-break problems are fixed, and two inline notes suggest tighter source comments.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • Release note: a wrapping children-mode Table scrolls in its own box instead of squeezing its columns. Verified: in a 320 px box the table grows from 318 to 527 px inside a 318 px Scroll region that reports it scrolls.
  • Release note: on the base, words break letter by letter and headings are cut. Verified: six 53 px columns, five cut headings and seven cells broken mid-word.
  • Release note: columns now follow their content instead of sharing the width equally. Verified: the Children mode story goes from 416/416/416 px to 272/653/323 px.
  • Release note: a truncating children-mode Table keeps its columns in its box and lays out as before. Verified: six 53 px columns on both trees, with and without a header section.
  • Release note: wrapping is the default. Verified: Table.tsx:344-345.
  • Description: automatic layout plus the two zero width caps make every column contribute nothing. Verified: BaseTable.tsx:849 and the base table.stylex.ts cap styles.
  • Description: a data-driven Table keeps its floors and scrolls. Verified: 60 px floors, a 360 px table in 318 px.
  • Description: a header still truncates when its column is narrower than its label. Verified in data mode at 60 px.
  • Description: wrap cells read word-break from a private per-layout variable, and children mode resets an inherited value. Verified: BaseTable.tsx:118, :125-126, and a fixture inside a break-word ancestor.
  • Description: panel and empty-state rows read nothing new. Verified: an expanded row measures the same on both trees.
  • Description: Markdown drops its own copy and its tables lay out as before. Verified: five Markdown tables measure the same on both trees.
  • Description: data-driven tables keep their column widths at narrow and wide sizes. Verified: four data-mode tables measure the same on both trees.
  • Description: the new header-cell tests check the caps and the per-layout word-break, and they fail on the base. Verified: both fail on the base and pass on the head.
  • Description: the new story's play function checks scrolling, headings and whole words, the play guard runs it, and it fails on the base. Verified: the play function finishes on the head, and its three checks fail on the base markup.
  • Description: a 12-column table at 390 px squeezes, then lays out at about 824-882 px. Consistent: that table is not in the pull request, and the 6-column story shows the same squeeze and scroll.
  • Description: the Table, Markdown and Chat tests pass, the knowledge check is aligned, and Prettier and ESLint are clean. Verified.
  • Description: no new public API. Verified: the generated API delta has zero rows.
  • Description: the public text has no internal context. Verified.

Files:

  • .changeset/table-children-mode-narrow.md: clear; non-blocking note on the [fix] tag
  • .github/scripts/story-play-guard.js: clear
  • apps/storybook/stories/Table.stories.tsx: clear
  • docs/specs/components/Markdown/Markdown.spec.md: clear
  • docs/specs/components/Table/Table.spec.md: clear
  • packages/core/src/Markdown/Markdown.tsx: clear; non-blocking comment suggestion
  • packages/core/src/Table/BaseTable.tsx: clear; non-blocking comment suggestion
  • packages/core/src/Table/TableHeaderCell.test.tsx: clear
  • packages/core/src/Table/TableHeaderCell.tsx: clear
  • packages/core/src/Table/table.stylex.ts: clear

Automated review (maintainer link)

Comment on lines +115 to +116
// Fixed layout sets the columns, so a wrap cell's long token may break at
// any letter to stay inside its cell, flex rows inside the cell included.

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.

Non-blocking (comment style): this is one 27-word sentence with two topics, over the 25-word limit for a description. Suggested:

// Fixed layout sets the columns. A long token in a wrap cell breaks at any
// letter to stay in its cell, also in a flex row.

* Data-driven `Table` keeps its released wrap mode; only Markdown's part is
* restyled.
* Table's wrapping columns already follow their content and scroll when they
* do not fit. The header wraps instead of truncating. Overflow stays visible.

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.

Miss (non-blocking, comment style): "The header wraps instead of truncating. Overflow stays visible." restates whiteSpace: 'normal' and overflow: 'visible' below. Keeping only the reason reads: "Table's wrapping columns already follow their content and scroll when they do not fit."

@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: one sentence of the description needs correcting, and the code, records and tests are otherwise ready.

  • Miss: The User impact paragraph says a data-driven Table with the same columns "does not have this problem". With the ChildrenModeNarrow headings and cells as data-driven columns in a 320 px box, the table keeps its 60 px floors and scrolls but still breaks six of twelve cells mid-word and cuts four of six headings, so please say it "keeps its 60 px column floors and scrolls inside its Scroll region instead of shrinking every column to fit".

A wrapping children-mode Table now keeps whole words and full headings and scrolls in its own box, while truncating, data-driven and Markdown tables measure as before. The earlier truncate-header and data-mode word-break problems are fixed, and two inline notes suggest tighter source comments. CI has not run on this head yet.

Claims and files checked

Review mode: full; reason: spec-record

Claims:

  • Release note: a wrapping children-mode Table scrolls in its own box instead of squeezing its columns. Verified: in a 320 px box the table grows from 318 to 527 px inside a 318 px Scroll region that reports it scrolls.
  • Release note: on the base, words break letter by letter and headings are cut. Verified: six 53 px columns, five cut headings and seven cells broken mid-word.
  • Release note: columns now follow their content instead of sharing the width equally. Verified: the Children mode story goes from 416/416/416 px to 272/653/323 px.
  • Release note: a truncating children-mode Table keeps its columns in its box and lays out as before. Verified: six 53 px columns on both trees, with and without a header section.
  • Release note: wrapping is the default. Verified: Table.tsx:344-345.
  • Description: automatic layout plus the two zero width caps make every column contribute nothing. Verified: BaseTable.tsx:849 and the base table.stylex.ts cap styles.
  • Description: a data-driven Table with the same columns does not have the problem, because it keeps its column floors and scrolls. False: it keeps 60 px floors and scrolls, but it still breaks six of twelve cells mid-word and cuts four of six headings (finding above).
  • Description: a header still truncates when its column is narrower than its label. Verified in data mode at 60 px.
  • Description: wrap cells read word-break from a private per-layout variable, and children mode resets an inherited value. Verified: BaseTable.tsx:118, :125-126, and a fixture inside a break-word ancestor.
  • Description: panel and empty-state rows read nothing new. Verified: an expanded row measures the same on both trees.
  • Description: Markdown drops its own copy and its tables lay out as before. Verified: five Markdown tables measure the same on both trees.
  • Description: data-driven tables keep their column widths at narrow and wide sizes. Verified: four data-mode tables measure the same on both trees.
  • Description: the new header-cell tests check the caps and the per-layout word-break, and they fail on the base. Verified: both fail on the base and pass on the head.
  • Description: the new story's play function checks scrolling, headings and whole words, the play guard runs it, and it fails on the base. Verified: the play function finishes on the head, and its three checks fail on the base markup.
  • Description: a 12-column table at 390 px squeezes, then lays out at about 824-882 px. Consistent: that table is not in the pull request, and the 6-column story shows the same squeeze and scroll.
  • Description: the Table, Markdown and Chat tests pass, the knowledge check is aligned, and Prettier and ESLint are clean. Verified.
  • Description: no new public API. Verified: the generated API delta has zero rows.
  • Description: the public text has no internal context. Verified.

Files:

  • .changeset/table-children-mode-narrow.md: clear; non-blocking note on the [fix] tag
  • .github/scripts/story-play-guard.js: clear
  • apps/storybook/stories/Table.stories.tsx: clear
  • docs/specs/components/Markdown/Markdown.spec.md: clear
  • docs/specs/components/Table/Table.spec.md: clear
  • packages/core/src/Markdown/Markdown.tsx: clear; non-blocking comment suggestion
  • packages/core/src/Table/BaseTable.tsx: clear; non-blocking comment suggestion
  • packages/core/src/Table/TableHeaderCell.test.tsx: clear
  • packages/core/src/Table/TableHeaderCell.tsx: clear
  • packages/core/src/Table/table.stylex.ts: clear

Automated review (maintainer link)

Comment on lines +115 to +116
// Fixed layout sets the columns, so a wrap cell's long token may break at
// any letter to stay inside its cell, flex rows inside the cell included.

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.

Non-blocking (comment style): this is one 27-word sentence with two topics, over the 25-word limit for a description. Suggested:

// Fixed layout sets the columns. A long token in a wrap cell breaks at any
// letter to stay in its cell, also in a flex row.

* Data-driven `Table` keeps its released wrap mode; only Markdown's part is
* restyled.
* Table's wrapping columns already follow their content and scroll when they
* do not fit. The header wraps instead of truncating. Overflow stays visible.

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.

Miss (non-blocking, comment style): "The header wraps instead of truncating. Overflow stays visible." restates whiteSpace: 'normal' and overflow: 'visible' below. Keeping only the reason reads: "Table's wrapping columns already follow their content and scroll when they do not fit."

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec e92f9ff

@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 run on this head yet.

A wrapping children-mode Table now keeps whole words and full headings and scrolls inside its own box, while truncating, data-driven and Markdown tables render as before. The corrected data-driven sentence in the description now matches what that table does, and the new registry entry fixes the theme test that fails without it.

Optional, non-blocking:

  • The changeset tags the whole change [fix]; the narrow-table correction fits that, but the fitting-table re-layout is an intentional visual change that the release-note rules tag [feat], so choose which tag leads.
  • Two source comments could be tighter, as the open inline notes on BaseTable.tsx and Markdown.tsx suggest.
Claims and files checked

Review mode: incremental; reason: none

Claims:

  • Release note: a wrapping children-mode Table scrolls inside its own box when it does not fit, as a data-driven one does. Verified: in a 320 px box the table grows to 527 px inside a 318 px Scroll region that reports it scrolls; the data-driven table scrolls 360 px in 318 px.
  • Release note: before, every column shrank until words broke letter by letter and headings were cut. Verified on the base: six 53 px columns, seven broken words, five cut headings.
  • Release note: columns now follow their content instead of sharing the width equally. Verified: the Children mode story moves from 416/416/416 px to 272/653/323 px.
  • Release note: a truncating children-mode Table keeps its columns in its box and lays out as before. Verified: identical frames on both trees, with and without a header section.
  • Release note: wrapping is the default. Verified: BaseTable.tsx:858-860.
  • Description: a data-driven Table with the same columns keeps its 60 px floors and scrolls instead of shrinking every column. Verified: six 60 px columns, 360 px of table scrolling in 318 px.
  • Description: automatic layout plus the zero caps make every column contribute nothing, so the Scroll region never starts. Verified: the base table stays 318 px and its region does not scroll.
  • Description: the fix removes the caps and the any-letter break, and a truncating table keeps its header and body caps. Verified: table.stylex.ts:51-60, TableHeaderCell.tsx:192-194, and computed max-width: 0 under truncate on both trees.
  • Description: a header still truncates where its column is narrower than its label. Verified: four data-mode headings end in an ellipsis at 60 px.
  • Description: wrap cells read word-break from a private per-layout variable, children mode resets an inherited value, and panel and empty-state rows read nothing new. Verified: BaseTable.tsx:118, :125-126, only wrapStyles reads the variable, and a table inside a break-word ancestor keeps whole words.
  • Description: a long token in a fixed-width flex-row cell still wraps inside its cell. Verified: identical frames on both trees, 159 px cells.
  • Description: Markdown drops its own copy and its tables lay out as before. Verified: two Markdown tables render identical frames on both trees.
  • Description: data-driven tables keep their exact geometry. Verified for two tables at 320 px; the 390 px, 1280 px and 8-column fixtures are not in the pull request.
  • Description: the new header-cell tests check the caps and the per-layout word-break, and they fail on the base. Verified: both fail on the base and pass on the head.
  • Description: the new story's play function checks scrolling, headings and whole words, the play guard runs it, and it fails on the base. Verified: it throws on the base markup and finishes without error on the head; the guard lists it.
  • Description: a 12-column table at 390 px squeezes, then lays out at about 824-882 px. Consistent: that table is not in the pull request, and the 6-column story shows the same squeeze and scroll.
  • Description: the Table, Markdown and Chat tests pass, the knowledge check is aligned, and Prettier and ESLint are clean. Verified.
  • Description: no new public API. Verified: the generated API comparison lists no rows.
  • Description: the records' rubric results (a verification row naming the test and story, two rejected options in Table DEC-6, Markdown DEC-6 dropping the option Table now decides). Verified.
  • Description: the public text has no internal context. Verified.

Files:

  • .changeset/table-children-mode-narrow.md: clear; non-blocking note on the [fix] tag
  • .github/scripts/story-play-guard.js: clear
  • apps/storybook/stories/Table.stories.tsx: clear
  • docs/specs/components/Markdown/Markdown.spec.md: clear
  • docs/specs/components/Table/Table.spec.md: clear
  • packages/core/src/Markdown/Markdown.tsx: clear; non-blocking comment suggestion
  • packages/core/src/Table/BaseTable.tsx: clear; non-blocking comment suggestion
  • packages/core/src/Table/TableHeaderCell.test.tsx: clear
  • packages/core/src/Table/TableHeaderCell.tsx: clear
  • packages/core/src/Table/table.stylex.ts: clear
  • packages/core/src/theme/derivedVarRegistry.test.ts: clear

Automated review (maintainer link)

josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12709 fix(table): a children-mode table scrolls instead of breaking words
  Author: @josephfarina
- #12589 fix(Switch): the thumb rests as far from the track's end as from its top and bottom
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12908.

@github-actions
github-actions Bot deleted the josephfarina/table-children-mode-narrow branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — e92f9ff3 Deployed Nov 19, 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. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant