Skip to content

docs(Table): how long tokens wrap in a data-driven table - #12924

Closed
josephfarina wants to merge 1 commit into
josephfarina/table-header-follows-overflowfrom
josephfarina/table-long-tokens
Closed

josephfarina wants to merge 1 commit into
josephfarina/table-header-follows-overflowfrom
josephfarina/table-long-tokens

Conversation

@josephfarina

@josephfarina josephfarina commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

Stack: #12843 → #12924

This PR edits the same textOverflow doc 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

  • textOverflow prop: when you pass columns, a data-driven table sizes them from their definitions, not their content, so under wrap a 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.
  • One best-practice line (English, Chinese and dense docs): keep long tokens whole with proportional(1, {minWidth}) or pixel() wide enough for the token, or children mode.

Authority

  • component:Table FR13: data-driven column widths come from the column definitions, with per-column floors set by proportional(value, {minWidth}).
  • component:Table FR24 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.
  • Current source: a data-driven table's wrap cells break a long token at any letter (--_table-cell-word-break: break-word in fixed layout).

Scope

Components: Table

  • Docs only, consumer guidance within the current records.
  • Public text and artifacts contain no internal Meta context.

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)

@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 5:38pm 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
@astracat-bot

astracat-bot Bot commented Nov 19, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 19, 2026, 5:38 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.

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), while pixel(300) gives 420 px; naming that trade-off would help phone layouts.
  • "Fixed columns" (Table.doc.mjs:361, :449, :512 and 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:253 and :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}) or pixel() 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 textOverflow line. 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.

Automated review (maintainer link)

Comment thread packages/core/src/Table/Table.doc.mjs Resolved
Comment thread packages/core/src/Table/Table.doc.mjs Resolved
@josephfarina
josephfarina force-pushed the josephfarina/table-header-follows-overflow branch from e218391 to 8b33179 Compare November 19, 2026 15:55
@josephfarina
josephfarina force-pushed the josephfarina/table-long-tokens branch from 8c1bcaa to b062840 Compare November 19, 2026 15:55

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested: one new docs sentence overstates how a data-driven Table sizes its columns.

  • Table.doc.mjs:361 (and the same line at :449 and the dense line at :512) says a data-driven table sizes its columns "from their definitions, not their content", but with columns omitted 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 in columns from 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 textOverflow line: 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, :449 and :512; the Chinese line is in English.

Automated review (maintainer link)

Comment thread packages/core/src/Table/Table.doc.mjs Resolved
Comment thread packages/core/src/Table/Table.doc.mjs Resolved
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]
@josephfarina
josephfarina force-pushed the josephfarina/table-long-tokens branch from ada5bf8 to ccf57fe Compare November 19, 2026 17:23

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI: CI has not run on this head yet 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-231 reads only each column's width; component:Table FR13).
  • Claim: a floor with proportional(1, {minWidth}) or pixel() 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 textOverflow line: verified.
  • Changeset: the columns you pass in columns are 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.

Automated review (maintainer link)

@josephfarina

Copy link
Copy Markdown
Contributor Author

/approve-spec ccf57fe

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-long-tokens branch November 20, 2026 06:06

This branch was successfully deployed

1 active deployment
Preview — ccf57fe6 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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant