Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
f926117 to
ab193b0
Compare
42b9f6c to
7177c9d
Compare
There was a problem hiding this comment.
Not ready to approve yet: the new handle geometry needs an owner decision, and two fixes are needed either way.
No current spec decides the grip-only handle, its 24×24 mouse target or the move of reorder mode's fill and the focus ring onto that target: design:control-rhythm DR4 is still a draft, and AST-020's 2.5.8 row only sets a 24 px minimum. Approval needs a design or engineering owner to provide or identify the governing spec for this direction, for example a Design decisions row in the List spec covering the grip-only handle, the 24 px target and where the fill and ring sit, recorded with /approve-spec <head SHA>; the author may do this as a design owner.
Blocking:
- Under a coarse pointer, a handle at a row's start or end now loses about 6 px of its 44 px touch band to the list's inline clip (measured about 38 px wide, against about 44 px before), which contradicts AST-094 FR42 and the changeset's "a finger keeps its 44px target", so step the in-row handle in by
max(0px, 14px - inset)under a coarse pointer (or keep a 28 px box there) and makeListReorderTouchhit-test the band. - In reorder mode the fill's 4 px radius also rounds the hit target, so three of the four corner points 11.5 px from the centre miss, while the changeset and description say a mouse hits anywhere in the square, so qualify those claims and the matching comment or keep the hit shape square.
Two smaller points (the TransferList comment's 30 px, and bleed rows with a theme row padding under 4 px) are in the inline comments.
Claims and files checked
- Claim: the handle is its 16 px grip with no box. Verified (
ListReorderHandle.tsx:90,:123-124; browser probe 16×16). - Claim: labels move 12 px closer in List, TransferList and ListInput. Verified for padded List rows (60 to 48 px) and TransferList (118 to 106 px); flush rows move 8 px; ListInput fields move only where the handle shows in the record.
- Claim: a mouse hits anywhere in a 24 px square that is square to its corners. Verified at rest (new browser case and probe); false in reorder mode, where the corners round.
- Claim: a finger keeps its 44 px target. False at a row's start or end (about 38 px).
- Claim: reorder mode's fill fills the 24 px target with 4 px corners. Verified (
ListReorderHandle.tsx:172-179; probe). - Claim: the ring's outer edge is the target's edge. Verified (
ListReorderHandle.tsx:131-134; focus frames). - Claim: flush rows step the handle in so the clip never cuts its target or ring. Verified for the ring and the 24 px target; the touch band is still cut.
- Claim: hanging handles keep the grip 8 px from the content, inside the list's 30 px room. Verified (hover frames identical; 24 + 4 px fits in 30).
- Claim: no API change. Verified (generated API surfaces identical).
- Claim: right-to-left mirrors through logical properties. Verified (right-to-left probe).
- Claim: the unit tests over List, Item, ListInput and TransferList pass (18 files, 420 tests). Verified by rerunning them.
- Claim: the browser suites pass. Not rerun; equivalent probes match at rest.
- File
ListReorderHandle.tsx: blocking (touch band clipped at row edges; reorder-mode corners). - File
ListItem.tsx: non-blocking (bleed rows under a 4 px theme row padding). - File
List.tsx: clear. - File
ListReorderHandleOptions.interaction.browser.spec.ts: clear; it covers the rest state only. - File
ListInput.tsx: clear. - File
TransferList.tsx: non-blocking (comment says 30 px for 28 px). - File
.changeset/reorder-handle-icon-only.md: blocking (the 44 px and anywhere-in-the-square claims).
josephfarina
left a comment
There was a problem hiding this comment.
Thanks Ernest. The grip alone looks much lighter, labels sit closer to it, and putting the focus ring at the target's edge reads well in the captures. Keeping a 24px mouse target as an invisible layer is the right call for WCAG 2.5.8, and the new browser case that probes the target to its corners is a good test.
One real problem and one small one.
Why it can't ship yet
1. The finger target shrinks from 44px to about 38px at the row's start. With the 16px box, the touch band reaches 14px past the grip, but the list clips its inline overflow (overflow-x: clip) and the grip sits only 8px inside the list. In this PR's preview (List, Reorderable story, phone profile), the handle's hit span across its centre is 38.5px (from 15.5px to 53.5px, with the list's edge at 16px). The same story in #11575's preview gives 44px. Flush rows go from 36.5px to 34.5px. The ListInput docs promise the target "grows to at least 44 by 44 px", and the changeset says "a finger keeps its 44px target".
2. Small: the reorder-mode fill rounds the target's corners. The fill's 4px radius sits on the same ::before that is the mouse target, and Chromium hit-tests the rounded shape. In reorder mode, three of the four diagonal points 11.5px from the centre land on the row instead; at rest all four hit. The changeset says "anywhere in an invisible 24px square".
Exact steps
- Under a coarse pointer, step the in-row handle in from the row's edge by the band's reach,
max(0px, 14px - var(--_item-inset-inline)), instead of the 4pxEDGE_GUARD. Or keep a 28px box under a coarse pointer only. Then add aListReorderTouchcase that hit-tests the band at the row's start, like your new mouse-target case, and expects at least 44px. - Either keep the hit layer square in reorder mode (square fill), or describe it as "a 24px square, with rounded corners in reorder mode" in the changeset and the comment.
- The grip-only geometry still needs a design owner's sign-off, as your description notes.
What I checked
- Unit tests at this head over List, Item, reorderable, ListInput and TransferList: 18 files, 420 tests pass. Core typecheck passes.
- Touch band width and corner hits measured with
elementFromPointin this PR's and #11575's previews, in Chromium.
|
I'll run a full review to re-check this with your note. |
ab193b0 to
12d9694
Compare
7177c9d to
ddefb77
Compare
There was a problem hiding this comment.
Not ready to approve: the new handle geometry waits on an owner approving its design record, and two fixes are needed either way.
component:List's new Design decisions row DD1 is the only record that decides the grip-only handle, its 24px mouse target and the fill and focus ring on that target, so a design or engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so as a design owner), ideally after the fixes below or with DD1 worded to what ships.
- At a row's start or end the list's inline clip cuts a finger's target to about 38px (44px before this change), which contradicts the touch-target rule that it grows toward 44px where no neighbour is in the way and the changeset's "a finger keeps its 44px target"; under a coarse pointer, step the in-row handle in by
max(0px, 14px - inset)(or keep a 28px box there) and makeListReorderTouchhit-test the band at a row edge. - In reorder mode the 4px radius on the target's
::beforerounds its hit shape, so the changeset's "anywhere in an invisible 24px square", the comment atListReorderHandle.tsx:142-143, DD1 and the description overstate it; keep the hit shape square in reorder mode or say that it rounds there.
The change request from the previous head raises the same points and stays open until its reviewer re-reviews.
Claims and files checked
- Changeset: the handle is its 16px grip alone and takes a start icon's room: verified (16 by 16 box; padded labels move from 60 to 48px).
- Changeset: a mouse hits it anywhere in a 24px square: verified at rest; false in reorder mode, where three of four corner points miss.
- Changeset: reorder mode's fill and the focus ring sit in the target: verified in the frames.
- Changeset: a finger keeps its 44px target: false at a row's start (38.5px) and end (38px).
- Changeset: a hover-shown handle needs 28px instead of 30px: verified (
List.tsx:205). - Description: the old 28px box drew no hover fill: verified on the base.
- Description: labels move 12px closer in List, TransferList and ListInput: verified for padded rows and TransferList; 8px in flush rows, as its flush bullet explains.
- Description: the target is square to its corners: true at rest only.
- Description: the reorder fill fills the 24px target with 4px corners, and the ring's outer edge is the target's edge: verified.
- Description: flush rows step the handle in so the clip keeps the ring whole: verified in the frame.
- Description: a hanging grip stays 8px from the content and its room drops from 30 to 28px: verified in the code.
- Description: no API change: verified; the generated surfaces of Core and the themes are identical.
- Description: the grip shows over the forced-colors fill: verified in the frame and the new test.
- Description: DD1 needs owner approval: verified; none exists at this head.
- Description: the unit tests pass: 18 files and 423 tests pass on this head; the interaction suites were not rerun.
.changeset/reorder-handle-icon-only.md: two claims do not hold (findings above).docs/specs/components/List/List.spec.md: DD1 awaits approval; its 44px touch and square-target wording does not hold at this head.packages/core/src/List/List.doc.mjs: clear.packages/core/src/List/List.tsx: clear.packages/core/src/List/ListItem.tsx: clear.packages/core/src/List/ListReorderHandle.tsx: the touch clip and the rounded target (findings above).packages/core/src/List/__tests__/ListReorderHandleOptions.interaction.browser.spec.ts: clear; it checks the corners at rest only.packages/lab/src/ListInput/ListInput.tsx: clear.packages/lab/src/TransferList/TransferList.tsx: clear.
|
|
||
| | ID | Decision | Intent or reason | Applies to | Allowed variation | | ||
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | DD1 | The reorder handle is its grip alone: the `list-reorder-handle` icon at the `sm` size, in the secondary icon color, with no hover fill. Under a fine pointer, its target is a square of 24 px round the grip, and reorder mode's fill and the focus ring sit in that target. | The handle reads as a quiet grip beside the row's content, not as a button, and its target still meets the WCAG 2.5.8 minimum. | The reorder handle of a reorderable row (`spec:AST-103` FR5) | A theme replaces the grip through its icon slot and its color through the icon color tokens. A coarse pointer keeps its 44 px target. | |
There was a problem hiding this comment.
Two clauses here do not match the code at this head: "its target is a square of 24 px" holds only at rest (reorder mode rounds the target's corners), and "A coarse pointer keeps its 44 px target" holds only away from the list's edges (about 38px at a row's start or end). Fix the code before this row is approved, or word the row to what ships.
12d9694 to
4ab27d7
Compare
ddefb77 to
f69a0d2
Compare
|
Thanks, Joseph. Round 2 is up at f69a0d2, rebased onto main.
|
There was a problem hiding this comment.
Not ready to approve: the new handle design waits on an owner approving its design record, and four fixes are needed either way.
component:List's new Design decisions row DD1 is the only record that decides the grip-only handle, its 24px mouse target and the fill and focus ring on that target, so approval needs a design or engineering owner to record that decision by commenting /approve-spec <full head SHA> on this pull request (the author can do this as a design owner), or to amend DD1 first. The earlier change request on this pull request stays in force until its reviewer re-reviews or dismisses it.
Blocking:
- Miss: the handle's box, its 24px target, the ring offset and the rows' room are fixed at 16px while the
smgrip follows the root font size and a theme'ssize:sm, so at a 24px root the focus ring draws over the grip and at a 32px root the grip's outer 4px on each side take no clicks; size the box from the grip's resolved size and derive the target and room from it. - Miss: in ListInput the first field sits 4px from the 16px handle, so a finger's target shrinks from about 39.5 × 40.5px to 33.5 × 37.5px, against "a finger keeps its 44px target" in the description and DD1; widen ListInput's handle column under a coarse pointer or correct both texts.
- DD1 calls the mouse target "a square of 24 px", but in reorder mode the fill's 4px radius rounds its hit shape (three of four corner points 11.5px out miss), so word DD1 as the changeset does or keep the hit shape square.
- Miss:
ListItem.tsxre-implements the handle's two edge-guard formulas and its 16px size instead of reading them from one place, so the grip-size fix has to change every copy; move them into one shared constants module in the List folder. - Newly live check: the description needs the first-load gzip delta of a page that renders List without
reorderable; our build measures it under 0.3 KB, so stating the number is enough.
Claims and files checked
Review mode: full; reason: recipe-changed (many rules)
- Changeset: the handle is its 16px grip alone and takes a start icon's room: verified (16 × 16 box; padded labels 60 → 48px).
- Changeset: a mouse hits it anywhere in an invisible 24px square where the fill and ring sit, with corners rounding in reorder mode: verified by hit-testing at rest and in reorder mode.
- Changeset: a finger keeps its 44px target because the handle steps in under a coarse pointer: verified for List rows (44px at a row's start and in flush rows).
- Changeset and docs: a hanging handle needs 28px outside the text, down from 30: verified (gutter 28; target edge 28px out).
- Description: the old box held labels 12px further from the grip: verified (60 vs 48px).
- Description: labels move 12px closer in List, TransferList and ListInput: true for padded List rows and TransferList with a mouse; 8px in flush rows.
- Description: at rest the target is square to its corners and in reorder mode its corners round: verified.
- Description: a finger keeps its 44px target: true in List, false in ListInput (blocking).
- Description: reorder mode fills the 24px target with 4px corners, under the grip, and the grip shows in forced colors: verified (frames and the new test).
- Description: the focus ring's outer edge is the target's edge: verified (2px ring, 2px offset).
- Description: flush rows step in so the list's clip never cuts the target or ring, and by 14px under a coarse pointer: verified.
- Description: a hanging grip stays 8px from the content, its target and ring ending 28px out: verified in code.
- Description: bleed rows add the same edge guard to a stay-put row's room: verified in code.
- Description: the target meets the 2.5.8 minimum and adds no element to the row: verified at the default root font size; at larger roots the grip outgrows it (blocking).
- Description: no API change: verified (generated surfaces identical).
- Description: the unit tests pass: verified for List, Item, ListInput and TransferList (18 files, 423 tests); the new browser cases' checks agree with our hit-tests.
.changeset/reorder-handle-icon-only.md: clear.docs/specs/components/List/List.spec.md: DD1 needs owner approval; square and finger-target wording (blocking).packages/core/src/List/List.doc.mjs: clear.packages/core/src/List/List.tsx: clear (restates the 28px gutter, part of the shared-constants finding).packages/core/src/List/ListItem.tsx: copied edge-guard logic (blocking); one comment restates names.packages/core/src/List/ListReorderHandle.tsx: fixed 16px box (blocking); reorder-mode hit shape (DD1 finding).packages/core/src/List/__tests__/ListReorderHandleOptions.interaction.browser.spec.ts: clear (corners checked at rest only).packages/core/src/List/__tests__/ListReorderTouch.interaction.browser.spec.ts: clear (covers List only).packages/lab/src/ListInput/ListInput.tsx: smaller finger target (blocking); fixed 16px column.packages/lab/src/TransferList/TransferList.tsx: fixed 16px room; one long comment.
| const REORDER_HANDLE_SIZE = 28; | ||
| // Core List's reorder handle is its 16 px grip alone, for every pointer. Its | ||
| // target reaches 4 px past it, into the gap beside it. | ||
| const REORDER_HANDLE_SIZE = 16; |
There was a problem hiding this comment.
Under a coarse pointer this 16 px track sits 4 px (--spacing-1) before the first field, and no Item gives the handle an inset, so neither edge guard applies. The shared touch band then grows 14 px only on the free sides: the field takes taps past the handle's right and the next record stops it below. Hit-testing Tag options' first record gives 33.5 × 37.5 px here, against 39.5 × 40.5 px at the base. FR42's neighbour clamp allows that, but the description and DD1 say a finger keeps its 44 px target, and the doc says at least 44 by 44. One fix: a 28 px handle column at (pointer: coarse) (here, in handleControls and the grid columns), so the band has room before the field; or say in the description and DD1 that ListInput's target shrinks to about 34 × 38 px.
|
|
||
| | ID | Decision | Intent or reason | Applies to | Allowed variation | | ||
| | --- | ---------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------------------------------------------------ | ------------------------------------------------------------ | ------------------------------------------------------------------------------------------------------------------------------------- | | ||
| | DD1 | The reorder handle is its grip alone: the `list-reorder-handle` icon at the `sm` size, in the secondary icon color, with no hover fill. Under a fine pointer, its target is a square of 24 px round the grip, and reorder mode's fill and the focus ring sit in that target. | The handle reads as a quiet grip beside the row's content, not as a button, and its target still meets the WCAG 2.5.8 minimum. | The reorder handle of a reorderable row (`spec:AST-103` FR5) | A theme replaces the grip through its icon slot and its color through the icon color tokens. A coarse pointer keeps its 44 px target. | |
There was a problem hiding this comment.
At this head the coarse cut at row edges is fixed (44 px at a row's start and end and in flush rows). Two clauses still differ from what ships: "its target is a square of 24 px" holds only at rest, since reorder mode's 4 px radius rounds the hit shape (three of four corner points 11.5 px out miss); and "A coarse pointer keeps its 44 px target" does not hold in ListInput (about 33.5 × 37.5 px, the first field 4 px away). Word the row to what ships, as the changeset now does for the corners, or change the code, before it is approved.
| const TOUCH_EDGE_GUARD = | ||
| 'max(0px, calc(14px - var(--_item-inset-inline, 14px)))'; | ||
| const TOUCH_HANDLE_ROOM = `calc(${TOUCH_EDGE_GUARD} + 16px + ${spacingVars['--spacing-2']})`; | ||
| // Each padding with that room. |
There was a problem hiding this comment.
Non-blocking (INV29): this line restates the three constant names below it. Drop it.
| // Under a coarse pointer core List's handle steps in by its finger target's | ||
| // 14 px reach, less its row's inset, then takes 16 px and the row's 8 px | ||
| // gap. The compact rows keep Item's inset, `--spacing-2`, so the panel's | ||
| // heading reads the same value. SYNC: core List/ListReorderHandle.tsx | ||
| // TOUCH_EDGE_GUARD. |
There was a problem hiding this comment.
Non-blocking (INV29): the first sentence runs 30 words over three topics. Suggested: "Under a coarse pointer, core List's handle steps in by 14 px less its row's inset. It then takes 16 px and the row's 8 px gap. The compact rows keep Item's inset, --spacing-2, so the panel's heading reads the same value. SYNC: core List/ListReorderHandle.tsx TOUCH_EDGE_GUARD."
| const HANDLE_SIZE = 28; | ||
| /** The grip's side, the `sm` icon size: the handle's share of its row's height. */ | ||
| const GRIP_SIZE = '1rem'; | ||
| const HANDLE_SIZE = 16; |
There was a problem hiding this comment.
The box is a fixed 16px, but the grip inside it is not. The sm Icon is 1rem (or the theme's components.icon['size:sm']), and since #11445 the list-reorder-handle slot can also return a size. So the grip outgrows the box when:
- a theme maps the slot to
size: 'md'(20px); - the root font size is not 16px. In the Reorder Handle Options story at a 20px root, the grip measures 20px inside this 16px box.
The 24px target, the reorder-mode fill and the focus ring are all computed from this 16px, so they stop centring on or clearing the grip. The rows' room hardcodes 16px too: HANDLE_ROOM and TOUCH_HANDLE_ROOM in ListItem, REORDER_HANDLE_SIZE in ListInput, and the 16px room in TransferList.
Suggest sizing the box from the resolved icon size (1rem for sm, or the slot's size), and deriving the target reach and the rows' room from the same value.
There was a problem hiding this comment.
I'll run a full review to re-check this with your note.
There was a problem hiding this comment.
Fixed in #11445 (5dbbb8d), which now folds this pull request in. The handle publishes its grip's length from the slot's size (1rem for sm). Its box hugs the grip, and its target, its ring offset and its distance from the row's end derive from that length. ListInput's controls track and TransferList's fixed rows read the same length through useReorderGripLength. A browser test sets a 20px root: the grip is 20px and centred, its target reaches 4px past it, and the ring's outer edge is the target's edge.
|
Folded into #11445 at the spec owner's suggestion: one pull request for how the grip looks. Ivor's sizing point is fixed there. |
Reorder stack. Review and merge in this order; each pull request is based on the one before it.
dragicon; the reorder handle draws ithandleoption: placement andvisibilityUser impact
The reorder handle has no hover fill, so its 28px box was invisible padding. The box pushed labels 12px further from the grip than a start icon would.
No API change.
Visual authority
Existing component/module
DDrow reused or amended.Durable component-local intent added to the optional
Design decisionstable by a team design owner.Correction already settled by current family, design, theme, or objective accessibility authority.
New shared or cross-component direction settled in
docs/design/.List record,
Design decisionsDD1 (new; author ernestt is a design owner; record owner cixzhang): "The reorder handle is its grip alone: thelist-reorder-handleicon at thesmsize, in the secondary icon color, with no hover fill. Under a fine pointer, its target is a square of 24 px round the grip, and reorder mode's fill and the focus ring sit in that target." Owner approval needed.spec:AST-020(accessibility conformance), 2.5.8 Target Size (Minimum): the target meets the 24×24 CSS px minimum. 1.4.11: in reorder mode the grip stays visible over the fill, in forced colors too.spec:AST-103FR5: the grip stays the handle's decoration, and the handle stays the one element reordering adds to a row. The target, fill and ring are the handle's own pseudo-element and outline, not elements.Before and after
Real Chromium, static Storybook builds at 2x. Before is the head of #11575.
List (Reorderable), at rest
List, keyboard focus on a handle: the ring is the target's edge
List, reorder mode: the fill is the 24px target
List (Reorder Flush), keyboard focus: the handle steps in, so the ring stays whole
TransferList (Default), at rest
ListInput (Tag options), pointer over a record
ListInput (Tag options), keyboard focus on a handle
List, reorder mode, light and forced colors. Before (#11575), the fill is the old 28px box. After, the fill fills the 24px target, under the grip, so the grip shows over the forced-colors highlight.
List, a phone (coarse primary pointer). Before (#11575), the grip sits 8px in, so the list's clip cut the finger's target to about 38px. After, it steps in by the target's 14px reach, so the target keeps 44px.
State matrix
ListReorderTouch.Pre-review (fresh session)
A fresh agent session ran
pnpm review:preand the pre-review checklist on this branch. Its findings, and what changed:::beforesat above the grip, so in forced colors the opaque highlight hid it (spec:AST-0201.4.11, FR10). The handle now isolates, and the fill paints under the grip. A new browser test enters reorder mode, in normal and forced colors, and checks that the grip still shows through the fill.design:control-rhythmis a draft, and 2.5.8 sets a minimum, not the grip-alone design. As a design owner, the author adds the List record'sDesign decisionsrow DD1 for the handle's look, which needs owner approval.bleed, a row that stays put could miss its neighbours' label column by up to 4px with a theme row inset under 4px. The room now adds the same edge guard the handle steps in by, so both match.Review round 2 (Joseph Farina)
ListReorderTouchcase hit-tests across the handle's centre in a padded and a flush row and expects at least 44px inside the list.Design decisionsrow DD1 records the grip-alone geometry for approval.(pointer: coarse).Scope
Components: List (reorder handle), ListItem, TransferList, ListInput
Testing
vitest runover core List, Item, Icon and reorderable, Lab ListInput and TransferList: 23 files, 586 passed.ListReorderHandleOptions.interaction.browser.spec.ts:ListReorderTouchcases: across the handle's centre, a padded and a flush row each give a finger at least 44px that lands on the handle, inside the list.playwright test --config=playwright.interaction.config.ts --project=chromium ListReorderPointer ListReorderTouch ListReorderMode ListReorderHandleOptions: 61 passed, on this branch's built Storybook.playwright test --project=chromium ListInputReorder TransferListReorder: 14 passed.check:knowledge,check:sync, andpnpm review:pre(0 findings).Writing rubric results
Records:
docs/specs/components/List/List.spec.md(theDesign decisionstable, DD1).