Repository navigation
feat(Table): column headings follow the Table's textOverflow - #12843
josephfarina wants to merge 1 commit into
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
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.mdlines 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— clearapps/storybook/stories/Table.stories.tsx— cleardocs/specs/components/Table/TableHeaderCell.spec.md— FR2 change awaits an owner; stale compatibility lines (finding)packages/core/src/Table/Table.doc.mjs— clearpackages/core/src/Table/TableHeaderCell.test.tsx— clearpackages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx— clearpackages/core/src/Table/TableHeaderCell.tsx— clear (one non-blocking comment suggestion)packages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts— clear
7d09640 to
8db4bd5
Compare
There was a problem hiding this comment.
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 overflowverification row (TableHeaderCell.spec.mdline 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 inTableHeaderCell.test.tsxor 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 inTable.tsx:95-101too). - 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— clearapps/storybook/stories/Table.stories.tsx— cleardocs/specs/components/Table/TableHeaderCell.spec.md— FR2 change awaits an engineering owner; the verification row overstates children-mode coverage (finding); earlier compatibility finding fixedpackages/core/src/Table/Table.doc.mjs— clearpackages/core/src/Table/Table.tsx— clearpackages/core/src/Table/TableHeaderCell.test.tsx— clear (data mode only, see the finding)packages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx— clearpackages/core/src/Table/TableHeaderCell.tsx— clearpackages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts— clear
8db4bd5 to
dd4dcfe
Compare
There was a problem hiding this comment.
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; "undertruncate, 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— clearapps/storybook/stories/Table.stories.tsx— cleardocs/specs/components/Table/TableHeaderCell.spec.md— FR2 change awaits an engineering owner; PR1 wording (non-blocking); earlier verification-row finding fixedpackages/core/src/Table/Table.doc.mjs— clearpackages/core/src/Table/Table.tsx— clearpackages/core/src/Table/TableHeaderCell.test.tsx— clearpackages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx— clearpackages/core/src/Table/TableHeaderCell.tsx— clearpackages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts— clear
dd4dcfe to
859cc75
Compare
There was a problem hiding this comment.
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 undertruncate(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
truncatethe 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) andTableHeaderCell.tsx:173-176. - On the base at 390 px the heading is
nowrapand "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
truncatestill 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.
- Headings follow the Table's
- Files
.changeset/table-heading-follows-overflow.md: clearapps/storybook/stories/Table.stories.tsx: cleardocs/specs/components/Table/TableHeaderCell.spec.md: the FR2 change waits on an engineering owner; wording otherwise consistent with the code and testspackages/core/src/Table/Table.doc.mjs: clearpackages/core/src/Table/Table.tsx: clearpackages/core/src/Table/TableHeaderCell.test.tsx: clearpackages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clearpackages/core/src/Table/TableHeaderCell.tsx: clearpackages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts: clearpackages/core/src/Table/types.ts: clear
859cc75 to
b0a272d
Compare
There was a problem hiding this comment.
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 undertruncate(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
truncatethe 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) andTableHeaderCell.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
nowrapand "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
truncatestill 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.
- Headings follow the Table's
- Files
.changeset/table-heading-follows-overflow.md: clearapps/storybook/stories/Table.stories.tsx: cleardocs/specs/components/Table/TableHeaderCell.spec.md: the FR2 change waits on an engineering owner; wording otherwise consistent with the code and testspackages/cli/assets/docs/tree/share-a-page.doc.mjs: clearpackages/core/src/Table/Table.doc.mjs: clearpackages/core/src/Table/Table.tsx: clearpackages/core/src/Table/TableHeaderCell.test.tsx: clearpackages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clearpackages/core/src/Table/TableHeaderCell.tsx: clearpackages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts: clearpackages/core/src/Table/types.ts: clear
|
/approve-spec b0a272d |
b0a272d to
e218391
Compare
There was a problem hiding this comment.
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
textOverflowwas: verified, the base header styles arenowrapwith 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) andTableHeaderCell.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
nowrapand 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.
- Changeset: a data-driven Table's headings follow its
- Files
.changeset/table-heading-follows-overflow.md: clearapps/storybook/stories/Table.stories.tsx: cleardocs/specs/components/Table/TableHeaderCell.spec.md: the FR2 change waits on an engineering owner; one non-blocking wording note at lines 70-71packages/cli/assets/docs/tree/share-a-page.doc.mjs: clearpackages/core/src/Table/BaseTable.tsx: clearpackages/core/src/Table/Table.doc.mjs: clearpackages/core/src/Table/Table.tsx: clearpackages/core/src/Table/TableHeaderCell.test.tsx: clearpackages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clearpackages/core/src/Table/TableHeaderCell.tsx: clearpackages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts: clearpackages/core/src/Table/table.stylex.ts: clearpackages/core/src/Table/types.ts: clear
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]
e218391 to
8b33179
Compare
There was a problem hiding this comment.
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
textOverflowlike 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:135and: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
textOverflowwas: verified, the baseheaderOverflowStylesandoverflowStylesboth setwhite-space: nowrap. - Description: floors are static and a non-interactive header has no tooltip: verified,
component:TableFR13 andcomponent:TableHeaderCellFR2. - Description: under
wrapthe header takes the table's private white-space,normalfor a data-driven table andnowrapfor children mode, and column widths and floors do not change: verified,BaseTable.tsx:125and: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:182and 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:253andTable.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,:111and:170-172. - Description: a
HeadingOverflowstory shows the table underwrap, sortable underwrap, and undertruncate: 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.tsxandTableHeaderCell.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/cliand@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.
- Core changeset: a data-driven Table's headings follow its
- Files
.changeset/export-guide-header-floor.md: clear.changeset/table-heading-follows-overflow.md: clearapps/storybook/stories/Table.stories.tsx: cleardocs/specs/components/Table/TableHeaderCell.spec.md: the proposed FR2 awaits an engineering owner's approvalpackages/cli/assets/docs/tree/share-a-page.doc.mjs: clearpackages/core/src/Table/BaseTable.tsx: clearpackages/core/src/Table/Table.doc.mjs: clearpackages/core/src/Table/Table.tsx: clearpackages/core/src/Table/TableHeaderCell.test.tsx: clearpackages/core/src/Table/TableHeaderCell.truncationTooltip.test.tsx: clearpackages/core/src/Table/TableHeaderCell.tsx: clearpackages/core/src/Table/__tests__/TableHeadingOverflow.a11y.chromium.spec.ts: clearpackages/core/src/Table/plugins/sortable/useTableSortable.tsx: clearpackages/core/src/Table/table.stylex.ts: clearpackages/core/src/Table/types.ts: clearpackages/core/src/theme/derivedVarRegistry.test.ts: clear
|
/approve-spec 8b33179 |
- #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
|
Landed in #12973. |
Stack: #12843 → #12924
Record change:
component:TableHeaderCellFR2 — a header cell wraps or truncates its heading by the Table'stextOverflow, likecomponent:TableCellFR2 (was: always truncates). Children mode keepscomponent:TableFR24: underwrap, 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 fortextOverflow="truncate"keep one-line headings with an ellipsis.Problem and solution fit
white-space: nowrap, ellipsis), whatever the Table'stextOverflowwas.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 tonormaland a children-mode table tonowrap(FR24). Column widths and floors do not change.Expected behavior and authority
component:TableHeaderCellFR2 (changed here): the heading follows the Table'stextOverflow; undertruncate, the keyboard-focus tooltip for a cut heading works as before.component:TableCellFR2: cells wrap or truncate by the Table'stextOverflow.component:TableFR13 and DEC-2 are unchanged: floors never come from content.Smallest change
Table.tsx: thetextOverflowJSDoc says header cells follow the same mode.TableHeaderCell.tsx+table.stylex.ts+BaseTable.tsx: underwrapthe header cell takes the table's--_table-header-white-space(normalin a data-driven table's fixed layout,nowrapin a children-mode table's automatic layout, so FR24's one-line headings and content-sized columns hold);overflowStylesundertruncate; the cut-heading tooltip is enabled only undertruncate, so a wrapping header measures nothing.Table.doc.mjs: thetextOverflowprop line says header cells follow the same mode (windowed tables default totruncate, 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/clichangeset): the column-floor line says a header wraps like the cells, so a floor must fit the header's longest word.HeadingOverflowstory (the same table underwrap, sortable underwrap, and undertruncate) for the browser check.Evidence
TableHeadingOverflow.a11y.chromium.spec.tsfails on the base at 390 px (the heading cell computeswhite-space: nowrapand "Apple Notes" is cut).HeadingOverflowincluded. 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…".TableHeaderCell.test.tsx(wrap and truncate declarations, in data mode and children mode),TableHeaderCell.truncationTooltip.test.tsx(the tooltip cases now run undertruncate; a wrapping header shows no tooltip on keyboard focus; nothing is measured at rest).Scope
Components: Table
textOverflow(record FR2, changeset[feat]).Writing rubric results
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.scripts/release/changeset-coverage.mjs pr): ships to@astryxdesign/cliand@astryxdesign/core, each named.playwright test --project=chromium TableHeadingOverflow TableScroll.a11y TableFocusRingon a built Storybook — pass;TableHeadingOverflowfails 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)