Repository navigation
docs(specs): windowed Table row-number columns fit their last logical position - #10666
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
ee10776 to
e077ffe
Compare
There was a problem hiding this comment.
This spec change needs an engineering owner's decision: it intentionally amends component:Table FR13, PR3 and DEC-2, which today say that virtualization never changes a column floor and that floors resolve without DOM measurement. An engineering owner settles whether a windowed table's row-number column may widen past its authored 48px to fit the last row position, measured in the first client layout pass, and records that by commenting /approve-spec followed by this head's full commit SHA (the author may do so as an engineering owner).
Two fixes are needed either way:
- FR13, DEC-2 and the PR3 exception say only that Table measures the width in its first client layout pass, while the FR13/PR3 verification row fails a column that does not re-measure after a font, theme or density change; state when the floor re-resolves (row-count, font, theme and density changes, before a wider position paints) and add an append that crosses a digit boundary to the verification row.
- "A column of logical row positions, like the
useTableRowIndexcolumn" leaves open which columns qualify, although Table cannot detect a custom column that shows positions and the description scopes other plugins' columns out; name the class with the existing Public concepts term, "a recognized row-index cell consumer, such as theuseTableRowIndexcolumn".
A smaller point: "past row 999 in each density" in the verification row reaches the overflow point only at balanced density, since with the current padding a compact column first overflows at row 10,000 and a spacious one at row 100.
[Automated review]
e077ffe to
6a340e8
Compare
There was a problem hiding this comment.
This spec change needs an engineering owner's decision before it can be approved: it intentionally amends component:Table FR13, PR3 and DEC-2, which today say that virtualization never changes a column floor and that floors resolve without DOM measurement or observers. An engineering owner settles whether a windowed table's row-number column may widen past its authored 48px to fit the last row position, measured in the first client layout pass and re-measured as its inputs change, and records that by commenting /approve-spec followed by the full head commit SHA (the author may do so as an engineering owner).
One fix is needed either way:
- FR13, the PR3 exception and DEC-2 re-measure only when the row count, font, theme or density changes, but the number column is usually the first column, whose start padding follows the host's inset (the container-edge styles in
table.stylex.ts), so closing aLayoutstart panel underpadding={6}moves that padding from 16px to 24px with none of those changes and drops windowing; re-measure "whenever the logical row count or the column's font or padding changes" in all three places and add a host-inset change to the verification row.
Smaller points: the windowed check could include a pinned row-number column, since pinned offsets come from the static floor resolver today, and the Compatibility bullet that says explicit widths remain unchanged could name the windowed exception.
[Automated review]
… position component:Table FR13, PR3 and DEC-2 gain one exception: in a table that Table.virtualization windows, a recognized row-index cell consumer, such as the useTableRowIndex column, keeps at least its authored width and widens to fit the last position (the logical row count) in the column's own font and padding at the active density. Table measures that width in its first client layout pass and again whenever the logical row count or the column's font or padding changes, before a wider position paints, so windowing never clips a mounted position or falls back to full rendering mid-scroll. Server output and the first client render use the authored width. Unwindowed tables and every other column keep their authored floors; the retained width compatibility bullet names the exception. The FR13 evidence state and verification row name the evidence the new clause needs: each density's first overflow of the default 48px column, an append that crosses a digit boundary while scrolled to the end, re-measurement after a font, theme, density or host-inset change, and a pinned column after a widened row-number column that keeps its inline start at the end of the columns before it. This diff was generated with AI assistance (Navi). Tags: ai-generated
6a340e8 to
f92e00d
Compare
There was a problem hiding this comment.
This spec change needs an engineering owner's decision before it can be approved: it intentionally amends component:Table FR13, PR3, DEC-2 and the Compatibility width bullet, which today say that virtualization never changes a column floor and that floors resolve without DOM measurement or observers. An engineering owner settles whether a windowed table's row-index column may keep at least its authored 48px and widen to fit the last row position in its own font and padding, measured in the first client layout pass and re-measured before paint when the row count, font or padding changes, and records that by commenting /approve-spec followed by the full head commit SHA (the author may do so as an engineering owner).
No other change is required: padding from the host container is now a re-measurement input, and the verification row covers the host inset and a pinned column after the widened one.
One optional point:
- Miss: DEC-2's closing "Rejected: deriving the floor from rendered or sampled content, because it shifts with data and view state" now follows an exception whose floor does shift with the row count and padding; scoping it to the other columns ("deriving any other column's floor ...") would remove that tension.
[Automated review]
| authored width. Rejected: deriving the floor from rendered or sampled content, | ||
| because it shifts with data and view state. |
There was a problem hiding this comment.
Non-blocking (missed in earlier reviews): this Rejected: reason, "because it shifts with data and view state", now follows an exception whose floor does shift with the row count and with padding, and it does not say the rejection covers only the other columns. Suggest scoping it:
-authored width. Rejected: deriving the floor from rendered or sampled content,
+authored width. Rejected: deriving any other column's floor from rendered or sampled content,|
/approve-spec f92e00d |
Exact decision needed
Can a windowed Table size its row-number column to fit its last row number?
component:TableFR13, PR3 and DEC-2 say that virtualization and row data never change a column floor, anduseTableRowIndexauthors a 48px number column. In the default theme, a four-digit number does not fit in 48px. So when row 1,000 mounts in a windowed table, the number either clips, or the module's fixed-content check (module:Table/useTableRowsVirtualizationFR14 and AR5) falls back to full rendering mid-scroll. In a 10,000- or 100,000-row table, that fallback renders every row.Existing authority searched
component:Table: FR13, PR3, DEC-2; Compatibility and migration ("Without activation or virtualization, … column floors … remain unchanged"); Public concepts (the row index is the logical index in the complete dataset); FR18 (fixed-height admission and full-render fallback); FR20 (visible numberingi+1from the parent logical index).module:Table/useTableRowsVirtualization: FR9 (row indexing is a supported composition), FR14 and AR5 (overflow takes the full-render fallback; no silent clipping), DEC-2 (rejects silent clipping), PR2 (shared observation for font, theme, zoom and geometry invalidation).Table.spec.md: fix(Table): a selected row reflects selected on its table-row target #10187, docs(spec): Table's header row sticks in its own viewport; every column keeps the width a person sets #10131 and docs(spec): Core ships the Table plugins that set the table's behavior #10107 (drafts) do not edit FR13, PR3 or DEC-2. Draft spec(Table): record the approved flat-data v1 decision #8279 targets another base and predates the current text.floor,minWidth,row index,rowIndex,logical position,virtualization,density,clip,measure.Decision
The change applies only while
Table.virtualizationwindows a table. A recognized row-index cell consumer, such as theuseTableRowIndexcolumn, keeps at least its authored width. It widens to fit the last position, which is the logical row count, in the column's own font and padding at the active density. "Recognized row-index cell consumer" is the record's existing Public-concepts term. Table cannot tell that a caller's ownrenderCellshows positions, so other columns are out of scope.startFromand legacy offsets still take the full-render fallback (Public concepts, FR20). The module's fixed-content check (module FR14 and AR5) still guards everything else.component:Table, FR13 and DEC-2.Record changes:
Rejected:line; the approving owner's approval binds the amended text.module:Table/useTableRowsVirtualizationneeds no change. FR9 already admits row indexing, PR2 already allows shared observation for font, theme and geometry changes, and FR14 and AR5 stay the fallback for any other overflow. None of them contradicts the amended FR13.Rejected alternatives
Claim scope and non-goals
useTableRowIndexAPI, the header label's width, other plugins' columns, the 60px and 120px floors, density definitions, and the module's fixed-content fallback.module:Table/useTableRowsVirtualization.Rejected:line still applies. The floor of ordinary columns is never derived from rendered or sampled row content. The windowed exception measures only the last position's text, in the row-number column's own font and padding.Evidence and implementation relationship
Writing rubric results
proposes,decided,previously,nowand history finds none in the added text. The exception and its reason are present-tense statements about the system: "windowing never clips a mounted position or falls back mid-scroll" in FR13, and "because windowing must never clip a mounted position or fall back to full rendering mid-scroll" in DEC-2.Rejected:line inside the decision. No new rejected alternative enters the record.#followed by digits,/pull/and/issues/finds nothing in the record.Scope
Table.virtualizationprop anduseTableRowIndexhook. It states when the floor applies, first client layout pass versus server and first render, because hydration and mid-scroll stability depend on that timing; it does not name how Table measures.)Validation
pnpm check:knowledge(node scripts/check-knowledge.mjs): "Knowledge templates and records are aligned."--check docs/specs/components/Table/Table.spec.md: passes. Every edited table row keeps its column widths, so no other row is re-padded.git diff --check origin/main...HEAD: clean.pnpm specs:for --diff origin/main: routescomponent:Tableand its linked records, plus the global claims for itsaccessibility,behavior,layout,public-apiandthemingtriggers. No added line routes a further claim, and the change touches no API report, source or theme.This PR was generated with AI assistance (Navi).