Repository navigation
chore: land 2 reviewed pull requests together (batch 34) - #12908
Conversation
…top and bottom, from the track's and thumb's sizes
…n input covers it
A Table in children mode uses automatic table layout. Its header cells kept the truncate style's zero max-width, and its wrap cells kept a zero max-width and a break at any letter. In automatic layout that holds every column at zero, so a table wider than its container shrank every column until words broke letter by letter and headings were cut. Header cells now truncate without the zero cap, and wrap cells break a word only when it cannot fit. A children-mode table that does not fit now scrolls inside its own box, as a data-driven Table does. Data mode uses fixed layout, which sets column widths itself, so its columns do not change. The new ChildrenModeNarrow story's play checks the scroll, full headings and whole words, and the story play guard now runs it.
…e note names the wrap scope [skip ci]
…rkdown drops its copy [skip ci]
The switch doc now names two derived routes (the field's gap from main, the thumb's size here); the registry consistency test maps Switch to both targets. [skip ci]
…he theme's size for the state it attached in; the release note names each forced-colors move; a theme's padding is best effort [skip ci]
… children-mode layout change [skip ci]
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 761c012 |
|
/approve-spec 761c012 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| Switch · Storybook | 110.3 kB (+62 B) · 10.2 kB CSS (+96 B) | 1,784 (+11) | — · — · — |
| Markdown · Storybook | 207.2 kB (+65 B) · 22.7 kB CSS (+55 B) | 8,870 (−5) | — · — · — |
| Table | 123.1 kB (+49 B) · 20.5 kB CSS (+55 B) | — | — · — · — |
9 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/CommentThread | 375.8 kB (+68 B) · 2.4 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 105.1 kB (+27 B) · 19.4 kB CSS (+25 B) | — | — · — · — |
| lab/Comments | 382.7 kB (+31 B) · 2.5 kB CSS (0) | — | — · — · — |
| TableCell | 105.3 kB (0) · 19.6 kB CSS (+22 B) | — | — · — · — |
| TableRow | 7.2 kB (0) · 4.1 kB CSS (+13 B) | — | — · — · — |
| TableBody | 6.6 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| TableFooter | 3.5 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| TableHeader | 3.5 kB (0) · 3.3 kB CSS (0) | — | — · — · — |
| TableSelectionToolbar | 77.3 kB (0) · 14.3 kB CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.75 MB packed (+2.1 kB); no new dependencies.
Wide change (shared styles: packages/core/src/theme/derivedVarRegistry.ts): add ci:run-visual for Visual, ci:run-a11y for Accessibility, ci:run-rtl for RTL.
CI impact: 0 job-min per update · pool 0% · standard runners · 1 CI action or script file changed (not measured)
| Before | After | Change | |
|---|---|---|---|
| Job-minutes per PR update | 173.5 | 173.5 | 0 |
| Runner pool, runner-minutes a day | 51,781 | 51,781 | 0 (0%) |
| Average concurrent jobs | 36 | 36 | 0 |
| Time to green (median → this run) | — | 22.5 min | — |
| Runs a day | 298 | 298 | 0 |
Not measured (the jobs that use these keep their recent minutes above): .github/scripts/story-play-guard.js.
Assumptions: before is each job's average over the last 20 pull-request runs; after keeps that for unchanged jobs and uses this run's minutes for added or changed ones, weighted by how often each changed job ran in those runs; runs a day averages the seven whole days before today; time to green compares this run with the median of those runs that ran the same jobs.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approved pending CI. CI has not finished on this head, so this is not a statement that the branch is ready to merge: the main CI workflow is still running its UI shards, and the heavy jobs that carry the story-play guard are deferred.
Both fixes measure the way they are described. A hand-composed Table whose cells wrap now sizes each column from its content and scrolls in its own Scroll region: at 320px the narrow table goes from six 53px columns with five cut headings and seven cells broken mid-word to content-sized columns with every heading whole, while data-driven, truncating and Markdown tables stay pixel-identical. The Switch thumb now rests the same distance from the track's end as from its top and bottom at any theme size, and a shipped switch is unchanged with a mouse and under a finger apart from the 1px forced-colors and small-size moves the release note already names. The first-load table in the description reproduces within a byte of gzip, and no public API changes.
- Non-blocking: two added comments run long for the repository's comment style —
packages/core/src/Table/BaseTable.tsx:119(27 words) andpackages/core/src/Switch/Switch.tsx:124(39 words in one sentence, several topics). Splitting each into two short sentences keeps the reason.
Claims and files checked
Review mode: full; reason: no-earlier-review
Claims
- Release note: a wrapping children-mode table scrolls in its own box instead of shrinking columns until words break and headings are cut — verified (browser measurement at 320px, base against head).
- Release note: its columns follow their content instead of sharing the width equally — verified (a fitting table's columns move from equal thirds to content-sized at 900px).
- Release note: a children-mode table under truncate keeps its columns within its box and lays out as before — verified (the header-cell test holds the zero cap under truncate; truncating and data-driven frames are identical).
- Release note: the switch thumb rests as far from the track's end as from its top and bottom, at both ends, with a mouse and under a finger, from the track's and thumb's own sizes — verified (a theme-sized 51x31 track with a 27px thumb measures 2px at the resting end and 2px top and bottom in both writing directions; the base left 9px at one end and ran 5px past the other).
- Release note: the control's box now follows the track, where before it stayed 32x20 or 40x24 and squeezed a wider track — verified (control box 40x24 with a 51px track on the base, 51x31 on the head, with the hidden input still covering it).
- Release note: the small switch's off thumb with a mouse sits 3px from the start, not 2px — verified from the compiled rule (the new rest resolves to 1px over the 2px padding).
- Release note: in forced colors every thumb moves up to 1px, the on thumb 1px in from the end — verified (forced-colors measurement: off 5px to 4px from the start, on 1px to 2px from the end).
- Release note: everything else draws the same pixels in every official theme — verified (shipped switch frames compare identical with a fine pointer and under touch; no shipped theme sizes the track or the thumb).
- Description: two reviewed pull requests merged in the stated order, each as its own no-fast-forward merge — verified from the branch history.
- Description: the component scope and each record bullet — verified against the record diff.
- Description: the writing-rubric results — verified (the new decision records two rejected alternatives, the Markdown decision drops the one it now decides, the verification rows name the test file and the story, and the new browser test is listed as verifying the record).
- Description: the six-page first-load table — verified, reproduced within a byte of gzip per page.
- Description: lint, build, typecheck and the node unit suites pass on this branch — verified green in CI at this head; the UI shards were still running.
Files
.changeset/switch-thumb-rest-from-sizes.md— clear..changeset/table-children-mode-narrow.md— clear..github/scripts/story-play-guard.js— clear (the new entry names the story id the Storybook index carries).apps/storybook/stories/Table.stories.tsx— clear (the play assertions reproduce what this review measured, and the helpers they use are already imported).docs/specs/components/Markdown/Markdown.spec.md— clear.docs/specs/components/Switch/Switch.spec.md— clear.docs/specs/components/Table/Table.spec.md— clear.packages/core/src/Markdown/Markdown.tsx— clear (the dropped overrides are the ones Table now provides; Markdown frames are identical).packages/core/src/Switch/Switch.doc.mjs— clear (both locales carry the two private variables and the derived entries).packages/core/src/Switch/Switch.test.tsx— clear.packages/core/src/Switch/Switch.tsx— comment-style note above; otherwise clear.packages/core/src/Switch/__tests__/SwitchThumbRest.interaction.browser.spec.ts— clear (green in Chromium and WebKit in CI at this head).packages/core/src/Switch/useSwitchTouch.test.ts— clear.packages/core/src/Switch/useSwitchTouch.ts— clear (the attach-time read is a custom-property read, not a layout read).packages/core/src/Table/BaseTable.tsx— comment-style note above; otherwise clear.packages/core/src/Table/TableHeaderCell.test.tsx— clear.packages/core/src/Table/TableHeaderCell.tsx— clear.packages/core/src/Table/table.stylex.ts— clear.packages/core/src/theme/derivedVarRegistry.test.ts— clear (the two-target mapping keeps the doc order).packages/core/src/theme/derivedVarRegistry.ts— clear (a theme's width and height on the thumb target compile to the private variables, checked against the built theme output).
| borderCollapse: 'collapse', | ||
| borderSpacing: '0', | ||
| tableLayout: 'fixed', | ||
| // Fixed layout sets the columns, so a wrap cell's long token may break at |
There was a problem hiding this comment.
Non-blocking, comment style: this sentence runs 27 words and carries two topics. Two short sentences keep the reason: Fixed layout sets the columns, so a wrap cell breaks a long token at any letter to stay inside its cell. Flex rows inside the cell break the same way.
| // Every touch value sits in the same property as the mouse value, as a | ||
| // nested condition, never in a later style. A later style that names a | ||
| // property replaces all of it, mouse value included. | ||
| // Under a finger the track has no padding: everything in it is placed by |
There was a problem hiding this comment.
Non-blocking, comment style: 39 words in one sentence, with three topics. Something like Under a finger the track has no padding: insets place the thumb and the press and fade layers. Its content box is therefore its own box, so the thumb's insets read the track height from it (100cqb).
This branch merges two reviewed pull requests on current
main, each as its own--no-ffmerge, in this order. Each member keeps its own description, tests and review history; the record edits below need an engineering owner's/approve-specat this branch's head.Scope
Components: Table, TableCell, TableHeaderCell (in children mode with wrapping cells each column takes the width its content needs, a header label stays on one line, and the Scroll region scrolls columns that do not fit), Markdown (its table part drops the wrap overrides Table no longer needs), Switch (the thumb's size reads two private variables that
widthandheightonswitch-thumbset; at rest it sits as far from the track's end as from its top and bottom)Records
component:TableFR24, its verification row, DEC-6, the compatibility bullet and builder-impact cell it adds, and the edited "Released default preserved" bullet: in children mode with wrapping cells, each column takes the width its content needs, a word breaks only when it alone cannot fit its column, a header label stays on one line, and the Scroll region scrolls columns that do not fit; undertruncate, cells keep to the Table's box. (fix(table): a children-mode table scrolls instead of breaking words #12709)component:MarkdownDEC-6 amended: Markdown's table part keeps only what it adds (per-column floors on the text box, visible overflow, header labels that wrap). (fix(table): a children-mode table scrolls instead of breaking words #12709)component:SwitchFR13 gains one sentence and FR14 two, plus a best-effort note for a theme's padding: the thumb's size reads--_switch-thumb-widthand--_switch-thumb-height, whichwidthandheightonswitch-thumbset; at rest, under any pointer and in either writing direction, the thumb sits as far from the track's end as from its top and bottom, at both ends; the control's box is the track's. (fix(Switch): the thumb rests as far from the track's end as from its top and bottom #12589)Writing rubric results
verified_bynames the new browser test. R4 none. R5 none. R6 none. R7 none.First-load size
pnpm size:pages --base <merge base>on this branch's head, first-load JavaScript (minified / gzip bytes). The four reference pages plus a Switch and a Markdown page, because the sharedtheme/derivedVarRegistry.tsand the Table styles grow:The table and Markdown growth is #12709's children-mode column sizing; the Switch growth is #12589's thumb rest. Pages that render neither component are unchanged.
Testing
Each member's own tests pass on its head. On this branch, lint, build, typecheck, the node and ui unit suites and the test-ui gates pass; the browser contracts, Storybook, interaction and accessibility suites run in CI.
When this merges, each pull request above is closed with a note that names this one.