Repository navigation
fix(Layout): a full-bleed Table or List row takes the rounded container corner it reaches - #10586
Conversation
…rounded container corners Red on main: a Table or bleeding List row that reaches a Card, Dialog, or BottomSheet corner is square, and the card clips the table's focus ring at its corners.
…ner corner it reaches Card, Dialog, and BottomSheet publish their corners next to their padding; every other padding publisher and every overlay and layout root publishes square corners. Table's scroll region and the first and last rows of a List with edge="bleed" take the corner they reach, less the block padding they keep, so the table's focus ring stays whole at a card's corners. The container-padding record gains the corner geometry and INV12; List FR5 names the corner exception.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
|
/approve-spec 1278272 |
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| LayoutFooter | 6.1 kB (0) · 1.6 kB CSS (0) | — | ✓ · ✓ · ✗ |
| LayoutHeader | 6.2 kB (0) · 1.6 kB CSS (0) | — | ✓ · ✓ · ✗ |
| TableBody | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
127 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| TableFooter | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
| TableHeader | 3.5 kB (0) · 3.3 kB CSS (0) | — | ✓ · ✓ · ✗ |
| TableRow | 6.9 kB (0) · 3.9 kB CSS (0) | — | ✓ · ✓ · ✗ |
| Table | 116.8 kB (+362 B) · 18.2 kB CSS (+297 B) | — | ✓ · ✓ · — |
| Markdown | 179.8 kB (+327 B) · 20.5 kB CSS (+294 B) | — | — · — · — |
| lab/Comments | 337.7 kB (+544 B) · 2.5 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 330.8 kB (+535 B) · 2.4 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 107.3 kB (+258 B) · 17.6 kB CSS (+255 B) | — | ✓ · ✓ · ✓ |
| TableCell | 107.7 kB (+259 B) · 17.8 kB CSS (+253 B) | — | ✓ · ✓ · ✓ |
| ContextMenu | 106.5 kB (+254 B) · 17.4 kB CSS (+242 B) | — | — · — · — |
| charts/ChartTooltip | 175.6 kB (+484 B) · 423 B CSS (0) | — | — · — · — |
| AlertDialog | 104.4 kB (+232 B) · 14.6 kB CSS (+245 B) | — | — · — · — |
| charts/Chart | 198.3 kB (+456 B) · 494 B CSS (0) | — | — · — · — |
| CommandPalette | 72.6 kB (+231 B) · 12.7 kB CSS (+224 B) | — | — · — · — |
| PowerSearch | 282.8 kB (+58 B) · 24.1 kB CSS (+397 B) | — | — · — · — |
| Dialog | 23.9 kB (+187 B) · 6.9 kB CSS (+204 B) | — | ✓ · ✓ · — |
| CheckboxList | 68.2 kB (+211 B) · 8.2 kB CSS (+163 B) | — | — · — · — |
| SelectableCard | 18.2 kB (+161 B) · 7.5 kB CSS (+197 B) | — | — · — · — |
| ClickableCard | 18.0 kB (+156 B) · 7.3 kB CSS (+195 B) | — | — · — · — |
| Card · Storybook | 6.9 kB (+152 B) · 6.6 kB CSS (+196 B) | 196 (+7) | ✓ · ✓ · — |
| List | 17.8 kB (+164 B) · 790 B CSS (+139 B) | — | ✓ · ✓ · — |
| MoreMenu | 96.0 kB (+52 B) · 17.5 kB CSS (+239 B) | — | — · — · — |
| DropdownMenu | 95.7 kB (+50 B) · 17.5 kB CSS (+239 B) | — | — · — · — |
| Tokenizer | 90.2 kB (+50 B) · 18.8 kB CSS (+234 B) | — | — · — · — |
| lab/CommentComposer | 147.5 kB (+233 B) · 1.9 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditorToolbar | 251.1 kB (+226 B) · 454 B CSS (0) | — | — · — · — |
| CheckboxListItem | 69.9 kB (+103 B) · 11.4 kB CSS (+116 B) | — | — · — · — |
| ListItem | 68.8 kB (+100 B) · 11.4 kB CSS (+116 B) | — | ✓ · ✓ · ✓ |
| lab/SelectableCardGroup | 63.3 kB (+209 B) · 162 B CSS (0) | — | — · — · — |
| lab/TransferListSelector | 113.3 kB (+203 B) · 1.9 kB CSS (0) | — | — · — · — |
| lab/TransferList | 106.6 kB (+201 B) · 1.7 kB CSS (0) | — | — · — · — |
| Toolbar | 42.3 kB (+58 B) · 8.1 kB CSS (+43 B) | — | — · — · — |
| MultiSelector | 93.6 kB (+49 B) · 16.8 kB CSS (+49 B) | — | — · — · — |
| TextArea | 61.2 kB (+52 B) · 9.3 kB CSS (+45 B) | — | — · — · — |
| DateInput | 183.0 kB (+49 B) · 17.0 kB CSS (+47 B) | — | — · — · — |
| InfoTip | 45.5 kB (+52 B) · 5.3 kB CSS (+43 B) | — | — · — · — |
| TimeInput | 158.6 kB (+50 B) · 16.0 kB CSS (+45 B) | — | — · — · — |
| SideNav | 111.0 kB (+53 B) · 11.3 kB CSS (+41 B) | — | — · — · — |
| DateTimeInput | 204.8 kB (+48 B) · 18.7 kB CSS (+45 B) | — | — · — · — |
| NumberInput | 70.6 kB (+48 B) · 11.4 kB CSS (+45 B) | — | — · — · — |
| Tooltip | 28.0 kB (+50 B) · 4.4 kB CSS (+43 B) | — | — · — · — |
| Typeahead | 78.5 kB (+53 B) · 12.4 kB CSS (+40 B) | — | — · — · — |
| BaseTypeahead | 70.1 kB (+53 B) · 10.9 kB CSS (+39 B) | — | — · — · — |
| Pagination | 108.5 kB (+44 B) · 17.7 kB CSS (+48 B) | — | — · — · — |
| StatusDot | 29.7 kB (+48 B) · 5.3 kB CSS (+44 B) | — | — · — · — |
| TabList | 42.4 kB (+51 B) · 6.5 kB CSS (+41 B) | — | — · — · — |
| TextInput | 66.6 kB (+52 B) · 11.2 kB CSS (+40 B) | — | — · — · — |
| AppShell | 89.6 kB (+47 B) · 13.5 kB CSS (+44 B) | — | — · — · — |
| Carousel | 68.7 kB (+49 B) · 10.9 kB CSS (+42 B) | — | — · — · — |
| ChatComposer | 76.8 kB (+48 B) · 12.0 kB CSS (+43 B) | — | — · — · — |
| DrawerHeader | 62.2 kB (+49 B) · 12.9 kB CSS (+42 B) | — | — · — · — |
| Lightbox | 117.9 kB (+52 B) · 10.5 kB CSS (+39 B) | — | — · — · — |
| Slider | 106.1 kB (+50 B) · 8.8 kB CSS (+41 B) | — | — · — · — |
| Stepper | 60.9 kB (+48 B) · 10.1 kB CSS (+43 B) | — | — · — · — |
| TableSelectionToolbar | 69.4 kB (+48 B) · 13.2 kB CSS (+43 B) | — | ✓ · ✓ · ✓ |
| Banner | 61.2 kB (+48 B) · 10.5 kB CSS (+42 B) | — | — · — · — |
| BottomSheet | 65.8 kB (+47 B) · 7.7 kB CSS (+43 B) | — | — · — · — |
| HoverCard | 26.4 kB (+47 B) · 4.4 kB CSS (+43 B) | — | — · — · — |
| MobileNav | 69.5 kB (+49 B) · 10.6 kB CSS (+41 B) | — | — · — · — |
| ToggleButton | 60.1 kB (+48 B) · 10.1 kB CSS (+42 B) | — | — · — · — |
| ComplexSelector | 69.8 kB (+50 B) · 11.8 kB CSS (+39 B) | — | — · — · — |
| DialogHeader | 62.0 kB (+48 B) · 11.5 kB CSS (+41 B) | — | ✓ · ✓ · ✓ |
| FileInput | 68.1 kB (+47 B) · 10.9 kB CSS (+42 B) | — | — · — · — |
| Link | 52.1 kB (+46 B) · 7.0 kB CSS (+43 B) | — | — · — · — |
| RadioListItem | 66.2 kB (+48 B) · 10.1 kB CSS (+41 B) | — | — · — · — |
| Selector | 98.3 kB (+43 B) · 17.3 kB CSS (+46 B) | — | — · — · — |
| TabMenu | 70.7 kB (+45 B) · 11.1 kB CSS (+44 B) | — | — · — · — |
| TopNavMenu | 73.5 kB (+44 B) · 11.2 kB CSS (+45 B) | — | — · — · — |
| Calendar | 70.2 kB (+48 B) · 10.5 kB CSS (+40 B) | — | — · — · — |
| CheckboxInput | 63.2 kB (+50 B) · 9.2 kB CSS (+38 B) | — | — · — · — |
| FieldLabel | 49.8 kB (+46 B) · 5.7 kB CSS (+42 B) | — | — · — · — |
| Popover | 88.0 kB (+46 B) · 14.2 kB CSS (+42 B) | — | — · — · — |
| AvatarGroupOverflow | 47.2 kB (+45 B) · 5.6 kB CSS (+42 B) | — | — · — · — |
| BreadcrumbItem | 83.4 kB (+47 B) · 12.1 kB CSS (+40 B) | — | — · — · — |
| ChatLayoutScrollButton | 59.7 kB (+48 B) · 10.1 kB CSS (+39 B) | — | — · — · — |
| Field | 53.7 kB (+48 B) · 7.2 kB CSS (+39 B) | — | — · — · — |
| SegmentedControl | 92.6 kB (+46 B) · 6.9 kB CSS (+41 B) | — | — · — · — |
| SideNavCollapseButton | 60.0 kB (+48 B) · 10.0 kB CSS (+39 B) | — | — · — · — |
| Thumbnail | 63.5 kB (+46 B) · 11.6 kB CSS (+41 B) | — | — · — · — |
| ChatLayout | 79.4 kB (+47 B) · 10.5 kB CSS (+39 B) | — | — · — · — |
| CodeBlock | 73.9 kB (+45 B) · 11.3 kB CSS (+41 B) | — | — · — · — |
| DateRangeInput | 91.2 kB (+45 B) · 12.4 kB CSS (+41 B) | — | — · — · — |
| Drawer | 49.4 kB (+42 B) · 8.3 kB CSS (+44 B) | — | — · — · — |
| IconButton | 59.2 kB (+46 B) · 10.0 kB CSS (+40 B) | — | — · — · — |
| InputGroup | 55.5 kB (+47 B) · 7.8 kB CSS (+39 B) | — | — · — · — |
| MobileNavToggle | 59.5 kB (+46 B) · 10.0 kB CSS (+40 B) | — | — · — · — |
| RadioList | 55.1 kB (+45 B) · 7.3 kB CSS (+41 B) | — | — · — · — |
| TopNav | 71.2 kB (+45 B) · 10.9 kB CSS (+41 B) | — | — · — · — |
| Button | 59.2 kB (+45 B) · 10.0 kB CSS (+40 B) | — | — · — · — |
| ChatComposerTokenElement | 74.5 kB (+45 B) · 11.2 kB CSS (+40 B) | — | — · — · — |
| ChatSendButton | 59.6 kB (+46 B) · 10.0 kB CSS (+39 B) | — | — · — · — |
| DropdownMenuSubMenu | 69.1 kB (+43 B) · 9.7 kB CSS (+42 B) | — | — · — · — |
| SideNavItem | 69.3 kB (+46 B) · 11.1 kB CSS (+39 B) | — | — · — · — |
| Switch | 100.7 kB (+46 B) · 9.9 kB CSS (+39 B) | — | — · — · — |
| Toast | 97.0 kB (+45 B) · 10.3 kB CSS (+40 B) | — | — · — · — |
| TopNavHeading | 73.8 kB (+42 B) · 11.1 kB CSS (+43 B) | — | — · — · — |
| ChatComposerInput | 74.5 kB (+44 B) · 11.2 kB CSS (+40 B) | — | — · — · — |
| ChatDictationButton | 59.7 kB (+45 B) · 10.0 kB CSS (+39 B) | — | — · — · — |
| SideNavHeading | 74.4 kB (+44 B) · 11.2 kB CSS (+40 B) | — | — · — · — |
| TopNavMegaMenu | 68.6 kB (+46 B) · 11.8 kB CSS (+38 B) | — | — · — · — |
| Avatar | 41.6 kB (+40 B) · 5.5 kB CSS (+42 B) | — | — · — · — |
| AvatarGroup | 44.4 kB (+41 B) · 5.7 kB CSS (+41 B) | — | — · — · — |
| lab/ListInput | 100.5 kB (+54 B) · 1.6 kB CSS (0) | — | — · — · — |
| lab/ChatReactionBar | 103.6 kB (+51 B) · 1.1 kB CSS (0) | — | — · — · — |
| lab/EmojiPicker | 85.2 kB (+50 B) · 751 B CSS (0) | — | — · — · — |
| lab/TourStep | 94.2 kB (+50 B) · 590 B CSS (0) | — | — · — · — |
| lab/DiffViewer | 85.6 kB (+49 B) · 2.1 kB CSS (0) | — | — · — · — |
| lab/Schedule | 104.6 kB (+49 B) · 3.9 kB CSS (0) | — | — · — · — |
| richtext/RichTextEditor | 295.7 kB (+48 B) · 2.6 kB CSS (0) | — | — · — · — |
| ProgressBar | 11.7 kB (+1 B) · 6.3 kB CSS (+46 B) | — | — · — · — |
| richtext/RichTextView | 275.0 kB (+46 B) · 2.3 kB CSS (0) | — | — · — · — |
| Heading | 11.8 kB (0) · 5.4 kB CSS (+45 B) | — | — · — · — |
| Text | 11.2 kB (0) · 5.4 kB CSS (+45 B) | — | — · — · — |
| Timer | 13.3 kB (−1 B) · 6.0 kB CSS (+46 B) | — | — · — · — |
| charts/ChartLegend | 48.5 kB (+44 B) · 224 B CSS (0) | — | — · — · — |
| Spinner | 24.1 kB (0) · 6.2 kB CSS (+44 B) | — | — · — · — |
| lab/ChatEmojiPicker | 102.4 kB (+44 B) · 773 B CSS (0) | — | — · — · — |
| lab/CommentPin | 55.5 kB (+43 B) · 1.2 kB CSS (0) | — | — · — · — |
| ChatMessageList | 27.5 kB (−2 B) · 7.0 kB CSS (+43 B) | — | — · — · — |
| ChatToolCalls | 31.4 kB (0) · 8.3 kB CSS (+40 B) | — | — · — · — |
| CommandPaletteInput | 31.0 kB (−1 B) · 7.5 kB CSS (+41 B) | — | — · — · — |
| Timestamp | 32.3 kB (0) · 10.2 kB CSS (+39 B) | — | — · — · — |
| Layout | 7.0 kB (0) · 2.3 kB CSS (0) | — | ✓ · ✓ · ✓ |
| LayoutContent | 17.7 kB (0) · 1.7 kB CSS (0) | — | ✓ · ✓ · ✓ |
| LayoutPanel | 21.0 kB (0) · 4.9 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Section | 7.8 kB (0) · 6.3 kB CSS (0) | — | — · — · — |
| lab/LineClamp | 13.3 kB (0) · 168 B CSS (0) | — | — · — · — |
Package size: @astryxdesign/core 7.00 MB packed (+3.3 kB); no new dependencies.
API changes: core +4 · ~1 · −0
Committed API report behind this build: cli 29 rows, core 40 rows, theme-butter 1 row, theme-y2k 1 row; run pnpm api:report.
5 API changes (advisory)
| Package | Where | Signature | Usage | |
|---|---|---|---|---|
| + | core |
Stylesheets · var --container-corner-end-end (./astryx.css) |
var --container-corner-end-end (./astryx.css) |
.my-scope { --container-corner-end-end: …; } |
| + | core |
Stylesheets · var --container-corner-end-start (./astryx.css) |
var --container-corner-end-start (./astryx.css) |
.my-scope { --container-corner-end-start: …; } |
| + | core |
Stylesheets · var --container-corner-start-end (./astryx.css) |
var --container-corner-start-end (./astryx.css) |
.my-scope { --container-corner-start-end: …; } |
| + | core |
Stylesheets · var --container-corner-start-start (./astryx.css) |
var --container-corner-start-start (./astryx.css) |
.my-scope { --container-corner-start-start: …; } |
| ~ | core |
. · Values · const overlayPaddingReset |
const overlayPaddingReset: Readonly<{ readonly reset: Readonly<{ readonly '--container-padding-inline-start': stylex.StyleXClassNameFor<"--container-padding-inline-start", "0px">; readonl … #15cd7287 → const overlayPaddingReset: Readonly<{ readonly reset: Readonly<{ readonly '--container-padding-inline-start': stylex.StyleXClassNameFor<"--container-padding-inline-start", "0px">; readonl … #2477cc06 |
import {overlayPaddingReset} from '@astryxdesign/core' |
Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Changes requested: the corner fix works where a Table or a bleeding List row really reaches a rounded Card, Dialog or BottomSheet corner, but four issues remain.
- The corner variables inherit through every wrapper while List and Table test
:first-childand:last-childof their own parent, so PowerSearch's Filters sheet now draws its first filter row with 11px rounded top corners in the middle of the sheet; publish square corners wherever padding is published or zeroed (the PowerSearch sheet styles, the DropdownMenu and ContextMenu sheet styles and RichTextEditor's wrapper), take a corner only as a direct child of the element that published it, and add a wrapped-list case to the Chromium spec. - Miss: a Table that is neither its container's first nor last child still takes the corner less the block padding at every corner, so between a heading and a footer in a padding-0 Dialog its focus ring and striped last row round 12px in the middle of the dialog (4px in a Card with
padding={2}), against the record's "only where its bleed reaches it" and the changeset's square claim; default those corners to 0px as List does and reword the record's "elsewhere" sentence. - Miss:
packages/core/src/theme/derivedVarRegistry.test.tsfails on this head because--_sheet-radiusand the four--_list-corner-*variables are undocumented; document--_sheet-radiusinBottomSheet.doc.mjswith aborderRadiusderived entry, as Card and Dialog do for their radius, and list--_list-corner-*as private system variables. List.doc.mjsstill tells builders thatbleedrows have square corners "like Table rows in a Card"; describe the corner exception the way the amended FR5 does.
The two Miss: items were in this same code when the earlier automated review ran and should have been reported then. The record changes carry an engineering owner's approval for this head, so no direction question is open. CI has not run yet because the pull request is a draft.
[Automated review]
… edge A rounded container publishes a corner only while a reader marked data-container-corner is its first or last child, and none while a reader sits deeper, so a list inside a wrapper element (PowerSearch's Filters sheet) or a table between other content stays square. Table's middle corners default to square. BottomSheet documents --_sheet-radius with a borderRadius derived entry; the List corner variables are private system variables; List docs and the changeset describe the corner exception. Square-corner publication at other publishers is no longer needed and is removed.
|
/approve-spec 5baa4a2 |
There was a problem hiding this comment.
Changes requested: the corner fix works on this head (a Table that fills a Card now takes the card's 12px corner and keeps its whole focus ring, and the square cases stay square), but two items from the previous review are unchanged and still need a fix:
- The changeset (line 5) and the List
edgedocs (List.doc.mjs:73) say any Table or bleeding List that is a rounded Card, Dialog or BottomSheet's first or last child now rounds, but it stays square while another Table or bleeding List sits deeper in the same container, and a List with aheadernever rounds its first row, so please add those conditions to both texts. Card.tsx:99-128andDialog.tsx:311-340hold the same corner-publication block andBottomSheetPanel.tsx:460-477repeats half of it, so please move it into one shared style beside the existing container padding styles that each host feeds its own radius, and delete the copies.
On the :has() cost question: in a Card whose first child is a 400-row Table, a style update after a cell's text changes took about 0.2 ms longer than on main and a row insert about 0.23 ms longer, while class changes cost the same, which looks acceptable but grows with very large tables. The build, test and docsite lanes are deferred on this push and still need to run before merge.
[Automated review]
…he changeset and List docs name every square case Card, Dialog, and BottomSheet set --_container-corner-block-start/-end and apply containerCornerStyles.publish instead of three copies of the :has() block. Overlay and layout roots reset the corners with the padding. The changeset and List edge docs add the deeper-reader and header conditions.
humbertovirtudes
left a comment
There was a problem hiding this comment.
Reviewed at 5baa4a2. No blocking findings in the code.
The corner mechanism reads correctly at this head, and the items from the earlier review of 1278272 look addressed:
- Publishers now pass a corner only to a direct first or last child, and none while a reader sits deeper (Card.tsx, Dialog.tsx, BottomSheetPanel.tsx), so a wrapped List stays square; the wrapped-list case is in the Chromium spec.
- Table's region defaults to a square corner unless it is its container's first or last child (Table.tsx:146-161).
- --_sheet-radius is documented with a borderRadius derived entry, and --_list-corner-* is listed as private.
- List.doc.mjs describes the bleed corner exception the way FR5 now does.
Lint and typecheck pass at this head. Holding approval until the unit, visual and accessibility lanes report: build, test and docsite-test stopped at the heavy-CI deferral gate, so the new Chromium spec has not run in CI yet.
Non-blocking:
- List.doc.mjs: most of the 232 changed lines are formatter-only (keywords, descriptions, bestPractices, anatomy) around a one-sentence change. Restoring the original formatting would keep the diff scoped. In container-padding.md, INV1 (line 294) is left unwrapped.
- Coverage: consider spec cases for the List-with-header path (bleedCornersBelowHeader), a partial corner (radius less a nonzero block padding below the radius), and a full-screen Dialog publishing 0.
- The publisher rule uses a subtree :has() on every Card, Dialog and BottomSheet content. A quick check of mutation cost with a large Table inside a Card would close that question.
|
/approve-spec a345f2d |
There was a problem hiding this comment.
Approved pending CI: the build, test and docsite lanes have not run on this head yet.
The corner fix works on this head. A Table that fills a Card takes the card's 12px corner and keeps its whole focus ring. The first and last bleeding List rows follow a padding-0 Dialog's corners, and every square case renders as before. The shared corner style now lives in a module the package does not export, so the change adds no public import, and the corner record text is approved for this head.
Non-blocking:
containerCorners.stylex.ts: the header says the corner variables stay out of public API. OnlycontainerCornerStylesstays private, because the--container-corner-*variables still ship inastryx.css.component:ListDEC-4 still says bleed rows have "square corners" in a padded host, while FR5's exception rounds the end rows wherever the host's padding is below its corner radius. A pointer from DEC-4 to that exception would keep the record consistent.
[Automated review]
| * @position Layout utility beside container(). Internal: the package does not | ||
| * export this module, so the corner variables stay out of public API. |
There was a problem hiding this comment.
Non-blocking (comment accuracy): the unexported module keeps only containerCornerStyles private. The four --container-corner-* variables still ship in astryx.css and are listed in the core API report. Suggested rewrite: "Internal: the package does not export this module."
|
/approve-spec a345f2d |
Main's BottomSheet keeps a grab-bar band above its content, so a full-bleed child no longer reaches the sheet's top corners. BottomSheet therefore publishes no corner: its corner publication and --_sheet-radius are dropped, and a table at a sheet's top stays square. Card and Dialog are unchanged.
…under its grab-bar band
|
/approve-spec 498caee |
There was a problem hiding this comment.
Changes requested: the corner fix works on this head (a Table that fills a rounded Card or Dialog keeps its whole focus ring, a bleeding List's first and last rows follow the corner, the Chromium spec passes, and every unchanged layout renders identically), but one record sentence now contradicts the amended FR5.
- Miss:
component:ListDEC-4 inList.spec.mdstill says bleed rows reach the host's padding edge "with square corners", while the amended FR5, which cites DEC-4, and this head round the first and last rows in a rounded host (8px in a Dialog withpadding={1}), so please carry FR5's exception into DEC-4 the way Table's DEC-2 carries its FR13 exception.
Because the fix edits a record, an engineering owner records the decision again by commenting /approve-spec <full head SHA> on the new head; the author may do so as an engineering owner. Three small non-blocking comment fixes are inline.
[Automated review]
| // closer to the row's edge than its own inset. Square corners where the row | ||
| // meets the container's straight sides; the first and last rows take the | ||
| // corners the list publishes for a rounded container's corner. |
There was a problem hiding this comment.
Non-blocking (comment style): the added sentence runs 26 words across two topics. Suggest: "Rows are square where they meet the container's straight sides. The first and last rows take the corner the list passes them."
| // The container-padding record's corner geometry: a rounded Card, Dialog, | ||
| // or BottomSheet hands its block-edge radius to the shared corner | ||
| // publication beside container(). |
There was a problem hiding this comment.
Non-blocking (stale comment): BottomSheet no longer publishes a corner at this head; only Card and Dialog do. Suggest: "a rounded Card or Dialog hands its block-edge radius to the shared corner publication beside container()."
|
/approve-spec 79d0c6f |
There was a problem hiding this comment.
Changes requested: the corner fix works on this head (a Table that fills a rounded Card or Dialog keeps its whole focus ring, a bleeding List's first and last rows follow the corner, the Chromium spec passes, and every unchanged layout renders identically), and DEC-4 now carries FR5's exception, but one more record sentence contradicts the change.
- Miss:
component:ListItemFR2 inListItem.spec.md(and its "Divided list" state) still says thehasDividerssetting draws rows "with square corners", while this head rounds the first and last rows of a dividededge="bleed"list in a rounded host (12px in a padding-0 Dialog, 8px withpadding={1}, as in this pull request's own stories), so please carry List FR5's exception into that clause and state.
Because the fix edits a record, an engineering owner records the decision again by commenting /approve-spec <full head SHA> on the new head; the author may do so as an engineering owner. The three non-blocking comment threads from the last review are still open.
[Automated review]
…exception for bleed end rows
|
/approve-spec 369e1a0 |
1 similar comment
|
/approve-spec 369e1a0 |
There was a problem hiding this comment.
Approved pending CI: the build, test and docsite lanes have not run on this head yet.
The corner fix works on this head: a Table that fills a rounded Card or Dialog keeps its whole focus ring, a bleeding List's first and last rows follow the corner less the padding they keep, and every layout that does not reach a corner renders as before. component:ListItem FR2 and its "Divided list" state now carry List FR5's end-row exception, so the records agree, and the corner record text is approved for this head.
Non-blocking:
List.tsx:94-96: theedgeJSDoc says the end rows take the container's corner, but they take it less the container's block padding, so rows in a default Card stay square;List.doc.mjsalready says this.ListItem.spec.md:195: the note that the Chromium spec checks the end-row exception sits under "Read from source, with no focused test yet"; the FR2 row of the verification map is its place.- Three comment threads from earlier reviews are still open (
containerCorners.stylex.ts:9,ListItem.tsx:217,derivedVarRegistry.test.ts:320).
[Automated review]
| * reach the container's edges, like Table rows in a Card. Rows are | ||
| * square, except that the first or last row of a list that is a rounded | ||
| * Card's or Dialog's first or last child takes its corner |
There was a problem hiding this comment.
Non-blocking (doc accuracy): an end row takes the container's corner less the container's block padding, so in a default Card (16px padding, 12px radius) the rows stay square, as the BleedListInCard story shows, and with a header the first row never rounds. List.doc.mjs already states the rule. Suggest: "Rows are square, except that a list that is a rounded Card's or Dialog's first or last child gives its first row (when it has no header) or last row that corner, less the container's block padding."
|
|
||
| - FR1: `interactiveRef`, `rel`, and `ref` reaching the Item row. | ||
| - FR2: the divider border and square corners. | ||
| - FR2: the divider border and square corners. The `bleed` end-row corner exception is checked by `ContainerCorners.a11y.chromium.spec.ts` (`component:List` FR5). |
There was a problem hiding this comment.
Non-blocking: this bullet sits under "Read from source, with no focused test yet", but its new sentence names a test. Adding ContainerCorners.a11y.chromium.spec.ts to the FR2 row of the verification map above (and to verified_by) would keep that heading true.
* feat(core): createReorderable makes List rows reorderable
createReorderable({onReorder, isReorderable}) makes a collection's
reorder behavior, and List takes it as `reorderable`. Each ListItem
with an itemKey gets a reorder handle at its end, and each committed
move calls onReorder({key, to}) once.
Under a finger, a 150 ms hold on a handle picks its row up, and a
flick on it still scrolls. The rows stay still while a dimmed source,
a preview and an insertion line show the move. On release they glide
on the shared settle role. A pen holds the same way where the primary
pointer is coarse. A mouse, or a pen where the primary pointer is
fine, drags a handle at once. A click, Space or Enter turns on reorder
mode: the insertion line marks the row's place, the arrow keys move
the row and announce its place, and Escape ends the mode.
The reorder's machinery ships with the object, so a List without
`reorderable` loads none of it. The UIKit table's reorder values and
the drop model come in here with their first user. With an
animatedLayout handle, a drag's commits stay the reorder's own. The
CLI lists createReorderable with the hooks.
* feat(List): reorder mode's hint, its moves and Done as buttons
While a reorderable List row is in reorder mode, a hint anchored below
its handle shows Move up, Move down and Done until the mode ends. Each
move does what its key does, with the same announcement, and leaves the
focus on the handle. Done ends the mode as Escape does, keeping the
moves. So a pointer or a finger can reorder by taps alone, as WCAG
2.5.7 asks. A screen reader that moves its focus into the hint keeps
the mode, and the focus goes back to the handle.
The hint shares the keyboard hint's layer: hooks/anchoredHint.tsx holds
the anchored hint both render, and useKeyboardHint renders its hint
through it unchanged. The hint joins the shared dismissal stack, so an
Escape in it ends the mode and leaves a Dialog below it open.
* fix(List): a move that renames a row keeps reorder mode
A row named by its place, as ListInput names its records, gets a new
name after each move. The handle now records its name apart from its
registration, so a new name leaves the row in reorder mode. A move is
announced by the names the rows have when it lands.
Comments now say that a drag ends reorder mode with its announcement,
and test comments match the hold and blur behavior.
* fix(cli): a create* factory with its own hook lists beside that hook
createReorderable's discovery rule lists a create*.doc.mjs documented
as a hook. createAnimator, createPanGesture and createDragToSnapPoints
are documented as listed beside their own hooks, and each names that
hook in relatedHooks. Such a factory now stays out of the hook list,
so hook --list matches main for them and adds only createReorderable.
The CLI's search goldens match main's again.
* docs(List): split comment sentences over 25 words
Five comments in the reorder's engine, touch glide, drop model and
UIKit table each held one sentence over 25 words, and the reorder
mode spec's header ran two sentences together. Each is now split, with
the same meaning.
* fix(List): a finger held on a reorder handle selects no text
The list attaches its hold with manageStyle: false, so its handles keep
their own touch-action. The gesture host then leaves the hold's
selection lock to the list as well, and the list brought none. On iOS a
still finger on a handle started a text selection on the row's label,
and the drag grew it across the rows. The list now locks selection on
itself from a finger's or a pen's touch-down on a handle until it
lifts, through utils/selectionLock. A mouse never takes the lock.
* fix(List): a drag crossing rows reads no layout
The insertion line read the dragged row's offsetLeft and offsetWidth
right after writing the line's position, at each crossing and each
reorder-mode move. Each read forced a style pass. The drag now reads
the row's span once at the pick-up, in the list's coordinates and
beside its other measurements, and reorder mode reads everything
before its first write. A comment on the touch hold now says that the
list locks text selection itself.
* fix(List): the reorder imports the touch hit area from internal
Main moved touchHitArea.stylex from utils to internal. The List
reorder handle and its engine now import it from there.
* fix(List): the reorder finds its scroller through core's shared walk
The reorder engine walked a list's ancestors for its scroller with its
own copy of the walk that scrollingAncestor shares. nearestScroller,
which wraps that walk and falls back to the document's scroller, moves
from the keyboard module to utils/scrollingAncestor.ts, and the reorder
takes its scroller from there. The keyboard module re-exports it, so
its importers keep their imports.
New browser cases hold a dragged row near a scroll edge. The page
scrolls, and stops once the list's end is in view, with the preview
still under the pointer. A box the list scrolls in scrolls while the
page stays.
* fix(List): a dragged row's preview and line keep its inline start in RTL
The preview and the insertion line took the row's physical left as
their inline start. In right-to-left that is the right edge, so a row
set in from the list's start drew both shifted by its inset. Each now
converts the left to an inline start: the distance from the list's
right edge in right-to-left.
A new browser case drags a row set in 32 px from the list's start, in
both directions, and matches the preview and the line to the row.
* fix(List): picking a row up lays the page out once
The pick-up read the list's position after the rows' first writes and
read the dragged row's box again to place its preview once the list
was positioned. Then it wrote the preview's first offset, and the
preview's animator read its style back twice. Each read forced a style
or layout pass before the first frame, which
architecture:react-component-runtime INV18 rules out.
The pick-up now makes every read first. The preview's span is measured
from the list's padding edge before the list is positioned, and its
first offset, none, needs no write. The preview holds its own
will-change, so its animator reads no stylesheet at its first move.
A new browser case traces the pick-up under a finger: six forced passes
before, none after.
* spec(AST-103): a held drag near a scroll edge scrolls toward it
FR3 now states the reorder's edge autoscroll in the spec owners' words:
a held drag near the scroll container's edge scrolls it toward that
edge, faster the nearer it is, and stops at the end. Its verification
row names the browser checks of a drag held near the page's edge and
near the edge of a box the list scrolls in, the unit checks of the
autoscroll step and its timer, and the failures they catch.
* fix(List): a dragged row's preview joins no form or radio group
The preview was a plain clone of the row, so it kept each control's
name. Laid beside the row, a copied checked radio took its group from
the row's own: the row's radio showed unchecked for the whole drag, and
a drop in place left no radio checked.
The clone that takes no part in the page moves from transientCopy.ts
into its own module, inertClone.ts, with paintedBackground: names, ids
and labels stripped, no form, inert and hidden. The swap's and the
layer exit's copies keep it through inertCopy, and the transient copy
mechanism stays theirs. The preview is now that clone, and its
background comes from paintedBackground. The clone reads the row's
styles, so it is made before the pick-up's first write. A boundary test
keeps the clone to the copy mechanism and the reorder's preview.
A new browser case drags a row whose radio is checked: the radio showed
unchecked during the drag before, and stays checked now, through a drop
in place.
* fix(List): a scroll during a drag keeps the drop under the pointer
The drag placed its preview and line from the pick-up's snapshot, plus
its own autoscroll. A wheel or trackpad scroll during a mouse drag
moved the rows under a still pointer: the preview and the line rode
with them, and the drop landed where the pointer had been.
The engine now watches its scroller's scroll events through
subscribeInput, and skips the ones its own autoscroll causes. After any
other, it reads the scroller's offset once, before its writes: at the
next move, the next autoscroll tick or the drop, or else in a later
frame once the writes so far have rendered. So the read forces no
layout. The change in the offset joins the drag's own scrolled
distance, and the preview and the line are placed again.
Two new browser cases wheel three rows mid-drag. On the previous head
the preview and the line rode 111 px from the pointer; now both stay
under it, and the drop lands three rows further. A layout trace of the
wheel with the pointer moving finds no forced pass, and at most one
offset read per scrolled frame. A build that reads in the scroll event
itself forces a style pass there.
* spec(react-component-runtime): INV18 allows the reorder's scroll read
INV18 names one more read a scroll path may make, in the spec owners'
words: during a reorder drag, the engine reads its scroller's scroll
offset once per frame after a scroll it didn't cause, before its
writes. A verification row names the browser checks: a wheel scroll
mid-drag keeps the preview and the drop line under the pointer, with
no forced layout and one read per such frame.
* chore(lint): the provenance baseline drops List's two removed citations
The first commit removed two record citations from comments in List.tsx
and ListItem.tsx. The comment-provenance baseline still listed both,
so its check failed. The baseline script, run again, drops only those
two entries.
* Merge branch 'main' into uikit/c13-list-reorder
* fix(List): a drop or key move reads its rows once, before it writes
A drop read each row's layout after writing the row before it, and
read the theme's motion tempo again for each gliding row. So it forced
one style pass per row: 30 for a 30-row list in Chromium. A reorder
mode key move read each row between glides too, then scrolled to the
row and placed the insertion line after the glides had started.
Both now read every row, the line's place and the scroll first, and
write after. A row left at rest at 0 takes no write, since each
animator write reads its style back. The scroll now runs before the
rows slide, so it brings the row's new place into view, not its old
one. A spring back reads the tempo once too.
* docs(List): a key move's first glides cost a style pass per row
Where the primary pointer is coarse, a reorder mode move forces one
style pass for each row that glides for the first time: the shared
animator reads the row's will-change then. The List record names this
as an implementation gap.
* Merge main into createReorderable's List reorder
Main's #8215 rewrote the zoom section of motion/MEASUREMENTS.md, the
last section before the reorder section this pull request appends.
The resolution keeps main's zoom text and table, then the reorder
section as it was.
* docs(motion): the reorder measurements name no batch label
The reorder section and the reorder constants' sources named their
measurement batches by a label the repository never defines. They now
give the lab, device and date, as the other measured sources do.
* Merge branch 'main' into uikit/c13-list-reorder
* Merge main into createReorderable's List reorder
Main's #10586 put List.doc.mjs in Prettier's format and changed edge's
bleed text, beside the reorderable prop and anatomy entries this pull
request adds. The resolution keeps main's file and adds this pull
request's entries in that format.
* refactor(List): the reorder warns once through createDevWarnings
The reorder handle and the reorder session each kept a flag of their
own to warn once. Core's createDevWarnings now owns per-instance
warn-once, as Dialog, Resizable and TabList use it, so both call it
and the flags go. Each still warns once: a handle about a row with no
name, a session about rows with no item key. The two warning tests
now render twice, so a second warning fails them.
Co-authored-by: Cindy Zhang <[email protected]>
) * feat(core): createReorderable makes List rows reorderable createReorderable({onReorder, isReorderable}) makes a collection's reorder behavior, and List takes it as `reorderable`. Each ListItem with an itemKey gets a reorder handle at its end, and each committed move calls onReorder({key, to}) once. Under a finger, a 150 ms hold on a handle picks its row up, and a flick on it still scrolls. The rows stay still while a dimmed source, a preview and an insertion line show the move. On release they glide on the shared settle role. A pen holds the same way where the primary pointer is coarse. A mouse, or a pen where the primary pointer is fine, drags a handle at once. A click, Space or Enter turns on reorder mode: the insertion line marks the row's place, the arrow keys move the row and announce its place, and Escape ends the mode. The reorder's machinery ships with the object, so a List without `reorderable` loads none of it. The UIKit table's reorder values and the drop model come in here with their first user. With an animatedLayout handle, a drag's commits stay the reorder's own. The CLI lists createReorderable with the hooks. * feat(List): reorder mode's hint, its moves and Done as buttons While a reorderable List row is in reorder mode, a hint anchored below its handle shows Move up, Move down and Done until the mode ends. Each move does what its key does, with the same announcement, and leaves the focus on the handle. Done ends the mode as Escape does, keeping the moves. So a pointer or a finger can reorder by taps alone, as WCAG 2.5.7 asks. A screen reader that moves its focus into the hint keeps the mode, and the focus goes back to the handle. The hint shares the keyboard hint's layer: hooks/anchoredHint.tsx holds the anchored hint both render, and useKeyboardHint renders its hint through it unchanged. The hint joins the shared dismissal stack, so an Escape in it ends the mode and leaves a Dialog below it open. * fix(List): a move that renames a row keeps reorder mode A row named by its place, as ListInput names its records, gets a new name after each move. The handle now records its name apart from its registration, so a new name leaves the row in reorder mode. A move is announced by the names the rows have when it lands. Comments now say that a drag ends reorder mode with its announcement, and test comments match the hold and blur behavior. * fix(cli): a create* factory with its own hook lists beside that hook createReorderable's discovery rule lists a create*.doc.mjs documented as a hook. createAnimator, createPanGesture and createDragToSnapPoints are documented as listed beside their own hooks, and each names that hook in relatedHooks. Such a factory now stays out of the hook list, so hook --list matches main for them and adds only createReorderable. The CLI's search goldens match main's again. * docs(List): split comment sentences over 25 words Five comments in the reorder's engine, touch glide, drop model and UIKit table each held one sentence over 25 words, and the reorder mode spec's header ran two sentences together. Each is now split, with the same meaning. * fix(List): a finger held on a reorder handle selects no text The list attaches its hold with manageStyle: false, so its handles keep their own touch-action. The gesture host then leaves the hold's selection lock to the list as well, and the list brought none. On iOS a still finger on a handle started a text selection on the row's label, and the drag grew it across the rows. The list now locks selection on itself from a finger's or a pen's touch-down on a handle until it lifts, through utils/selectionLock. A mouse never takes the lock. * fix(List): a drag crossing rows reads no layout The insertion line read the dragged row's offsetLeft and offsetWidth right after writing the line's position, at each crossing and each reorder-mode move. Each read forced a style pass. The drag now reads the row's span once at the pick-up, in the list's coordinates and beside its other measurements, and reorder mode reads everything before its first write. A comment on the touch hold now says that the list locks text selection itself. * fix(List): the reorder imports the touch hit area from internal Main moved touchHitArea.stylex from utils to internal. The List reorder handle and its engine now import it from there. * fix(List): the reorder finds its scroller through core's shared walk The reorder engine walked a list's ancestors for its scroller with its own copy of the walk that scrollingAncestor shares. nearestScroller, which wraps that walk and falls back to the document's scroller, moves from the keyboard module to utils/scrollingAncestor.ts, and the reorder takes its scroller from there. The keyboard module re-exports it, so its importers keep their imports. New browser cases hold a dragged row near a scroll edge. The page scrolls, and stops once the list's end is in view, with the preview still under the pointer. A box the list scrolls in scrolls while the page stays. * fix(List): a dragged row's preview and line keep its inline start in RTL The preview and the insertion line took the row's physical left as their inline start. In right-to-left that is the right edge, so a row set in from the list's start drew both shifted by its inset. Each now converts the left to an inline start: the distance from the list's right edge in right-to-left. A new browser case drags a row set in 32 px from the list's start, in both directions, and matches the preview and the line to the row. * fix(List): picking a row up lays the page out once The pick-up read the list's position after the rows' first writes and read the dragged row's box again to place its preview once the list was positioned. Then it wrote the preview's first offset, and the preview's animator read its style back twice. Each read forced a style or layout pass before the first frame, which architecture:react-component-runtime INV18 rules out. The pick-up now makes every read first. The preview's span is measured from the list's padding edge before the list is positioned, and its first offset, none, needs no write. The preview holds its own will-change, so its animator reads no stylesheet at its first move. A new browser case traces the pick-up under a finger: six forced passes before, none after. * spec(AST-103): a held drag near a scroll edge scrolls toward it FR3 now states the reorder's edge autoscroll in the spec owners' words: a held drag near the scroll container's edge scrolls it toward that edge, faster the nearer it is, and stops at the end. Its verification row names the browser checks of a drag held near the page's edge and near the edge of a box the list scrolls in, the unit checks of the autoscroll step and its timer, and the failures they catch. * fix(List): a dragged row's preview joins no form or radio group The preview was a plain clone of the row, so it kept each control's name. Laid beside the row, a copied checked radio took its group from the row's own: the row's radio showed unchecked for the whole drag, and a drop in place left no radio checked. The clone that takes no part in the page moves from transientCopy.ts into its own module, inertClone.ts, with paintedBackground: names, ids and labels stripped, no form, inert and hidden. The swap's and the layer exit's copies keep it through inertCopy, and the transient copy mechanism stays theirs. The preview is now that clone, and its background comes from paintedBackground. The clone reads the row's styles, so it is made before the pick-up's first write. A boundary test keeps the clone to the copy mechanism and the reorder's preview. A new browser case drags a row whose radio is checked: the radio showed unchecked during the drag before, and stays checked now, through a drop in place. * fix(List): a scroll during a drag keeps the drop under the pointer The drag placed its preview and line from the pick-up's snapshot, plus its own autoscroll. A wheel or trackpad scroll during a mouse drag moved the rows under a still pointer: the preview and the line rode with them, and the drop landed where the pointer had been. The engine now watches its scroller's scroll events through subscribeInput, and skips the ones its own autoscroll causes. After any other, it reads the scroller's offset once, before its writes: at the next move, the next autoscroll tick or the drop, or else in a later frame once the writes so far have rendered. So the read forces no layout. The change in the offset joins the drag's own scrolled distance, and the preview and the line are placed again. Two new browser cases wheel three rows mid-drag. On the previous head the preview and the line rode 111 px from the pointer; now both stay under it, and the drop lands three rows further. A layout trace of the wheel with the pointer moving finds no forced pass, and at most one offset read per scrolled frame. A build that reads in the scroll event itself forces a style pass there. * spec(react-component-runtime): INV18 allows the reorder's scroll read INV18 names one more read a scroll path may make, in the spec owners' words: during a reorder drag, the engine reads its scroller's scroll offset once per frame after a scroll it didn't cause, before its writes. A verification row names the browser checks: a wheel scroll mid-drag keeps the preview and the drop line under the pointer, with no forced layout and one read per such frame. * feat(lab): TransferList reorders through core's createReorderable The selected panel is a core List with `reorderable`, its rows ListItems keyed by value, each ending with core's reorder handle. The panel's own pointer drag, preview, grip and keyboard session go. A finger holds the handle a moment before it drags, so a flick scrolls and a pinch zooms. Reorder mode moves a row from the keyboard or the hint's buttons. TransferList and TransferListSelector take the owner's object as `reorderable`: `isReorderable(value)` says which values move, and each move goes to `onReorder({key, to})`. A staged selector aims the moves at its draft, so Cancel drops them. An adapter in core's internal reorder entry runs the owner's engine with those moves, and the owner's `start(key)` still finds the panel's list. * fix(lab): a disabled TransferList keeps reordering off Main's TransferList isDisabled was written for TransferList's own reorder grip, which this change replaces with core List's handle. It now works on the createReorderable path: - Every option is transfer-disabled without its own message, and the search field is disabled but focusable. - Reordering pauses as it does while a search filters the panel. No handle shows, so none stays pressed. - A handle with focus unmounts, so focus moves to its row's Remove button, which stays focusable. - A move or a cancel that ends after the list became disabled changes nothing. * docs(lab): split comment sentences over 25 words Three comments in TransferList and its reorder specs each held one sentence over 25 words. Each is now split, with the same meaning. * chore(lint): the provenance baseline drops List's two removed citations The first commit removed two record citations from comments in List.tsx and ListItem.tsx. The comment-provenance baseline still listed both, so its check failed. The baseline script, run again, drops only those two entries. * fix(lab): a disabled TransferList keeps focusable disabled handles A disabled TransferList hid its reorder handles and moved the focus from a focused handle to its row's Remove button. Now each selected row is a disabled ListItem. Its handle keeps aria-disabled, its place in the tab order and the focus, and core List ends a reorder mode or sends a drag home. Each handle shows the "cannot be reordered" tooltip on hover and keyboard focus, and its description reads it. A disabled row still takes the pointer, so its disabled controls show their tooltips. The row dims its Remove button, so Remove drops its own disabled dim and reads at half opacity, as before. * fix(TransferList): its JSDoc is on the component again TransferList's JSDoc and example sat above the private tooltip props, so the component lost its documentation in editors and in the emitted declarations. The tooltip code now comes before that block. A disabled list's handle tooltip took the row's first toggle button. A renderOption that renders its own toggle comes first, so that toggle got the "cannot be reordered" description. The tooltip now takes the row's last toggle, which is Core's handle at the row's end. * docs(TransferList): it reorders only with reorderable The spec owners kept reordering opt-in: with no reorderable, a TransferList no longer reorders. Its migration guidance now leads with that, and its last sentence, which said the same, goes. * docs(TransferList): the anatomy names the reorder hint spec:AST-103 FR4 makes the reorder-mode hint a part named in each adopting collection's anatomy. TransferList shows it below a selected row's handle, so its anatomy gains a Reorder hint entry, as List's has. A test title that still said reordering is on by default now says the handle comes with reorderable. * spec(react-component-runtime): INV13 lists List's reorder session spec:AST-107 FR7 lets a Core or Lab component reach internals only for a job the public layer does not expose, listed among INV13's known public-API gaps. TransferList adapts its reorderable object to its own values, and ListInput's rows are not ListItems. Both join List's reorder session through Core's internal reorder entry, because createReorderable's plain-element attach (spec:AST-103 FR4b) is not built. INV13 now lists that job. * fix(TransferList): the phone layout's panels stop clipping On iOS, a TransferList panel's clip around the selected list's own inline clip drew the row flush with the panel's bottom edge one point off for the length of the drop's glide. In the phone layout the panel body does not scroll, so the clip kept nothing in. The panel now clips only in the wide layout, where its body scrolls. In iOS Simulator takes of a six-row drag, the row at the edge sat 3 device pixels off for 14 and 15 frames on the previous head, and for 0 frames with this change. Every TransferList story at rest, and the last row in reorder mode, keep the same pixels without the clip in WebKit. A Chromium trace of the glide under a coarse pointer paints nothing per frame, before and after. * Merge branch 'main' into uikit/c13-list-reorder * Merge branch 'uikit/c13-list-reorder' into uikit/c13-transferlist-reorder * fix(List): a drop or key move reads its rows once, before it writes A drop read each row's layout after writing the row before it, and read the theme's motion tempo again for each gliding row. So it forced one style pass per row: 30 for a 30-row list in Chromium. A reorder mode key move read each row between glides too, then scrolled to the row and placed the insertion line after the glides had started. Both now read every row, the line's place and the scroll first, and write after. A row left at rest at 0 takes no write, since each animator write reads its style back. The scroll now runs before the rows slide, so it brings the row's new place into view, not its old one. A spring back reads the tempo once too. * docs(List): a key move's first glides cost a style pass per row Where the primary pointer is coarse, a reorder mode move forces one style pass for each row that glides for the first time: the shared animator reads the row's will-change then. The List record names this as an implementation gap. * Merge branch 'uikit/c13-list-reorder' into uikit/c13-transferlist-reorder * Merge main into createReorderable's List reorder Main's #8215 rewrote the zoom section of motion/MEASUREMENTS.md, the last section before the reorder section this pull request appends. The resolution keeps main's zoom text and table, then the reorder section as it was. * docs(motion): the reorder measurements name no batch label The reorder section and the reorder constants' sources named their measurement batches by a label the repository never defines. They now give the lab, device and date, as the other measured sources do. * Merge branch 'uikit/c13-list-reorder' into uikit/c13-transferlist-reorder * Merge branch 'main' into uikit/c13-list-reorder * Merge main into createReorderable's List reorder Main's #10586 put List.doc.mjs in Prettier's format and changed edge's bleed text, beside the reorderable prop and anatomy entries this pull request adds. The resolution keeps main's file and adds this pull request's entries in that format. * refactor(List): the reorder warns once through createDevWarnings The reorder handle and the reorder session each kept a flag of their own to warn once. Core's createDevWarnings now owns per-instance warn-once, as Dialog, Resizable and TabList use it, so both call it and the flags go. Each still warns once: a handle about a row with no name, a session about rows with no item key. The two warning tests now render twice, so a second warning fails them. * Merge #8139's final head This takes #8139's last head (92365e4), the one that squash-merged, before the merge of main. * Merge main, where #8139 squash-merged #8139 landed on main as one squash commit (a28d586), which carries none of its history. So this merge takes #8139's final head (92365e4) as its merge base. This pull request's own changes stay as they were. * chore(changeset): Core's internal reorder entry serves TransferList This pull request's Core changes ship to consumers: the internal reorder entry, and the reorder session's support for an object a Lab collection adapts. Lab is private, so the Changeset names @astryxdesign/core alone, as an internal chore. Co-authored-by: Cindy Zhang <[email protected]>
* feat(core): createReorderable makes List rows reorderable
createReorderable({onReorder, isReorderable}) makes a collection's
reorder behavior, and List takes it as `reorderable`. Each ListItem
with an itemKey gets a reorder handle at its end, and each committed
move calls onReorder({key, to}) once.
Under a finger, a 150 ms hold on a handle picks its row up, and a
flick on it still scrolls. The rows stay still while a dimmed source,
a preview and an insertion line show the move. On release they glide
on the shared settle role. A pen holds the same way where the primary
pointer is coarse. A mouse, or a pen where the primary pointer is
fine, drags a handle at once. A click, Space or Enter turns on reorder
mode: the insertion line marks the row's place, the arrow keys move
the row and announce its place, and Escape ends the mode.
The reorder's machinery ships with the object, so a List without
`reorderable` loads none of it. The UIKit table's reorder values and
the drop model come in here with their first user. With an
animatedLayout handle, a drag's commits stay the reorder's own. The
CLI lists createReorderable with the hooks.
* feat(List): reorder mode's hint, its moves and Done as buttons
While a reorderable List row is in reorder mode, a hint anchored below
its handle shows Move up, Move down and Done until the mode ends. Each
move does what its key does, with the same announcement, and leaves the
focus on the handle. Done ends the mode as Escape does, keeping the
moves. So a pointer or a finger can reorder by taps alone, as WCAG
2.5.7 asks. A screen reader that moves its focus into the hint keeps
the mode, and the focus goes back to the handle.
The hint shares the keyboard hint's layer: hooks/anchoredHint.tsx holds
the anchored hint both render, and useKeyboardHint renders its hint
through it unchanged. The hint joins the shared dismissal stack, so an
Escape in it ends the mode and leaves a Dialog below it open.
* fix(List): a move that renames a row keeps reorder mode
A row named by its place, as ListInput names its records, gets a new
name after each move. The handle now records its name apart from its
registration, so a new name leaves the row in reorder mode. A move is
announced by the names the rows have when it lands.
Comments now say that a drag ends reorder mode with its announcement,
and test comments match the hold and blur behavior.
* fix(cli): a create* factory with its own hook lists beside that hook
createReorderable's discovery rule lists a create*.doc.mjs documented
as a hook. createAnimator, createPanGesture and createDragToSnapPoints
are documented as listed beside their own hooks, and each names that
hook in relatedHooks. Such a factory now stays out of the hook list,
so hook --list matches main for them and adds only createReorderable.
The CLI's search goldens match main's again.
* docs(List): split comment sentences over 25 words
Five comments in the reorder's engine, touch glide, drop model and
UIKit table each held one sentence over 25 words, and the reorder
mode spec's header ran two sentences together. Each is now split, with
the same meaning.
* fix(List): a finger held on a reorder handle selects no text
The list attaches its hold with manageStyle: false, so its handles keep
their own touch-action. The gesture host then leaves the hold's
selection lock to the list as well, and the list brought none. On iOS a
still finger on a handle started a text selection on the row's label,
and the drag grew it across the rows. The list now locks selection on
itself from a finger's or a pen's touch-down on a handle until it
lifts, through utils/selectionLock. A mouse never takes the lock.
* fix(List): a drag crossing rows reads no layout
The insertion line read the dragged row's offsetLeft and offsetWidth
right after writing the line's position, at each crossing and each
reorder-mode move. Each read forced a style pass. The drag now reads
the row's span once at the pick-up, in the list's coordinates and
beside its other measurements, and reorder mode reads everything
before its first write. A comment on the touch hold now says that the
list locks text selection itself.
* fix(List): the reorder imports the touch hit area from internal
Main moved touchHitArea.stylex from utils to internal. The List
reorder handle and its engine now import it from there.
* fix(List): the reorder finds its scroller through core's shared walk
The reorder engine walked a list's ancestors for its scroller with its
own copy of the walk that scrollingAncestor shares. nearestScroller,
which wraps that walk and falls back to the document's scroller, moves
from the keyboard module to utils/scrollingAncestor.ts, and the reorder
takes its scroller from there. The keyboard module re-exports it, so
its importers keep their imports.
New browser cases hold a dragged row near a scroll edge. The page
scrolls, and stops once the list's end is in view, with the preview
still under the pointer. A box the list scrolls in scrolls while the
page stays.
* fix(List): a dragged row's preview and line keep its inline start in RTL
The preview and the insertion line took the row's physical left as
their inline start. In right-to-left that is the right edge, so a row
set in from the list's start drew both shifted by its inset. Each now
converts the left to an inline start: the distance from the list's
right edge in right-to-left.
A new browser case drags a row set in 32 px from the list's start, in
both directions, and matches the preview and the line to the row.
* fix(List): picking a row up lays the page out once
The pick-up read the list's position after the rows' first writes and
read the dragged row's box again to place its preview once the list
was positioned. Then it wrote the preview's first offset, and the
preview's animator read its style back twice. Each read forced a style
or layout pass before the first frame, which
architecture:react-component-runtime INV18 rules out.
The pick-up now makes every read first. The preview's span is measured
from the list's padding edge before the list is positioned, and its
first offset, none, needs no write. The preview holds its own
will-change, so its animator reads no stylesheet at its first move.
A new browser case traces the pick-up under a finger: six forced passes
before, none after.
* spec(AST-103): a held drag near a scroll edge scrolls toward it
FR3 now states the reorder's edge autoscroll in the spec owners' words:
a held drag near the scroll container's edge scrolls it toward that
edge, faster the nearer it is, and stops at the end. Its verification
row names the browser checks of a drag held near the page's edge and
near the edge of a box the list scrolls in, the unit checks of the
autoscroll step and its timer, and the failures they catch.
* fix(List): a dragged row's preview joins no form or radio group
The preview was a plain clone of the row, so it kept each control's
name. Laid beside the row, a copied checked radio took its group from
the row's own: the row's radio showed unchecked for the whole drag, and
a drop in place left no radio checked.
The clone that takes no part in the page moves from transientCopy.ts
into its own module, inertClone.ts, with paintedBackground: names, ids
and labels stripped, no form, inert and hidden. The swap's and the
layer exit's copies keep it through inertCopy, and the transient copy
mechanism stays theirs. The preview is now that clone, and its
background comes from paintedBackground. The clone reads the row's
styles, so it is made before the pick-up's first write. A boundary test
keeps the clone to the copy mechanism and the reorder's preview.
A new browser case drags a row whose radio is checked: the radio showed
unchecked during the drag before, and stays checked now, through a drop
in place.
* fix(List): a scroll during a drag keeps the drop under the pointer
The drag placed its preview and line from the pick-up's snapshot, plus
its own autoscroll. A wheel or trackpad scroll during a mouse drag
moved the rows under a still pointer: the preview and the line rode
with them, and the drop landed where the pointer had been.
The engine now watches its scroller's scroll events through
subscribeInput, and skips the ones its own autoscroll causes. After any
other, it reads the scroller's offset once, before its writes: at the
next move, the next autoscroll tick or the drop, or else in a later
frame once the writes so far have rendered. So the read forces no
layout. The change in the offset joins the drag's own scrolled
distance, and the preview and the line are placed again.
Two new browser cases wheel three rows mid-drag. On the previous head
the preview and the line rode 111 px from the pointer; now both stay
under it, and the drop lands three rows further. A layout trace of the
wheel with the pointer moving finds no forced pass, and at most one
offset read per scrolled frame. A build that reads in the scroll event
itself forces a style pass there.
* spec(react-component-runtime): INV18 allows the reorder's scroll read
INV18 names one more read a scroll path may make, in the spec owners'
words: during a reorder drag, the engine reads its scroller's scroll
offset once per frame after a scroll it didn't cause, before its
writes. A verification row names the browser checks: a wheel scroll
mid-drag keeps the preview and the drop line under the pointer, with
no forced layout and one read per such frame.
* feat(lab): TransferList reorders through core's createReorderable
The selected panel is a core List with `reorderable`, its rows
ListItems keyed by value, each ending with core's reorder handle. The
panel's own pointer drag, preview, grip and keyboard session go. A
finger holds the handle a moment before it drags, so a flick scrolls
and a pinch zooms. Reorder mode moves a row from the keyboard or the
hint's buttons.
TransferList and TransferListSelector take the owner's object as
`reorderable`: `isReorderable(value)` says which values move, and each
move goes to `onReorder({key, to})`. A staged selector aims the moves at
its draft, so Cancel drops them. An adapter in core's internal reorder
entry runs the owner's engine with those moves, and the owner's
`start(key)` still finds the panel's list.
* fix(lab): a disabled TransferList keeps reordering off
Main's TransferList isDisabled was written for TransferList's own
reorder grip, which this change replaces with core List's handle. It
now works on the createReorderable path:
- Every option is transfer-disabled without its own message, and the
search field is disabled but focusable.
- Reordering pauses as it does while a search filters the panel. No
handle shows, so none stays pressed.
- A handle with focus unmounts, so focus moves to its row's Remove
button, which stays focusable.
- A move or a cancel that ends after the list became disabled changes
nothing.
* docs(lab): split comment sentences over 25 words
Three comments in TransferList and its reorder specs each held one
sentence over 25 words. Each is now split, with the same meaning.
* chore(lint): the provenance baseline drops List's two removed citations
The first commit removed two record citations from comments in List.tsx
and ListItem.tsx. The comment-provenance baseline still listed both,
so its check failed. The baseline script, run again, drops only those
two entries.
* fix(lab): a disabled TransferList keeps focusable disabled handles
A disabled TransferList hid its reorder handles and moved the focus
from a focused handle to its row's Remove button. Now each selected
row is a disabled ListItem. Its handle keeps aria-disabled, its place
in the tab order and the focus, and core List ends a reorder mode or
sends a drag home. Each handle shows the "cannot be reordered" tooltip
on hover and keyboard focus, and its description reads it. A disabled
row still takes the pointer, so its disabled controls show their
tooltips. The row dims its Remove button, so Remove drops its own
disabled dim and reads at half opacity, as before.
* fix(TransferList): its JSDoc is on the component again
TransferList's JSDoc and example sat above the private tooltip props,
so the component lost its documentation in editors and in the emitted
declarations. The tooltip code now comes before that block.
A disabled list's handle tooltip took the row's first toggle button. A
renderOption that renders its own toggle comes first, so that toggle
got the "cannot be reordered" description. The tooltip now takes the
row's last toggle, which is Core's handle at the row's end.
* docs(TransferList): it reorders only with reorderable
The spec owners kept reordering opt-in: with no reorderable, a
TransferList no longer reorders. Its migration guidance now leads with
that, and its last sentence, which said the same, goes.
* docs(TransferList): the anatomy names the reorder hint
spec:AST-103 FR4 makes the reorder-mode hint a part named in each
adopting collection's anatomy. TransferList shows it below a selected
row's handle, so its anatomy gains a Reorder hint entry, as List's
has. A test title that still said reordering is on by default now
says the handle comes with reorderable.
* spec(react-component-runtime): INV13 lists List's reorder session
spec:AST-107 FR7 lets a Core or Lab component reach internals only for
a job the public layer does not expose, listed among INV13's known
public-API gaps. TransferList adapts its reorderable object to its own
values, and ListInput's rows are not ListItems. Both join List's
reorder session through Core's internal reorder entry, because
createReorderable's plain-element attach (spec:AST-103 FR4b) is not
built. INV13 now lists that job.
* feat(lab): ListInput reorders through core's createReorderable
ListInput takes `reorderable`, the createReorderable object, keyed by
getItemKey. Each record ends with core List's reorder handle, after
Remove. A finger holds it a moment before it drags, so a flick scrolls
and a pinch zooms. A mouse drags at once. Reorder mode moves a record
from the keyboard or the hint's buttons, and each move goes to the
object's onReorder({key, to}). A disabled or loading list keeps its
handles, focusable but inert.
ListInput's own grip, pointer drag, drag preview and keyboard session
go, and with them the shared Lab reorder styles, which nothing uses
any more. Core's internal reorder entry gains the session for rows
that are not ListItems (useListReorderScope, ListReorderScope), which
runs the same engine a reorderable List runs.
The handle is the session's, so a ListInput without reorderable loads
no reorder code. It sits in Remove's cell, the one element the reorder
adds to a record, and its name comes from one catalog message. The
list takes the session's style, so its insertion line marks a drop and
a record in reorder mode.
* fix(ListInput): the Add button and the handles stay in the columns
With reorderable, the Add row reused the records' auto control track,
which is empty there, so the Add button ran 56 px past the record
fields. The control track is now fixed: Remove, the gap and the handle.
Each reorder handle and its focus ring also ended 8 px past the list,
because the handle reaches into a ListItem row's inline inset and a
record has none. Records now set that inset to zero.
* fix(TransferList): the phone layout's panels stop clipping
On iOS, a TransferList panel's clip around the selected list's own
inline clip drew the row flush with the panel's bottom edge one point
off for the length of the drop's glide. In the phone layout the panel
body does not scroll, so the clip kept nothing in. The panel now clips
only in the wide layout, where its body scrolls.
In iOS Simulator takes of a six-row drag, the row at the edge sat 3
device pixels off for 14 and 15 frames on the previous head, and for 0
frames with this change. Every TransferList story at rest, and the
last row in reorder mode, keep the same pixels without the clip in
WebKit. A Chromium trace of the glide under a coarse pointer paints
nothing per frame, before and after.
* fix(ListInput): a record that stays put keeps Remove in its column
With reorderable, a record that the owner's isReorderable keeps in
place has no reorder handle, so its control cell holds Remove alone.
The cell centred it in the fixed control track, 16 px past every other
record's Remove. The cell now starts its controls at the track's start.
A new fixture, A11y/ListInput › Fixed record, keeps its first record in
place. A browser case at 390 and 1024 px measures each record's Remove:
the fixed record's sat 16 px out before, and lines up now.
* Merge branch 'main' into uikit/c13-list-reorder
* Merge branch 'uikit/c13-list-reorder' into uikit/c13-transferlist-reorder
* Merge branch 'uikit/c13-transferlist-reorder' into uikit/c13-listinput-reorder
* fix(List): a drop or key move reads its rows once, before it writes
A drop read each row's layout after writing the row before it, and
read the theme's motion tempo again for each gliding row. So it forced
one style pass per row: 30 for a 30-row list in Chromium. A reorder
mode key move read each row between glides too, then scrolled to the
row and placed the insertion line after the glides had started.
Both now read every row, the line's place and the scroll first, and
write after. A row left at rest at 0 takes no write, since each
animator write reads its style back. The scroll now runs before the
rows slide, so it brings the row's new place into view, not its old
one. A spring back reads the tempo once too.
* docs(List): a key move's first glides cost a style pass per row
Where the primary pointer is coarse, a reorder mode move forces one
style pass for each row that glides for the first time: the shared
animator reads the row's will-change then. The List record names this
as an implementation gap.
* Merge branch 'uikit/c13-list-reorder' into uikit/c13-transferlist-reorder
* Merge main into createReorderable's List reorder
Main's #8215 rewrote the zoom section of motion/MEASUREMENTS.md, the
last section before the reorder section this pull request appends.
The resolution keeps main's zoom text and table, then the reorder
section as it was.
* docs(motion): the reorder measurements name no batch label
The reorder section and the reorder constants' sources named their
measurement batches by a label the repository never defines. They now
give the lab, device and date, as the other measured sources do.
* Merge branch 'uikit/c13-transferlist-reorder' into uikit/c13-listinput-reorder
* Merge branch 'uikit/c13-list-reorder' into uikit/c13-transferlist-reorder
* Merge branch 'uikit/c13-transferlist-reorder' into uikit/c13-listinput-reorder
* Merge branch 'main' into uikit/c13-list-reorder
* Merge main into createReorderable's List reorder
Main's #10586 put List.doc.mjs in Prettier's format and changed edge's
bleed text, beside the reorderable prop and anatomy entries this pull
request adds. The resolution keeps main's file and adds this pull
request's entries in that format.
* refactor(List): the reorder warns once through createDevWarnings
The reorder handle and the reorder session each kept a flag of their
own to warn once. Core's createDevWarnings now owns per-instance
warn-once, as Dialog, Resizable and TabList use it, so both call it
and the flags go. Each still warns once: a handle about a row with no
name, a session about rows with no item key. The two warning tests
now render twice, so a second warning fails them.
* Merge #8139's final head
This takes #8139's last head (92365e4), the one that
squash-merged, before the merge of main.
* Merge main, where #8139 squash-merged
#8139 landed on main as one squash commit (a28d586), which
carries none of its history. So this merge takes #8139's final head
(92365e4) as its merge base. This pull request's own changes
stay as they were.
* Merge #8143's head, which merges main after #8139
#8143 now merges main, where #8139 squash-merged (a28d586). This
takes #8143's head (f9029bb) in a plain merge. This pull request's
own changes stay as they were.
* chore(changeset): Core's internal reorder entry serves TransferList
This pull request's Core changes ship to consumers: the internal
reorder entry, and the reorder session's support for an object a Lab
collection adapts. Lab is private, so the Changeset names
@astryxdesign/core alone, as an internal chore.
* Merge #8143's head, which adds its Changeset
#8143's head now adds a Changeset for its Core changes. This takes it
in a plain merge. This pull request's own changes stay as they were.
* chore(changeset): Core's internal reorder entry serves ListInput
This pull request's Core changes ship to consumers: the reorder scope
a Lab collection's list joins, its English message, and the internal
reorder entry's support for it. Lab is private, so the Changeset names
@astryxdesign/core alone, as an internal chore.
* Merge main, where #8143 squash-merged
#8143 landed on main as one squash commit (36b8f6e), which
carries none of its history. So this merge takes #8143's final head
(1e21069) as its merge base. This pull request's own changes
stay as they were.
Co-authored-by: Cindy Zhang <[email protected]>
Part of #8852
User impact
This affects keyboard users who tab into a Table that fills a rounded Card or Dialog.
edge="bleed"also take the corner they reach, so their hover and selected fills match the curve. Today the container already clips those fills, so they look the same. A bleeding row's focus ring sits outside the row, so the container edge still cuts it; that is tracked separately and is not part of this change.Problem and solution fit
Expected behavior and authority
architecture:container-paddinggains a "Corner geometry" section and INV12 (corners publish with padding) in this PR. INV1 and INV6 name the new internal properties.component:ListFR5: one sentence names the corner exception to "square corners".Smallest restoration
Layout/containerCorners.stylex.ts, which the package does not export) publishes--container-corner-*from it. It publishes a block-start corner only while a reader is its first child, a block-end corner only while a reader is its last child, and no corner while any reader sits deeper inside it. A reader therefore takes a corner only as the publisher's direct child, so a list inside a wrapper element, or a table between other content, stays square. Overlay and layout roots reset the corners with the padding. A BottomSheet publishes no corner: its content keeps a band for the grab bar above any full-bleed child, so a child never reaches the sheet's corners.data-container-corner. Table takes the full corner as its container's first or last child (where it already cancels the block padding), and is square elsewhere. A bleeding List passes its first and last rows the corner less the block padding it keeps.Evidence
0pxat all corners, expected12px), and bleeding rows in a padding-0 Dialog are square.12pxat all four corners (the card's outer radius), and its ring crosses each corner's diagonal. With text above it, only its bottom corners round. In a padding-0 Dialog, the first and last bleeding rows take12px. A table at the top of a BottomSheet stays square below the grab bar.Scope
Testing
packages/core/src/Layout/__tests__/ContainerCorners.a11y.chromium.spec.ts(real Chromium, built Storybook): fails 4 of 9 on main and passes 9 of 9 on this head, run in headless Chrome against Storybook built from each.vitestfor Card, Dialog, BottomSheet, List, Table, Layout, andtheme/derivedVarRegistry.test.ts: 68 files, 1843 tests pass. The registry test lists the four--_list-corner-*and two--_container-corner-block-*variables as private system variables.tsc --noEmit -p packages/core: exit 0.pnpm check:knowledge: pass. Strict lint on changed files: clean.Writing rubric results
architecture:container-padding(new Corner geometry section, INV12, edits to INV1, layer 3, change coupling, owning code, and verification), re-run after the direct-reader revision:--radius-containerin Table.architecture:container-paddingCurrent-state impact (one bullet, BottomSheet corners): R1–R6 clean; it states the current gap in the present tense.component:ListFR5 (one sentence) and DEC-4 (the same exception, carried into its bleed sentence):