Repository navigation
docs(Table): how long tokens wrap in a data-driven table - #12924
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.
Approved pending CI: CI has not run on this head yet because the pull request is still a draft, and it can merge only after #12843, its base branch.
The new textOverflow sentences and best-practice line match how a data-driven Table lays out today and what the existing Table spec says, with no blocking findings. Optional polish:
- The Chinese overlay's new best-practice line (
Table.doc.mjs:446-450) is still in English; translating it would match the Chinese lines above it. proportional(1, {minWidth: 300})beside two width-less columns widens a 320 px table to 900 px (the other columns take equal shares), whilepixel(300)gives 420 px; naming that trade-off would help phone layouts.- "Fixed columns" (
Table.doc.mjs:361,:449,:512and the changeset) can read as fixed widths; "columns sized from their definitions, not their content" says it more exactly.
Claims and files checked
Review mode: full; reason: no-earlier-review
- Changeset: the docs now explain how a long token wraps in a data-driven table. Verified at
Table.doc.mjs:253and:361. - Changeset: because columns are set from their definitions, a token wider than its column breaks inside the token. Verified by the fixed layout and break-word style (
BaseTable.tsx:118-122) and in Chromium: 3 lines in a 320 px box. - Changeset: a column floor via
proportional(1, {minWidth})orpixel()keeps tokens whole. Verified: the table sizes to its floors (columnUtils.ts:90-121,BaseTable.tsx:1022-1027); 1 line in Chromium, with the table scrolling. - Changeset: children-mode columns follow their content. Verified by automatic layout (
BaseTable.tsx:128-133); 1 line in Chromium. - Changeset: a docs patch for
@astryxdesign/core. Verified; the changeset check passes. - Description: built on #12843 and edits the same
textOverflowline. Verified: the base is #12843's head. - Description: docs only, with no record or code change. Verified from the two changed files.
- Description: a narrow data-driven column splits a long token, and Table's docs did not say so. Verified in Chromium and against the base docs.
- Description: one best-practice line in the English, Chinese and dense docs. Verified; the Chinese copy is in English (note above).
- Description: the governing claims are the Table spec's column-width, children-mode wrap and content-sizing decisions. Verified against the current spec.
- Description: the source breaks words anywhere in fixed layout. Verified at
BaseTable.tsx:122. - Description: the scope is Table, and the change has no internal context. Verified.
- Description: the knowledge, changeset, Prettier and four doc test suites pass. Verified by re-running them: all pass (17 files, 335 tests).
- File
.changeset/table-long-tokens-docs.md: clear. - File
packages/core/src/Table/Table.doc.mjs: clear, with the non-blocking notes above.
e218391 to
8b33179
Compare
8c1bcaa to
b062840
Compare
There was a problem hiding this comment.
Changes requested: one new docs sentence overstates how a data-driven Table sizes its columns.
Table.doc.mjs:361(and the same line at:449and the dense line at:512) says a data-driven table sizes its columns "from their definitions, not their content", but withcolumnsomitted Table generates the columns from the first five rows and fits each floor to the longest word (columnUtils.ts:362-421), so those tables keep long tokens whole; scope the line and the description to the columns you define, for example "A data-driven table sizes the columns you pass incolumnsfrom their definitions, not their content".
That wording is the one the earlier automated review suggested, so the overreach came from the review. Optional: translate the new docsZh line, note that proportional(1, {minWidth}) beside width-less columns can widen the whole table (900 px against 420 px with pixel(300) in a 320 px box), and drop "the columns are fixed" from the changeset. This pull request can merge only after #12843, its base branch.
Claims and files checked
Review mode: full; reason: rebase
- Claim: in a narrow data-driven column a long token breaks inside the token: verified for explicit columns (fixed-layout
break-word,BaseTable.tsx:118-122; 3 lines in a 106 px column in Chromium). - Claim: Table's docs did not say so before: verified against the base docs.
- Claim: the docs now say a data-driven table sizes its columns from their definitions, not their content: false for generated columns (the finding above).
- Claim: one best-practice line in the English, Chinese and dense docs: verified (
Table.doc.mjs:358-362,:446-450,:509-513). - Claim: the Table spec's column-width and children-mode rules govern the guidance: verified for explicit columns.
- Claim: the shipped source breaks long tokens in fixed layout: verified (
BaseTable.tsx:118-122). - Claim: docs only, with no record or code change: verified.
- Claim: no internal context in public text: verified.
- Claim: the knowledge, changeset, Prettier and doc test checks pass: verified by re-running them (17 files, 335 tests).
- Claim: stacked on #12843 and editing the same
textOverflowline: verified. - Changeset: a long token breaks in a data-driven table, and a floor or children mode keeps it whole: verified; "the columns are fixed" is a wording note.
- File
.changeset/table-long-tokens-docs.md: wording note. - File
packages/core/src/Table/Table.doc.mjs: the finding above at:361,:449and:512; the Chinese line is in English.
b062840 to
ada5bf8
Compare
A data-driven table has fixed columns, so a token wider than its column breaks inside the token. The docs now say so and name the ways to keep tokens whole: a column floor that fits them, or children mode. [skip ci]
ada5bf8 to
ccf57fe
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet because the pull request is a draft, and it can merge only after #12843, its base branch.
The earlier blocking finding is fixed: the textOverflow description, the three best-practice lines and the changeset now scope the claim to the columns you pass in columns, which Table sizes from their definitions alone, and no longer describe tables that omit columns, whose generated columns take their floors from the first rows. Two optional notes: the docsZh copy of the new line is still in English, and a clause saying that proportional(1, {minWidth}) beside width-less columns widens the whole table (900 px against 420 px with pixel(300) in a 320 px box) would help phone layouts.
Claims and files checked
Review mode: full; reason: history
- Claim: in a data-driven table, a long token breaks inside the token when its column is narrower: verified (fixed layout with
break-word,BaseTable.tsx:118-122; three, three and four lines in a 106 px column in Chromium). - Claim: Table's docs did not say so before: verified against the base docs and CLI output.
- Claim: when you pass
columns, a data-driven table sizes them from their definitions, not their content: verified (columnUtils.ts:200-231reads only each column's width;component:TableFR13). - Claim: a floor with
proportional(1, {minWidth})orpixel()wide enough for the token keeps it whole: verified (both identifiers on one line at 300 px in Chromium). - Claim: children mode keeps tokens whole because its columns follow their content: verified (
BaseTable.tsx:127-136; automatic layout, one line each in Chromium; FR24 and DEC-6). - Claim: one best-practice line in the English, Chinese and dense docs: verified (
Table.doc.mjs:358-362,:446-450,:509-513); the Chinese copy is in English. - Claim: the Table spec's column-width and children-mode rules govern the guidance: verified as quoted.
- Claim: the shipped source breaks long tokens in fixed layout: verified (
BaseTable.tsx:118,:122). - Claim: docs only, with no record or code change: verified.
- Claim: no internal context in public text: verified.
- Claim: the knowledge, changeset, Prettier and doc test checks pass: verified by re-running them (17 files, 335 tests).
- Claim: stacked on #12843 and editing the same
textOverflowline: verified. - Changeset: the columns you pass in
columnsare sized from their definitions, so a wider token breaks inside it, and a floor or children mode keeps it whole: verified. - File
.changeset/table-long-tokens-docs.md: clear. - File
packages/core/src/Table/Table.doc.mjs: clear, with the two optional notes above.
|
/approve-spec ccf57fe |
- #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
This PR edits the same
textOverflowdoc line as #12843. Docs only; no record or code change in this layer.User impact
In a data-driven Table, a long token such as a code identifier, a crash signature or a URL breaks inside the token when its column is narrower than the token ("NullPointerExceptio" / "n"). Nothing in Table's docs says so, or says how to keep tokens whole. Builders, and agents building pages, find out only on a phone.
What the docs now say
textOverflowprop: when you passcolumns, a data-driven table sizes them from their definitions, not their content, so underwrapa token longer than its column breaks inside the token; to keep such tokens whole, give that column a floor that fits them, or compose the table in children mode, whose columns follow their content.proportional(1, {minWidth})orpixel()wide enough for the token, or children mode.Authority
component:TableFR13: data-driven column widths come from the column definitions, with per-column floors set byproportional(value, {minWidth}).component:TableFR24 and DEC-6: a wrapping children-mode table sizes each column from its content and breaks a word only when that word alone cannot fit.--_table-cell-word-break: break-wordin fixed layout).Scope
Components: Table
Testing
check:knowledge,check:changesets, prettier on the touched files.vitest run --project node packages/cli/foundation/doc-compiler packages/cli/test/core-prop-docs packages/cli/test/core-doc-quality packages/cli/test/core-doc-types— 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)