Skip to content

feat(Table): column headings follow the Table's textOverflow - #12843

Closed
josephfarina wants to merge 1 commit into
mainfrom
josephfarina/table-header-follows-overflow
Closed

josephfarina wants to merge 1 commit into
mainfrom
josephfarina/table-header-follows-overflow

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #12843 → #12924

Record change: component:TableHeaderCell FR2 — a header cell wraps or truncates its heading by the Table's textOverflow, like component:TableCell FR2 (was: always truncates). Children mode keeps component:Table FR24: under wrap, a column grows to keep its heading on one line. Needs an exact-head /approve-spec.

User impact

On a phone, a data table whose columns are narrower than their headings cuts the headings to an ellipsis: a four-column comparison table at 390 px shows "Apple N…", while the body cells under it wrap and stay readable. The reader loses what the column is, which is the one word the table cannot do without. Agent-built pages hit this often, because width-less columns share the screen equally. With this change the heading wraps onto a second line under the default textOverflow="wrap", the same way the body cells already do. Tables that ask for textOverflow="truncate" keep one-line headings with an ellipsis.

Problem and solution fit

  • Why are headings cut? The header cell always applied the single-line truncation style (white-space: nowrap, ellipsis), whatever the Table's textOverflow was.
  • Why does that harm the reader? Column floors are static (Table DEC-2), so on a narrow screen a column can be narrower than its heading, and nothing lets the heading show in full; a non-interactive header has no tooltip either.
  • Why does it matter? Body cells already wrap in the default mode, so the header row was the one row that hid content. Following the same mode is the consistent rule and hides nothing.

The fix changes the header cell's style under wrap: it takes the table's --_table-header-white-space, which a data-driven table sets to normal and a children-mode table to nowrap (FR24). Column widths and floors do not change.

Expected behavior and authority

  • component:TableHeaderCell FR2 (changed here): the heading follows the Table's textOverflow; under truncate, the keyboard-focus tooltip for a cut heading works as before.
  • component:TableCell FR2: cells wrap or truncate by the Table's textOverflow.
  • component:Table FR13 and DEC-2 are unchanged: floors never come from content.

Smallest change

  • Table.tsx: the textOverflow JSDoc says header cells follow the same mode.
  • TableHeaderCell.tsx + table.stylex.ts + BaseTable.tsx: under wrap the header cell takes the table's --_table-header-white-space (normal in a data-driven table's fixed layout, nowrap in a children-mode table's automatic layout, so FR24's one-line headings and content-sized columns hold); overflowStyles under truncate; the cut-heading tooltip is enabled only under truncate, so a wrapping header measures nothing.
  • Table.doc.mjs: the textOverflow prop line says header cells follow the same mode (windowed tables default to truncate, so their headings still truncate).
  • TableHeaderCell.spec.md: FR2, its verification rows, and the Compatibility and migration lines for the new default (a long heading wraps).
  • share-a-page.doc.mjs (export guide, @astryxdesign/cli changeset): the column-floor line says a header wraps like the cells, so a floor must fit the header's longest word.
  • A HeadingOverflow story (the same table under wrap, sortable under wrap, and under truncate) for the browser check.

Evidence

  • Reproduction before the change: TableHeadingOverflow.a11y.chromium.spec.ts fails on the base at 390 px (the heading cell computes white-space: nowrap and "Apple Notes" is cut).
  • Result after the change: both browser cases pass. At 390 px every default-mode heading shows in full and "Apple Notes" takes two lines, in a plain and in a sortable table (the sort indicator stays inside its cell); the truncate-mode table still cuts it with an ellipsis.
  • Representative unchanged path: at 1280 px, 112 of the 113 Table stories (every Table, Table plugin and Table pattern story) are pixel-identical to the base in full-page screenshots, HeadingOverflow included. The one difference is the Props table pattern's 360 px container, where the "Description" heading sits in a 60 px column and now wraps instead of ending in "Descr…".
  • Regression tests: TableHeaderCell.test.tsx (wrap and truncate declarations, in data mode and children mode), TableHeaderCell.truncationTooltip.test.tsx (the tooltip cases now run under truncate; a wrapping header shows no tooltip on keyboard focus; nothing is measured at rest).

Scope

Components: Table

  • One recorded behavior changes: column headings follow textOverflow (record FR2, changeset [feat]).
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API; the visible default for a heading that does not fit changes from an ellipsis to wrapping, as the record now says.
  • Public text and artifacts contain no internal Meta context.

Writing rubric results

  • R1 narration: none; FR2 states the present behavior.
  • R2 research: none in the record.
  • R3 evidence: the new verification row cites tests and a browser check.
  • R4 rejected alternatives: none added.
  • R5 change references: none.
  • R6 open questions: none.
  • R7 project status: none; the old "Gap: truncation ... no check" note now reads "Gap: edge alignment has no check", since truncation has a check.

Testing

  • CI=1 vitest run --project ui packages/core/src/Table/ packages/core/src/theme/derivedVarRegistry.test.ts — 51 files, 1096 tests pass; Table + Markdown suites 2401 pass.
  • Changeset coverage (scripts/release/changeset-coverage.mjs pr): ships to @astryxdesign/cli and @astryxdesign/core, each named.
  • playwright test --project=chromium TableHeadingOverflow TableScroll.a11y TableFocusRing on a built Storybook — pass; TableHeadingOverflow fails on the base.
  • check:knowledge, check:changesets, eslint and prettier on the touched files, and the core typecheck all pass.

preflight: pass ccf57fe (top of stack #12843 8b33179 → #12924; env-only fails excused: setup-workspace fixture install, packed-gather-cache.records, handoff.e2e, each failing the same way at the merge base on the preflight box; review: no blocking findings, owner question = exact-head /approve-spec on #12843 for the FR2 record change)

@vercel

vercel Bot commented Nov 19, 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 4:05pm UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 19, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026
@astracat-bot

astracat-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Nov 19, 2026, 4:24 PM UTC

@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.

Approval waits on an engineering owner's decision on the proposed component:TableHeaderCell FR2 change: the record says a header cell inside a Table truncates its text, and this pull request makes headings wrap under the default textOverflow="wrap" (truncating only under truncate). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; otherwise the record keeps its current wording. Separately, one fix is needed before approval:

  • The record still says the cut-heading tooltip is the only change and that no styling output changes at rest (TableHeaderCell.spec.md lines 47, 64-67 and 174-175), so name the default heading's switch from an ellipsis to wrapping there as well.

The behaviour itself checks out: the new wrap-mode tests fail on main and pass here, the whole Table test directory passes, and at 390 px default-mode headings wrap while truncate tables keep their ellipsis.

Claims and files checked

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

Claims:

  • Changeset: headings follow the Table's text overflow mode like body cells — verified (TableHeaderCell.tsx:172, :190; the new wrap-mode tests fail on the base and pass here).
  • Changeset: under the default wrap a long heading wraps instead of ending in an ellipsis — verified (390 px Chromium probe: two lines, nothing cut).
  • Changeset: under truncate, headings stay on one line with an ellipsis — verified (probe and TableHeaderCell.test.tsx:188).
  • At 390 px the comparison table cut its longest heading while body cells wrapped — verified (base frame).
  • The header cell always applied single-line truncation — verified (base TableHeaderCell.tsx:188).
  • Column floors are static and widths do not change — verified (Table floor rule; probed widths identical on base and head).
  • A non-interactive header has no tooltip — verified (current record text).
  • Body cells already wrap in the default mode — verified (TableCell.tsx:235).
  • The tooltip is enabled only under truncate, so a wrapping header measures nothing — verified (TableHeaderCell.tsx:177; tooltip tests pass).
  • The doc line says header cells follow the same mode — verified (Table.doc.mjs:238).
  • The record's FR2 and verification rows are updated — verified.
  • The visible default changes "as the record now says" — false for the record's compatibility section and decision log (finding above).
  • The browser spec fails on the base and passes here — consistent with this review's probes of the same story (base cuts the heading, head wraps it); the spec itself was not run.
  • 112 of 113 Table stories are pixel-identical at 1280 px, and only the Props table pattern changes — partly checked: of five stories compared, the Props table pattern changes as described and three are identical; the rest were not compared.
  • The Table test directory passes, 48 files and 909 tests — verified.
  • Knowledge, changeset, lint, formatting and Core typecheck checks pass — verified.
  • No new public API — verified (generated surface unchanged for Core and the seven themes).
  • Public text carries no internal context — verified.

Files:

  • .changeset/table-heading-follows-overflow.md — clear
  • apps/storybook/stories/Table.stories.tsx — clear
  • docs/specs/components/Table/TableHeaderCell.spec.md — FR2 change awaits an owner; stale compatibility lines (finding)
  • packages/core/src/Table/Table.doc.mjs — clear
  • packages/core/src/Table/TableHeaderCell.test.tsx — clear
  • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx — clear
  • packages/core/src/Table/TableHeaderCell.tsx — clear (one non-blocking comment suggestion)
  • packages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts — clear

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.

Approval waits on an engineering owner's decision on the proposed component:TableHeaderCell FR2 change: the record says a header cell inside a Table truncates its text, and this pull request makes headings wrap under the default textOverflow="wrap" (truncating only under truncate). An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; otherwise the record keeps its current wording. Separately, one fix is needed before approval:

  • Miss: the new FR2 overflow verification row (TableHeaderCell.spec.md line 170) lists children mode as covered, but both checks it cites render data mode only, so add a children-mode case to the two overflow-mode tests in TableHeaderCell.test.tsx or drop children mode from the row.

The earlier record fix is in, and the behaviour checks out in data mode, children mode and with sort controls, with the new wrap tests failing on main and passing here.

Claims and files checked

Review mode: full; reason: history

Claims:

  • Changeset: a Table's column headings follow its text overflow mode, like the body cells — verified (TableHeaderCell.tsx:170, :188; the new wrap tests fail on the base and pass here).
  • Changeset: under the default wrap, a heading longer than its column wraps instead of ending in an ellipsis, so on a phone each column still says what it holds — verified (390 px probe: two lines, nothing cut).
  • Changeset: under truncate, headings stay on one line with an ellipsis, as before — verified (probe; TableHeaderCell.test.tsx:188).
  • The record change makes a header cell wrap or truncate by the Table's text overflow mode, like body cells, and needs an exact-head spec approval — verified (record FR2 at line 110); no approval at this head yet.
  • At 390 px a four-column comparison table cut its longest heading while the body cells wrapped — verified (base frame).
  • Pages built by agents hit this often because columns without widths share the screen equally — equal sharing verified (four 90 px columns); how often it happens is not checkable.
  • The header cell always applied single-line truncation, whatever the Table's mode — verified (base TableHeaderCell.tsx:188).
  • Column floors are static, so a narrow column cannot widen for its heading — verified (Table floor rule; probed widths identical on base and head).
  • A header that is not interactive has no tooltip — verified (current record text).
  • Body cells already wrap in the default mode — verified (TableCell.tsx:235).
  • The fix picks the header style from the Table's mode, as body cells do, and changes no column width or floor — verified.
  • Under truncate, the keyboard tooltip for a cut heading works as before — verified (tooltip tests pass under truncate).
  • The tooltip is enabled only under truncate, so a wrapping header measures nothing — verified (TableHeaderCell.tsx:175; tooltip tests).
  • The doc line for the text overflow prop says header cells follow the same mode — verified (Table.doc.mjs:238; the prop's JSDoc in Table.tsx:95-101 too).
  • The record's FR2 and its verification rows are updated — verified, but the new row claims children-mode coverage its checks lack (finding above).
  • A new story shows the same table in both modes for the browser check — verified (Table.stories.tsx).
  • The browser spec fails on the base at 390 px and both of its cases pass here — consistent with this review's probes of the same markup (base no-wrap and cut; head wraps; truncate still cut); the spec itself was not run.
  • At 1280 px, 112 of the 113 Table, Table plugin and Table pattern stories are pixel-identical to the base, and the one difference is the Props table pattern's narrow Description heading — verified (full-page sweep: 111 of 112 shared stories identical, the Props table pattern changed; the new story's copy is identical at 1280 px).
  • Unit tests cover the wrap and truncate declarations, the tooltip cases now run under truncate, a wrapping header shows no tooltip on keyboard focus, and nothing is measured at rest — verified (2 new tests fail on the base, all pass here).
  • One defect is restored and nothing unrelated rides along — verified.
  • No new public API, and the visible default for a heading that does not fit changes from an ellipsis to wrapping, as the record now says — verified (generated surface unchanged; record compatibility section).
  • Public text and artifacts carry no internal context — verified.
  • Writing rubric: the record's old truncation gap note now names only edge alignment — verified (record line 168).
  • The Table test directory passes, 48 files and 909 tests — verified.
  • The browser specs pass on a built Storybook — not run here (needs a static Storybook build); this review's probes cover the same properties.
  • Knowledge, changeset, lint and formatting checks on the touched files and the Core typecheck pass — verified.

Files:

  • .changeset/table-heading-follows-overflow.md — clear
  • apps/storybook/stories/Table.stories.tsx — clear
  • docs/specs/components/Table/TableHeaderCell.spec.md — FR2 change awaits an engineering owner; the verification row overstates children-mode coverage (finding); earlier compatibility finding fixed
  • packages/core/src/Table/Table.doc.mjs — clear
  • packages/core/src/Table/Table.tsx — clear
  • packages/core/src/Table/TableHeaderCell.test.tsx — clear (data mode only, see the finding)
  • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx — clear
  • packages/core/src/Table/TableHeaderCell.tsx — clear
  • packages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts — clear

Automated review (maintainer link)

@josephfarina josephfarina changed the title fix(Table): column headings follow the Table's textOverflow feat(Table): column headings follow the Table's textOverflow Nov 19, 2026
@josephfarina
josephfarina force-pushed the josephfarina/table-header-follows-overflow branch from 8db4bd5 to dd4dcfe Compare November 19, 2026 09:13

@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.

Approval waits on an engineering owner's decision on the proposed component:TableHeaderCell FR2 change: the record says a header cell inside a Table truncates its text, and this pull request makes headings wrap under the default textOverflow="wrap", truncating only under truncate. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; otherwise the record keeps its current wording.

No other fix is required: the verification row now has a children-mode test behind it, and the behaviour checks out in data mode, children mode and with sort controls. One optional record fix:

  • Non-blocking: PR1 in TableHeaderCell.spec.md (lines 134-137) still says the tooltip module loads after the first render, but a wrapping header now loads nothing; "under truncate, the Tooltip module loads after the first render" keeps it exact.
Claims and files checked

Review mode: full; reason: history

Claims:

  • Changeset: a Table's column headings follow its text overflow mode, like the body cells — verified (TableHeaderCell.tsx:170, :188; the new wrap tests fail on the base and pass here).
  • Changeset: under the default wrap, a heading longer than its column wraps instead of ending in an ellipsis, so on a phone each column still says what it holds — verified (390 px probe: two lines, nothing cut).
  • Changeset: under truncate, headings stay on one line with an ellipsis, as before — verified (probe; TableHeaderCell.test.tsx:218).
  • The record change makes a header cell wrap or truncate by the Table's mode, like body cells, and needs an exact-head spec approval — verified (record FR2, line 110); no approval at this head yet.
  • At 390 px a four-column comparison table cut its longest heading while the body cells wrapped — verified (base frame).
  • Agent-built pages hit this often because columns without widths share the screen equally — equal sharing verified (four 90 px columns); how often it happens is not checkable.
  • The header cell always applied single-line truncation, whatever the Table's mode — verified (base TableHeaderCell.tsx:188).
  • Column floors are static, so a narrow column cannot widen for its heading — verified (Table floor rule; probed widths identical on base and head).
  • A header that is not interactive has no tooltip — verified (current record text).
  • Body cells already wrap in the default mode — verified (TableCell.tsx:235).
  • The fix picks the header style from the Table's mode, as body cells do, and changes no column width or floor — verified.
  • Under truncate, the keyboard tooltip for a cut heading works as before — verified (the tooltip tests pass under truncate).
  • The tooltip is enabled only under truncate, so a wrapping header measures nothing — verified (TableHeaderCell.tsx:175; tooltip test at line 140).
  • The prop's JSDoc and doc line say header cells follow the same mode — verified (Table.tsx:101, Table.doc.mjs:238).
  • The record's FR2, verification rows and compatibility lines are updated — verified; PR1 still describes the tooltip module in every mode (non-blocking note above).
  • A new story shows the same table in both modes for the browser check — verified (Table.stories.tsx).
  • The browser spec fails on the base at 390 px and both of its cases pass here — consistent with probes of the same markup (base no-wrap and cut; here wraps; truncate still cut); the spec itself was not run.
  • At 1280 px only the Props table pattern's narrow Description heading changes among the Table stories — consistent with the stories captured (the new story identical at 1280 px, the children-mode and sortable stories identical, the Props table pattern changed); the full sweep was not repeated.
  • Unit tests cover wrap and truncate in data and children mode, the tooltip cases run under truncate, a wrapping header shows no tooltip, and nothing is measured at rest — verified (3 new tests fail on the base; all 32 pass here).
  • One recorded behaviour changes, with a feature changeset — verified.
  • No new public API; the visible default for a heading that does not fit changes from an ellipsis to wrapping — verified (generated surface unchanged; record compatibility section).
  • Public text carries no internal context — verified.
  • Writing rubric: the record's old truncation gap note now names only edge alignment — verified (record line 168).
  • The Table test directory passes, 48 files and 909 tests — verified at 48 files and 910 tests here (the count predates the added children-mode test); the two header-cell files pass all 32.
  • Knowledge, changeset, lint and formatting checks on the touched files and the Core typecheck pass — verified for the knowledge, changeset, lint and formatting checks; the Core build's type check passes, and test files were not type-checked here.

Files:

  • .changeset/table-heading-follows-overflow.md — clear
  • apps/storybook/stories/Table.stories.tsx — clear
  • docs/specs/components/Table/TableHeaderCell.spec.md — FR2 change awaits an engineering owner; PR1 wording (non-blocking); earlier verification-row finding fixed
  • packages/core/src/Table/Table.doc.mjs — clear
  • packages/core/src/Table/Table.tsx — clear
  • packages/core/src/Table/TableHeaderCell.test.tsx — clear
  • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx — clear
  • packages/core/src/Table/TableHeaderCell.tsx — clear
  • packages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts — clear

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.

Approval waits on an engineering owner's decision on the proposed component:TableHeaderCell FR2 change: the current record says a header cell inside a Table truncates its text, and this pull request makes headings wrap under the default textOverflow="wrap", truncating only under truncate.

An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; a rejection keeps truncation in the record, and the code change would then have to go. Nothing else blocks: the implementation, tests and record wording check out at this head, and the points from earlier reviews are fixed.

Claims and files checked

Review mode: full; reason: history

  • Claims
    • Headings follow the Table's textOverflow: wrap by default, one line with an ellipsis under truncate (changeset, title, body): verified, TableHeaderCell.tsx:170, :188, the new unit tests and a 390 px browser check.
    • On the base the header cell always applied the single-line truncation style: verified, base TableHeaderCell.tsx.
    • Column floors are static, and widths and floors do not change: verified, the Table record's FR13 and identical column widths before and after.
    • Body cells already wrap in the default mode: verified, TableCell.tsx:235.
    • Under truncate the keyboard tooltip for a cut heading works as before, and a wrapping header shows none and measures nothing: verified, the tooltip tests (the new wrap case fails on the base and passes here) and TableHeaderCell.tsx:173-176.
    • On the base at 390 px the heading is nowrap and "Apple Notes" is cut: verified by a browser check on the base.
    • At 390 px every default-mode heading shows in full with "Apple Notes" on two lines, and truncate still cuts it: verified by a browser check and the pull request's own Chromium spec (2 of 2 pass).
    • At 1280 px Table stories are unchanged apart from the Props table pattern's 360 px container: verified for the stories checked here (heading overflow at 1280 px identical, Props table pattern changed); not re-run over every story.
    • New unit tests cover wrap and truncate in data and children mode: verified, three new tests fail on the base and pass here.
    • The Table suite passes: verified, 48 files and 910 tests on this head merged onto the current base (one more test than stated, from the base).
    • Knowledge, changeset and lint checks pass: verified.
    • No new public API: verified, built public surfaces identical.
    • No internal context in public text: verified.
  • Files
    • .changeset/table-heading-follows-overflow.md: clear
    • apps/storybook/stories/Table.stories.tsx: clear
    • docs/specs/components/Table/TableHeaderCell.spec.md: the FR2 change waits on an engineering owner; wording otherwise consistent with the code and tests
    • packages/core/src/Table/Table.doc.mjs: clear
    • packages/core/src/Table/Table.tsx: clear
    • packages/core/src/Table/TableHeaderCell.test.tsx: clear
    • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clear
    • packages/core/src/Table/TableHeaderCell.tsx: clear
    • packages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts: clear
    • packages/core/src/Table/types.ts: clear

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.

Approval waits on an engineering owner's decision on the proposed component:TableHeaderCell FR2 change: the current record says a header cell inside a Table truncates its text, and this pull request makes headings wrap under the default textOverflow="wrap", truncating only under truncate.

An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; a rejection keeps truncation in the record, and the code change would then have to go. Nothing else blocks: the implementation, tests, record wording and the new export-guide sentence check out at this head, and the earlier children-mode verification point is fixed.

Claims and files checked

Review mode: full; reason: history

  • Claims
    • Headings follow the Table's textOverflow: wrap by default, one line with an ellipsis under truncate (title, changeset, description): verified, TableHeaderCell.tsx:170, :188, the new unit tests, the Chromium spec and 390 px browser probes.
    • On the base the header cell always applied the single-line truncation style: verified, base TableHeaderCell.tsx.
    • Body cells already wrap in the default mode: verified, TableCell.tsx:235.
    • Column floors come only from column definitions, and widths and floors do not change: verified, the Table record's FR13 and identical column widths before and after.
    • A header that is not interactive has no tooltip: verified, the header cell record's FR2.
    • Under truncate the keyboard tooltip for a cut heading works as before, and a wrapping header shows none and measures nothing: verified, the tooltip tests (the new wrap case fails on the base and passes here) and TableHeaderCell.tsx:173-176.
    • Windowed tables default to truncate, so their headings still truncate: verified, BaseTable.tsx:849-851.
    • The export guide's header sentence (a 64 px "Error rate" header wraps to two lines and needs about 100 px for one): verified by a browser probe.
    • On the base at 390 px the heading is nowrap and "Apple Notes" is cut: verified by a browser probe on the base; the new spec itself was not run there, since the base has no such story.
    • At 390 px every default-mode heading shows in full, sortable headings keep their indicator inside the cell, and truncate still cuts: verified, the pull request's Chromium spec (2 of 2) on a fresh Storybook build.
    • At 1280 px the Table stories are unchanged apart from the Props table pattern's 360 px container: verified for the heading-overflow story (identical) and the Props table pattern (its 60 px Description heading now takes three lines); not re-run over every story.
    • New unit tests cover wrap and truncate in data and children mode: verified, the two wrap tests fail on the base and pass here.
    • The Table suite passes: verified, 48 files and 910 tests at this head (one more than the description states).
    • Knowledge, changeset, lint and format checks pass: verified.
    • The core typecheck passes: verified at this head.
    • No new public API: verified, built public surfaces identical.
    • No internal context in public text: verified.
    • Pages built by agents hit this often: not verified; it is the author's observation.
  • Files
    • .changeset/table-heading-follows-overflow.md: clear
    • apps/storybook/stories/Table.stories.tsx: clear
    • docs/specs/components/Table/TableHeaderCell.spec.md: the FR2 change waits on an engineering owner; wording otherwise consistent with the code and tests
    • packages/cli/assets/docs/tree/share-a-page.doc.mjs: clear
    • packages/core/src/Table/Table.doc.mjs: clear
    • packages/core/src/Table/Table.tsx: clear
    • packages/core/src/Table/TableHeaderCell.test.tsx: clear
    • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clear
    • packages/core/src/Table/TableHeaderCell.tsx: clear
    • packages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts: clear
    • packages/core/src/Table/types.ts: clear

Automated review (maintainer link)

@josephfarina
josephfarina marked this pull request as ready for review November 19, 2026 12:44
@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec b0a272d

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026
@josephfarina
josephfarina force-pushed the josephfarina/table-header-follows-overflow branch from b0a272d to e218391 Compare November 19, 2026 14:17
@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review 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.

Approval waits on an engineering owner's decision on the proposed component:TableHeaderCell FR2 change: the current record says a header cell inside a Table truncates its text, and this pull request makes a data-driven Table's headings wrap under the default textOverflow="wrap", while children-mode and truncate tables keep one-line headings.

An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; the /approve-spec already posted names an earlier head, which the amended commit replaced. A rejection keeps truncation in the record, and the data-mode change would then have to go. Nothing else blocks: the implementation, tests and docs check out at this head, and one non-blocking wording note on the record's Compatibility class line is inline.

Claims and files checked

Review mode: full; reason: rebase

  • Claims
    • Changeset: a data-driven Table's headings follow its textOverflow, like the body cells: verified, TableHeaderCell.tsx:177-195, BaseTable.tsx:125, the new declaration tests and 390 px probes.
    • Changeset: under the default wrap, a heading longer than its column wraps instead of ending in an ellipsis: verified, "Apple Notes" goes from cut to two lines at 390 px.
    • Changeset: children-mode tables keep each heading on one line and grow its column, as before: verified, BaseTable.tsx:135, and the children-mode frames are pixel-identical before and after.
    • Changeset: under truncate, headings stay on one line with an ellipsis, as before: verified, the truncate declaration test and probes.
    • The record change to the header cell's FR2 is in the pull request: verified; it awaits an engineering owner's approval at this head.
    • On the base, a narrow comparison table at 390 px cuts "Apple Notes" while the body cells wrap: verified by a base probe of the same tables.
    • Pages built by agents hit this often: not verified; it is the author's observation.
    • The base header cell always applied the one-line ellipsis style, whatever textOverflow was: verified, the base header styles are nowrap with an ellipsis in both modes.
    • Column floors are static and a non-interactive header has no tooltip: verified, the Table record's FR13 and DEC-2 and the header cell record's FR2.
    • Body cells already wrap in the default mode: verified, TableCell.tsx:241.
    • Column widths and floors do not change: verified, column widths identical before and after.
    • Under truncate, the keyboard tooltip for a cut heading works as before, and a wrapping header measures nothing: verified, the tooltip tests (the new wrap case fails on the base and passes here) and TableHeaderCell.tsx:177-183.
    • Windowed tables default to truncate, so their headings still truncate: verified, Table.tsx:366-367.
    • The JSDoc, prop doc and record lines describe the new rule: verified; one non-blocking wording note on the Compatibility class line.
    • The export guide's sentence (a 64 px "Error rate" header wraps to two lines and needs about 100 px for one): verified, two lines at 64 px, 91 px needed for one.
    • The new spec fails on the base at 390 px: verified in substance; the base computes nowrap and cuts the heading, while the spec itself cannot run there because the base has no such story.
    • Both browser cases pass after the change: verified, the Chromium spec passes 2 of 2 on a static Storybook.
    • At 1280 px only the Props table pattern changes among the Table stories: partly verified; its 60 px Description heading now takes three lines and the children-mode stories are identical, and the other stories were not re-captured.
    • New unit tests cover wrap and truncate in data and children mode: verified; the three new wrap tests fail on the base and pass here.
    • The Table suite passes: verified, 50 files and 927 tests at this head (the description's 48 and 909 predate the rebase).
    • Knowledge, changeset, lint, format and Core typecheck checks pass: verified.
    • No new public API: verified, the built public surfaces are identical.
    • Public text has no internal context: verified.
  • Files
    • .changeset/table-heading-follows-overflow.md: clear
    • apps/storybook/stories/Table.stories.tsx: clear
    • docs/specs/components/Table/TableHeaderCell.spec.md: the FR2 change waits on an engineering owner; one non-blocking wording note at lines 70-71
    • packages/cli/assets/docs/tree/share-a-page.doc.mjs: clear
    • packages/core/src/Table/BaseTable.tsx: clear
    • packages/core/src/Table/Table.doc.mjs: clear
    • packages/core/src/Table/Table.tsx: clear
    • packages/core/src/Table/TableHeaderCell.test.tsx: clear
    • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clear
    • packages/core/src/Table/TableHeaderCell.tsx: clear
    • packages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts: clear
    • packages/core/src/Table/table.stylex.ts: clear
    • packages/core/src/Table/types.ts: clear

Automated review (maintainer link)

Under the default `wrap`, a heading longer than its column wraps like the
body cells instead of ending in an ellipsis, so a narrow table on a phone
still says what each column holds. Under `truncate`, headings stay on one
line with an ellipsis, and the keyboard-focus tooltip for a cut heading
works as before.

[skip ci]

@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.

Approval waits on an engineering owner's decision on the proposed component:TableHeaderCell FR2 change: the current record says a header cell inside a Table truncates its text, and this pull request makes a data-driven Table's headings wrap under the default textOverflow="wrap", while children-mode and truncate tables keep one-line headings.

An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request, and the author may do so as an engineering owner; the /approve-spec already posted names an earlier head, which the amended commit replaced. A rejection keeps truncation in the record, and the data-mode change would then have to go. Nothing else blocks: the implementation, tests and docs check out at this head, and the earlier wording note on the record's Compatibility class line is fixed.

Claims and files checked

Review mode: full; reason: history

  • Claims
    • Core changeset: a data-driven Table's headings follow its textOverflow like the body cells: verified, TableHeaderCell.tsx:195, BaseTable.tsx:125, and new declaration tests that fail on the base and pass here.
    • Core changeset: under the default wrap, a heading longer than its column wraps instead of ending in an ellipsis: verified, "Apple Notes" goes from cut to two lines at 390 px.
    • Core changeset: children-mode tables keep each heading on one line and grow its column, as before: verified, BaseTable.tsx:135 and :858, the children-mode test, and unchanged children-mode frames.
    • Core changeset: under truncate, headings stay on one line with an ellipsis, as before: verified, the truncate test and unchanged truncate frames.
    • CLI changeset: the export guide says a heading wraps like its cells, so a floor must fit the heading's longest word: verified, share-a-page.doc.mjs:80.
    • Description: at 390 px the base cuts "Apple Notes" to an ellipsis while the body cells wrap: verified in the base frame.
    • Description: the base header cell always used single-line truncation, whatever textOverflow was: verified, the base headerOverflowStyles and overflowStyles both set white-space: nowrap.
    • Description: floors are static and a non-interactive header has no tooltip: verified, component:Table FR13 and component:TableHeaderCell FR2.
    • Description: under wrap the header takes the table's private white-space, normal for a data-driven table and nowrap for children mode, and column widths and floors do not change: verified, BaseTable.tsx:125 and :135, and identical column widths before and after.
    • Description: the cut-heading tooltip is enabled only under truncate, so a wrapping header measures nothing: verified, TableHeaderCell.tsx:182 and the at-rest test.
    • Description: the JSDoc and prop doc say header cells follow the same mode, and windowed tables default to truncate: verified, Table.tsx:106-107, types.ts:714-715, Table.doc.mjs:253 and Table.tsx:367.
    • Description: the record's FR2, verification rows and compatibility lines are updated, and the truncation gap note now names only edge alignment: verified, TableHeaderCell.spec.md:44-47, :64-73, :111 and :170-172.
    • Description: a HeadingOverflow story shows the table under wrap, sortable under wrap, and under truncate: verified, Table.stories.tsx:1128-1155.
    • Description: the new Chromium spec fails on the base at 390 px and both cases pass after the change: verified, it fails at its white-space assertion on the base and passes 2 of 2 here.
    • Description: at 1280 px every Table story but the Props table pattern is pixel-identical to the base, where "Description" now wraps in a 60 px column: verified, 119 of 120 Table stories are identical and the Props table pattern is the one that changes.
    • Description: the regression tests cover wrap and truncate in data and children mode, run the tooltip cases under truncate, and show no tooltip for a wrapping header: verified, TableHeaderCell.test.tsx and TableHeaderCell.truncationTooltip.test.tsx.
    • Description: the Table tests pass (51 files, 1,096 tests) and the Table plus Markdown suites pass (2,401 tests): verified.
    • Description: the changesets ship to @astryxdesign/cli and @astryxdesign/core, each named: verified, one changeset per package.
    • Description: the Chromium heading, scroll and focus-ring specs pass on a built Storybook: verified, 8 of 8.
    • Description: knowledge, changeset, lint, format and Core typecheck checks pass: verified.
  • Files
    • .changeset/export-guide-header-floor.md: clear
    • .changeset/table-heading-follows-overflow.md: clear
    • apps/storybook/stories/Table.stories.tsx: clear
    • docs/specs/components/Table/TableHeaderCell.spec.md: the proposed FR2 awaits an engineering owner's approval
    • packages/cli/assets/docs/tree/share-a-page.doc.mjs: clear
    • packages/core/src/Table/BaseTable.tsx: clear
    • packages/core/src/Table/Table.doc.mjs: clear
    • packages/core/src/Table/Table.tsx: clear
    • packages/core/src/Table/TableHeaderCell.test.tsx: clear
    • packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clear
    • packages/core/src/Table/TableHeaderCell.tsx: clear
    • packages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts: clear
    • packages/core/src/Table/plugins/sortable/useTableSortable.tsx: clear
    • packages/core/src/Table/table.stylex.ts: clear
    • packages/core/src/Table/types.ts: clear
    • packages/core/src/theme/derivedVarRegistry.test.ts: clear

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec 8b33179

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 19, 2026
josephfarina added a commit that referenced this pull request Nov 19, 2026
- #12843 feat(Table): column headings follow the Table's textOverflow
  Author: @josephfarina
- #12924 docs(Table): how long tokens wrap in a data-driven table
  Author: @josephfarina
- #12683 fix(cli): export keeps a built one-mode theme in its mode in any viewer
  Author: @josephfarina
@josephfarina

Copy link
Copy Markdown
Contributor Author

Landed in #12973.

@github-actions
github-actions Bot deleted the josephfarina/table-header-follows-overflow branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — 8b33179e 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