Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
This pull request needs a spec owner's decision before it can be approved, and it has five blocking findings to fix as well.
It changes two current records on purpose: the List spec's reorder relationship (the handle moves from the row's trailing edge to its leading edge, and shows only while the row is hovered or holds the focus, always under a coarse pointer) and the ordered-collection reordering design's rest state (the handle may stay hidden until hover or focus where no pointer is coarse). Approval needs a spec owner to accept those updates, including where the handle sits in a numbered or bulleted list and how a mouse user tells at rest which rows stay put. An engineering owner records the decision by commenting /approve-spec <full head SHA> on this pull request (a design owner may approve the design record), and the author may do so if they are an engineering owner.
Blocking findings:
- Desktop behaviour change needs an owner decision: with a mouse, every reorderable List row's handle is now hidden until the row is hovered or focused and then fades in (
ListReorderHandle.tsx:182-185,:383-384), so either gate that to touch input or cite the owner decision for it. - In core List, a row that
isReorderablerejects now starts its label 36 px left of the movable rows' labels (ListItem.tsx:476-485), unlike TransferList and ListInput in this same change, so reserve the handle's width in ListItem for rows that stay put (TransferList'sclearsHandlecan then go). packages/core/src/Item/ItemLeadingContext.tsxis a new internal shared module (imported byItem/Item.tsxandList/ListItem.tsx) that no current record names, so it needs an owner API decision that says why existing modules are not enough, for example by naming it in the List record's relationship bullet this change already edits.- ListInput's field-focus selector now skips every
button[aria-pressed]in a cell (ListInput.tsx:377-378), so after Add a ToggleButton first field no longer takes focus; exclude the handle by:not([data-astryx-list-reorder])instead. - The changeset and List docs say the handle "starts the row", but in a numbered or bulleted List it renders after the marker (
.changeset/reorder-handle-start.md:5,List.doc.mjs:73,:186), so reword them or move the handle before the marker.
Two small notes: the comment at ListReorderHandle.tsx:155-156 says a disabled row dims each slot, but Item does not dim the start slot; and the List docs do not mention that touch screens always show the handle.
Claims and files checked
- Claim: the handle starts the row, before its start content: verified for rows without a marker (
Item.tsx:875); false in numbered and bulleted lists, where it follows the marker (blocking finding above). - Claim: with a mouse the handle stays hidden until its row is hovered or holds the focus, and keeps its place and tab stop: verified (
ListReorderHandle.tsx:157-163,:383; browser probe: opacity 0 at rest, 1 on hover and focus, Tab reaches it). - Claim: always shown on coarse pointers, in reorder mode and on the focused handle: verified (
containerReveal.stylex.ts:39,ListReorderHandle.tsx:160; browser probes). - Claim: TransferList rows that stay put keep the label column: verified (
TransferList.tsx:163-164,:758; capture). - Claim: ListInput puts the handle in a track before the first field, keeps the track empty for records that stay put, and lines up labels, status and Add: verified (
ListInput.tsx:242-271; captures). - Claim: no API change: verified (built public surfaces of core and the published themes differ by 0 rows).
- Claim: gestures, keys, announcements, the 28 px box, the focus ring and the touch hit area are unchanged: verified (
ListReorderHandle.tsx:101-102, handlers and hit-area style unchanged). - Claim: one element per row still holds, the seam is renamed and not exported: verified (
Item.tsx:871-875,ListReorder.test.tsx:411-413, package exports). - Claim: a disabled row does not reveal its handle on hover, and focus shows it at half opacity: verified (
containerReveal.stylex.ts:35,Item.tsx:473-476; probe 0.5). The part saying a disabled row dims all its other slots is inaccurate: the start slot is not dimmed (Item.tsx:482-484). - Claim: right-to-left mirrors through logical properties: verified (right-to-left capture).
- Claim: the Vitest suites for List, Item, ListInput and TransferList pass with 18 files and 415 tests: verified by rerun. The Playwright, typecheck, lint and repository check results were not rerun.
- Claim: the changed test expectations listed: verified against the diff.
- Changeset (core patch: handle starts the row, hidden with a mouse until hover or focus, always shown on touch and in reorder mode): verified except the marker case.
.changeset/reorder-handle-start.md: blocking (wording).docs/design/ordered-collection-reordering.md: needs spec owner approval.docs/specs/components/List/List.spec.md: needs spec owner approval; marker case open.packages/core/src/Item/Item.tsx: clear.packages/core/src/Item/ItemLeadingContext.tsx: blocking (unnamed internal module).packages/core/src/Item/ItemTrailingContext.tsx: clear (removed).packages/core/src/List/List.doc.mjs: blocking (wording); touch omission note.packages/core/src/List/List.tsx: clear.packages/core/src/List/ListItem.tsx: blocking (rows that stay put).packages/core/src/List/ListReorderHandle.tsx: blocking (desktop decision); comment note.packages/core/src/List/__tests__/ListReorder.test.tsx: clear.packages/core/src/List/__tests__/ListReorderMode.interaction.browser.spec.ts: clear.packages/core/src/List/__tests__/ListReorderTouch.interaction.browser.spec.ts: clear.packages/core/src/List/listReorderContext.ts: clear.packages/lab/src/ListInput/ListInput.doc.mjs: clear.packages/lab/src/ListInput/ListInput.test.tsx: clear.packages/lab/src/ListInput/ListInput.tsx: blocking (focus selector).packages/lab/src/ListInput/__tests__/ListInputReorder.a11y.chromium.spec.ts: clear.packages/lab/src/TransferList/TransferList.doc.mjs: clear.packages/lab/src/TransferList/TransferList.test.tsx: clear.packages/lab/src/TransferList/TransferList.tsx: clear.packages/lab/src/TransferList/__tests__/TransferListReorder.a11y.chromium.spec.ts: clear.
| export const reorderRowStyle = ownRingContainerStyles.focusWithin; | ||
| export const reorderRowStyle = [ | ||
| ownRingContainerStyles.focusWithin, | ||
| revealStyles.container, |
There was a problem hiding this comment.
Desktop behaviour change needs an owner decision: with this reveal container on the row (and the handle's opacity bound to it at lines 383-384), a mouse user sees no handle until the row is hovered or focused, and it fades in. Either gate the hidden state to touch input, or cite the owner decision for it in the description.
| <ItemTrailingContext value={isHandleInRow ? reorderHandle : null}> | ||
| {/* One shape whether or not the row has a handle, so the row keeps its | ||
| element when that changes. */} | ||
| <ItemLeadingContext value={reorderHandle}> |
There was a problem hiding this comment.
A row that isReorderable rejects gets no handle and no reserved space here, so its label starts 36 px left of the movable rows' labels (List's Reorder With Pinned Rows story: Favorites and All mail at 24 px, the others at 60 px). TransferList and ListInput keep that column in this same change. Reserving the handle's width for a row that stays put (when reorder != null && !hasHandle) fixes core and lets TransferList drop clearsHandle.
| import type {ReactNode} from 'react'; | ||
| import {createSharedContext} from '../utils/sharedContext'; | ||
|
|
||
| export const ItemLeadingContext = createSharedContext<ReactNode>( |
There was a problem hiding this comment.
This is a new internal shared module (imported by Item/Item.tsx and List/ListItem.tsx) that no current record names, so it needs an owner API decision that says why existing modules are not enough. The component:List relationship bullet this pull request already edits could name it.
There was a problem hiding this comment.
This pull request needs a spec owner's decision before it can be approved, and it has nine blocking findings to fix as well.
It intentionally changes two current records: the List spec's reorder relationship, which moves the handle from the row's trailing edge to its leading edge, and the ordered-collection reordering design record's rest row, which gains a handle hidden until hover or focus. Approval needs an engineering owner to record that decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner, and a design owner may approve the design record.
Blocking findings:
- Desktop behavior change needs an owner decision: with a mouse, every reorderable List row's handle is now invisible until the row is hovered or focused and then fades in (
ListReorderHandle.tsx, therevealstyle andreorderRowStyle); either keep the handle visible for a mouse or cite the owner decision for it in the description. - The handle now hangs 30 px before the row's text and the list reaches 30 px outside its container, so inside a Card the Card clips the hovered handle and its focus ring, and at a page edge part of it is off-screen, which also contradicts the List spec's FR2 (
List.tsxreorderGutter). - Under
edge="outset"or"bleed",reorderGutterReachingPaddingshifts the list 30 px toward the start without widening it, so rows end 30 px short of the host's padding edge (List FR9) and the handle is clipped almost entirely. - The always-shown, in-row touch layout keys on
any-pointer: coarse, but touch presentations follow a coarse primary pointer (pointer: coarse), as the handle's own touch styles and the container reveal onmaindo; use that query inList.tsx,ListReorderHandle.tsx,ListInput.tsxandTransferList.tsx. - Rows that stay put lose the label column: under a coarse pointer their labels sit 36 px left of movable rows' labels, and in a numbered or bulleted list this happens for every pointer, so core
ListItemshould reserve the handle's width for a row without one, as TransferList and ListInput already do. ItemLeadingContextis a new internal module shared by Item and ListItem that no current record names, so it needs an owner API decision, for example in the List relationship bullet this pull request already edits.- ListInput's field-focus selector
button:not([aria-pressed])skips every toggle button, not only the handle, so after Add a record whose first control is a ToggleButton sends focus past it; exclude[data-astryx-list-reorder]instead. - The changeset and List docs say the handle starts the row and hangs before the text so the text keeps its place, but in a numbered or bulleted list it follows the marker, takes 36 px and moves every label for every pointer; say so.
- The handle's comment and the description say a disabled row dims each of its slots to half, but Item does not dim the start slot; reword both.
Claims and files checked
- Claim: the handle starts the row before its start content: false for numbered and bulleted lists, where it follows the marker (captures,
ListItem.tsx,ListReorderHandle.tsx). - Claim: with a mouse the handle stays hidden until its row is hovered or focused: verified (opacity 0 at rest, 1 on hover and on focus).
- Claim: hidden, it keeps its place and tab stop, so the text never shifts when it appears: verified for unmarked lists; in marked lists the label moves 36 px against the base.
- Claim: leave about 24 px of room before a reorderable list: the handle box reaches 22 px past the row box at default density; the room is a new caller requirement (finding above).
- Claim: always shown on touch screens, in reorder mode and on the focused handle: verified, but keyed on any coarse pointer (finding above).
- Claim: TransferList rows that stay put keep the label column: verified (every label at the same x).
- Claim: ListInput keeps an empty track so every first field lines up: verified in code and by the pull request's browser test (not rerun here).
- Claim: no API change: verified (built public surfaces identical).
- Claim: gestures, keys, announcements, the 28 px handle and its touch hit area are unchanged: verified in code; the focus ring is unchanged but now clipped in a Card.
- Claim: the handle stays the one element reordering adds to a row: verified (unit test passes).
- Claim: a disabled row dims its other slots to half: false for the start slot.
- Claim: unit tests pass, 18 files and 415 tests: verified.
- Claim: behavior and layout changes were removed or split: false; the hover reveal and the list gutter are part of this change.
- Files with findings:
.changeset/reorder-handle-start.md,docs/design/ordered-collection-reordering.md(owner approval),docs/specs/components/List/List.spec.md(owner approval; FR2 and FR9 left contradicting),packages/core/src/Item/ItemLeadingContext.tsx,packages/core/src/List/List.doc.mjs,packages/core/src/List/List.tsx,packages/core/src/List/ListItem.tsx,packages/core/src/List/ListReorderHandle.tsx,packages/lab/src/ListInput/ListInput.tsx,packages/lab/src/TransferList/TransferList.tsx. - Files clear:
packages/core/src/Item/Item.tsx,packages/core/src/Item/ItemTrailingContext.tsx(removed),packages/core/src/List/listReorderContext.ts,packages/core/src/List/__tests__/ListReorder.test.tsx,packages/core/src/List/__tests__/ListReorderMode.interaction.browser.spec.ts,packages/core/src/List/__tests__/ListReorderTouch.interaction.browser.spec.ts,packages/lab/src/ListInput/ListInput.doc.mjs,packages/lab/src/ListInput/ListInput.test.tsx,packages/lab/src/ListInput/__tests__/ListInputReorder.a11y.chromium.spec.ts,packages/lab/src/TransferList/TransferList.doc.mjs,packages/lab/src/TransferList/TransferList.test.tsx,packages/lab/src/TransferList/__tests__/TransferListReorder.a11y.chromium.spec.ts.
d8c6286 to
ef74432
Compare
bf26bcc to
f80dcc4
Compare
There was a problem hiding this comment.
This pull request needs a spec owner's decision before it can be approved, and it has nine blocking findings to fix as well.
It intentionally changes two current records: the List spec's reorder relationship, which moves the handle from the row's trailing edge to its leading edge, and the ordered-collection reordering design record's rest row, which gains a handle hidden until hover or focus. Approval needs an engineering owner to record that decision by commenting /approve-spec <full head SHA> on this pull request; the author may do so if they are an engineering owner, and a design owner may approve the design record.
Blocking findings:
- Desktop behavior change needs an owner decision: with a mouse, every reorderable List row's handle is now invisible until the row is hovered or focused and then fades in (
ListReorderHandle.tsx, therevealstyle andreorderRowStyle); either keep the handle visible for a mouse or cite the owner decision for it in the description. - The handle now hangs 30 px before the row's text and the list reaches 30 px outside its container, so inside a Card the Card clips the handle and its focus ring and at a page edge part of it is off-screen, which also contradicts the List spec's FR2 (
List.tsxreorderGutter). - Under
edge="outset"or"bleed",reorderGutterReachingPaddingshifts the list 30 px toward the start without widening it, so rows end 30 px short of the host's padding edge (List FR9) and the hovered handle is clipped almost entirely. - The always-shown, in-row touch layout keys on
any-pointer: coarse, but touch presentations follow a coarse primary pointer (pointer: coarse), as the handle's own touch styles and the container reveal onmaindo; use that query inList.tsx,ListReorderHandle.tsx,ListInput.tsxandTransferList.tsx. - Rows that stay put lose the label column: under a coarse pointer their labels sit 36 px left of movable rows' labels, and in a numbered or bulleted list this happens for every pointer, so core
ListItemshould reserve the handle's width for a row without one, as TransferList and ListInput already do. ItemLeadingContextis a new internal module shared by Item and ListItem that no current record names, so it needs an owner API decision, for example in the List relationship bullet this pull request already edits.- ListInput's field-focus selector
button:not([aria-pressed])skips every toggle button, not only the handle, so after Add a record whose first control is a ToggleButton sends focus past it; exclude[data-astryx-list-reorder]instead. - The changeset and List docs say the handle starts the row and hangs before the text so the text keeps its place, but in a numbered or bulleted list it follows the marker, takes 36 px and moves every movable label for every pointer; say so.
- The handle's comment and the description say a disabled row dims each of its slots to half, but Item does not dim the start slot; reword both.
The ListItem.tsx file header still says each movable row ends with its handle, a small non-blocking fix.
Claims and files checked
- Claim: the handle starts the row, before its start content: false for numbered and bulleted lists, where it follows the marker (captures,
ListItem.tsx,ListReorderHandle.tsx). - Claim: with a mouse the handle stays hidden until its row is hovered or focused: verified (opacity 0 at rest, 1 on hover and on focus).
- Claim: it hangs before the text and takes no width, so labels keep their alignment: verified for unmarked lists; in marked lists every movable label moves 36 px against the base.
- Claim: hidden, it keeps its tab stop: verified (Tab reaches the first handle and shows it).
- Claim: under a coarse pointer it always shows, inside the row; reorder mode and a focused handle always show it: verified, but keyed on any coarse pointer (finding above).
- Claim: after a list marker it never covers the number: verified.
- Claim: the list reaches 30 px toward the start and pads it back, and a clipping container should leave about 24 px: verified; the room is a new caller requirement (finding above).
- Claim: TransferList's heading and rows start 20 px further in while ordering, and a row that stays put starts its label past the handle on touch: verified in code.
- Claim: ListInput's handle hangs before the first field, sits in a track on touch, and a record that stays put keeps the track empty: verified in code; its browser tests were not rerun.
- Claim: no API change: verified (built public surfaces identical).
- Claim: gestures, keys, announcements, the 28 px box, the focus ring and the touch hit area are unchanged: verified in code; the ring is now clipped in a Card.
- Claim: the handle stays the one element reordering adds to a row: verified (unit test passes).
- Claim: a disabled row reveals the handle at half opacity, matching the row's other slots: false for the start slot.
- Claim: the layout uses logical properties, so right-to-left mirrors it: verified in code.
- Claim: unit tests pass, 18 files and 415 tests: verified.
- Claim: behaviour and interaction-model changes were removed or split: false; the hover reveal and the list gutter are part of this change.
- Files with findings:
.changeset/reorder-handle-start.md,docs/design/ordered-collection-reordering.md(owner approval),docs/specs/components/List/List.spec.md(owner approval; FR2 and FR9 left contradicting),packages/core/src/Item/ItemLeadingContext.tsx,packages/core/src/List/List.doc.mjs,packages/core/src/List/List.tsx,packages/core/src/List/ListItem.tsx,packages/core/src/List/ListReorderHandle.tsx,packages/lab/src/ListInput/ListInput.tsx,packages/lab/src/TransferList/TransferList.tsx. - Files clear:
packages/core/src/Item/Item.tsx,packages/core/src/Item/ItemTrailingContext.tsx(removed),packages/core/src/List/listReorderContext.ts,packages/core/src/List/__tests__/ListReorder.test.tsx,packages/core/src/List/__tests__/ListReorderMode.interaction.browser.spec.ts,packages/core/src/List/__tests__/ListReorderTouch.interaction.browser.spec.ts,packages/lab/src/ListInput/ListInput.doc.mjs,packages/lab/src/ListInput/ListInput.test.tsx,packages/lab/src/ListInput/__tests__/ListInputReorder.a11y.chromium.spec.ts,packages/lab/src/TransferList/TransferList.doc.mjs,packages/lab/src/TransferList/TransferList.test.tsx,packages/lab/src/TransferList/__tests__/TransferListReorder.a11y.chromium.spec.ts.
josephfarina
left a comment
There was a problem hiding this comment.
Thanks Ernest. Putting the handle at the start puts the grip beside the content it moves, and the hanging layout keeps text from jumping when the grip appears. The before and after captures across List, TransferList and ListInput, including the stacked and fixed-record cases, made this easy to follow.
I can't approve it yet. Here is why, and what I would do.
Why it can't ship yet
1. outset and bleed lists shift 30px. reorderGutterReachingPadding in List.tsx moves the list 30px further toward the start but keeps the width reachesContainerPadding sets (calc(100% + start + end)), and Astryx sizes boxes with border-box. So the list starts 30px past the host's padding edge and its rows end 30px short of the end padding edge. List FR9 requires both inline edges to reach the host's padding edge. In a host that clips and has less than 30px of padding, such as a rounded Card, the hanging handle and its focus ring are also cut.
2. On its own, this PR ships hidden List handles on desktop and a broken label column on touch, and #11575 then flips both back. In this PR's preview, the Reorder With Pinned Rows story on a phone profile puts the pinned rows' labels at 24px and the movable rows' labels at 60px. #11575 gives rows that stay put the handle's room and makes List and TransferList show their handles again (I measured every label at 60px there). Releases go out often, so merging this one alone could put both in front of people for a release.
3. The touch queries will disagree with main's reveal once rebased. This branch is 122 commits behind main. Main's shared container reveal now keys on the primary pointer, (pointer: coarse) (#11218, so a touchscreen laptop used with a mouse reveals on hover). The handle's layout here keys on (any-pointer: coarse) in List.tsx, ListReorderHandle.tsx, ListInput.tsx and TransferList.tsx. On that laptop the handle would take its in-row room but stay hidden until hover. AST-094 FR13 also ties the touch presentation to a coarse primary pointer.
4. ListInput's field-focus selector skips more than the handle. button:not([aria-pressed]) drops every toggle button, and core ToggleButton always renders aria-pressed. So after Add, a record whose first field is a ToggleButton no longer gets focus.
5. The docs promise a layout that numbered and bulleted lists don't get. The changeset, the reorderable JSDoc in List.tsx and List.doc.mjs say the handle starts the row and hangs so the text keeps its place. In a marked list the handle sits after the marker and takes its place in the row (isAfterMarker), so every movable label moves 36px, for every pointer.
Exact steps
- Land this together with #11575, or move #11575's defaults (List and TransferList always show handles) and its room for rows that stay put into this PR, so main never has hidden List handles or a broken label column on touch.
- For
edge="outset"and"bleed", don't move the list. Its rows already reach the host's padding edge, so let the hanging handle use the row's own start padding, and fall back to the in-row placement when that padding is narrower than the hang. Do the same for the end variant #11575 adds (reorderGutterAtEndReachingPadding). Add a test that renders a reorderable List withedge="outset"in a padded host and checks that both list edges equal the host's padding edges and the hovered handle sits fully inside the clip. - Rebase onto main and change every
(any-pointer: coarse)in the stack to(pointer: coarse), so the handle's layout matches the reveal. - In
ListInput.tsx, exclude the handle by its own marker:button:not([data-astryx-list-reorder]), and the same on the[tabindex]part. Add a unit case where the first column is a ToggleButton and Add focuses it. - Reword the changeset, the List JSDoc and
List.doc.mjs, for example: "before the row's start content; in a numbered or bulleted list, after the marker, where it takes its place in the row". - Small: the
revealcomment inListReorderHandle.tsxsays a disabled row dims each of its slots, but Item dims the label and end content, not the start content, so say that.ListItem.tsx's file header still says each movable row ends with its handle.
The List spec change and the design record's rest row still need the owners' approval (cixzhang, and you as the design record's co-owner), as your description says.
What I checked
- Unit tests at this head over List, Item, ListInput and TransferList: 18 files, 415 tests pass. Core typecheck passes.
- Label positions measured in this PR's and #11575's previews with a desktop and a phone profile.
- The
outsetandbleedmath, read againstreachesContainerPaddingand theborder-boxreset.
|
I'll run a full review to re-check this with your note. |
ef74432 to
50b9051
Compare
f80dcc4 to
66cbf4e
Compare
There was a problem hiding this comment.
This pull request needs a spec decision before it can be approved, and it has ten blocking findings to fix as well.
It intentionally changes three current records: the List spec's reorder relationship (the handle moves from the row's trailing edge to its leading edge, hidden with a mouse until hover or focus, with the list reaching into its host's padding), the Item spec (a new internal leading seam), and the ordered-collection reordering design record's rest row (a handle that may stay hidden at rest). Approval needs an engineering owner to approve those edits by commenting /approve-spec 66cbf4ec2f3cf9ef5a038331d01b61aedb861d3c; a design owner, the author included, may approve the design record. The open change request from a maintainer also stands until they re-review it.
Blocking findings:
- Desktop behavior change needs an owner decision: with a mouse or trackpad every reorderable List row's handle is now invisible until its row is hovered or focused and then fades in (
ListReorderHandle.tsx:189-199); gate it to touch input, or cite the decision. - List FR2 ("
paddedMUST preserve current header, list, and row geometry") is left as it is while padded rows in a Card move in 10 px and flush rows 18 px (List.tsx:501-507), so amend FR2 with the same decision or keep the rows in place. - A Card publishes its inset including its 1 px border, so the list reaches under the border and the Card cuts the first pixel of the focused handle's ring (handle at x = 16 px, padding edge at 17 px;
List.tsx:208-210). - The new Card test runs on the interaction project's phone profile, where every handle sits in its row, so it never checks the mouse layout it describes and would fail its own bound at
ListReorderPointer.interaction.browser.spec.ts:142with a mouse. - The always-shown in-row layout keys on
(any-pointer: coarse)in List, ListReorderHandle, ListInput and TransferList, while the touch-presentation rule is a coarse primary pointer,(pointer: coarse). - Where the handle sits in the row (touch, a numbered list,
outset,bleed), rows that stay put keep the old label column while movable rows move 36 px in (ListItem.tsx:476-491). - Numbered lists take the hang gutter although their handle sits in the row, moving their rows 10 px in a Card for nothing (
List.tsx:501-507). ItemLeadingContextis a new internal module shared by Item and ListItem that only this pull request's unapproved Item record edit names, so it needs that owner decision.- ListInput restates List's 30 px hang and padding reach (
ListInput.tsx:202-235), and TransferList restates it as 20 px and 28 px literals, instead of sharing one definition from core's reorder module. - Four claims are false: a disabled row does not dim its start slot (
ListReorderHandle.tsx:191-192), ListInput does not passisInRow,ListItem.tsx's header still says the row ends with its handle, and the scope checklist marks the hover reveal's interaction change as removed.
Claims and files checked
- Verified: the handle renders before the row's start content; with a mouse it is hidden until hover or focus and the text keeps its place where no host publishes padding; hidden, it keeps its tab stop and focus reveals it; under a coarse pointer, after a marker and under
outset/bleedit sits in the row;outsetandbleedlists no longer lose end room; reorder mode keeps it shown; where the host's padding is narrower, rows move in by the difference; TransferList's inset followsreorderable, not the search; ListInput's first-field focus skips only the handle; no public API changes (built surfaces identical); the List, Item, ListInput and TransferList unit suites pass; the layout uses logical properties. - False: a clipping container never cuts a handle; the Card test checks a mouse; a disabled row dims each slot; ListInput uses
isInRow; all stale "ends the row" text is fixed; behavior and interaction changes were removed or split. - Files with findings:
ListReorderHandle.tsx,List.tsx,ListItem.tsx,ItemLeadingContext.tsx,ListReorderPointer.interaction.browser.spec.ts,ListInput.tsx,TransferList.tsx,List.spec.md,Item.spec.md,ordered-collection-reordering.md. - Clear: the changeset,
List.stories.tsx,Item.tsx, the removedItemTrailingContext.tsx,List.doc.mjs,ListReorder.test.tsx,ListReorderModeandListReorderTouchspecs,listReorderContext.ts,internal/reorder.ts,listReorder.stylex.ts, ListInput's and TransferList's docs, unit tests and Chromium specs, andReorderGripPinchZoomspec.
| const FLUSH_ROOM = `${REORDER_GUTTER}px`; | ||
| // As much of each room as the container's padding holds, or all of it | ||
| // outside a container that sets its padding. | ||
| const PADDED_REACH = `min(${PADDED_ROOM}, var(--container-padding-inline-start, ${PADDED_ROOM}))`; |
There was a problem hiding this comment.
A Card publishes its whole inset here, border included (1 px border + 11 px padding = 12 px), so this reach puts the list under the border: in the Reorder in Card story the hovered or focused padded handle's box starts at x = 16 px while the Card clips at 17 px, cutting the first pixel of its 2 px focus ring. Reach one border width less where the host has a border, or keep the hang inside the list's own box.
| reachesContainerPadding && styles.reachesContainerPadding, | ||
| // Rows that reach the container's padding keep their handles in | ||
| // the rows (ListItem), so the list needs no room for them. | ||
| reorderSession != null && |
There was a problem hiding this comment.
This applies the gutter to numbered and bulleted lists too, where ListItem keeps the handle in the row (handleStaysInRow), so in a Card a numbered list's rows move from 358.7 to 368.7 px for room nothing uses. Skip the gutter when listStyle !== 'none', matching ListItem.
| parseFloat(getComputedStyle(element).borderInlineStartWidth), | ||
| ); | ||
| // The handle's box holds its focus ring, so the card cuts neither. | ||
| expect(handleBox.x, edge).toBeGreaterThanOrEqual(cardBox.x + border - 0.5); |
There was a problem hiding this comment.
This test uses the default page, which inherits the interaction project's phone profile (isMobile, hasTouch), so every handle sits in its row and nothing hangs. With a mouse the padded handle's x is 16 px against this bound of 16.5 px (Card x 16, border 1 px). Open the story with openFinePointerStory(browser, 'core-list--reorder-in-card').
| */ | ||
| const REORDER_HANDLE_HANG = 30; | ||
| /** As much of that room as the container's padding holds. */ | ||
| const HANG_REACH = `min(${REORDER_HANDLE_HANG}px, var(--container-padding-inline-start, ${REORDER_HANDLE_HANG}px))`; |
There was a problem hiding this comment.
This restates core List's 30 px hang and its padding reach (List.tsx:201-210), as TransferList restates the hang as 20 px and 28 px literals, kept in step only by SYNC comments. Export the hang and the reach style once from core's reorder module through @astryxdesign/core/internal/reorder, and use it in List, ListInput and TransferList.
| then hangs before the row's text and takes no width, so the text keeps its | ||
| place. A reorderable list pads that room before its rows and reaches into | ||
| its host's padding by as much of it as the padding holds, so the FR9 clip | ||
| and a clipping host keep the handles. The rows move in only by the room |
There was a problem hiding this comment.
FR2 still reads "padded MUST preserve current header, list, and row geometry", but this sentence lets rows move in (10 px for padded rows and 18 px for flush rows in a Card), so the record would contradict itself once approved. Amend FR2 in the same change, or keep the rows in place.
50b9051 to
b935ca9
Compare
66cbf4e to
81ec89b
Compare
|
Thanks, Joseph. Round 2 is up at 81ec89b, rebased onto main.
|
There was a problem hiding this comment.
This pull request needs a spec decision before it can be approved, and it has ten blocking findings to fix as well.
It intentionally changes three current records: the List spec's reorder relationship (the handle moves from the row's trailing edge to its leading edge, hidden with a mouse until hover or focus, with the list reaching into its host's padding), the Item spec (a new internal leading seam), and the ordered-collection reordering design record's rest row (a handle that may stay hidden at rest). Approval needs an engineering owner to approve those edits by commenting /approve-spec 81ec89b399a098730fe3723e5900bd5684ac162c; a design owner, the author included, may approve the design record. The open change request from an engineering owner also stands until they re-review it.
Blocking findings:
- Desktop behavior change needs an owner decision: with a mouse or trackpad every reorderable List row's handle is now invisible until its row is hovered or focused and then fades in (
ListReorderHandle.tsx:193-199); gate it to touch input, or cite the decision. - List FR2 ("
paddedMUST preserve current header, list, and row geometry") is left as it is while padded labels in a Card move in 10 px and flush labels 18 px (List.tsx:501-507), so amend FR2 with the same decision or keep the rows in place. - A Card's published inset includes its 1 px border, so the list reaches under the border and the Card cuts the first pixel of the focused handle's ring, and with no padded host the handle's box starts 6 px past the viewport in the Reorderable story (
List.tsx:208-210). - The new Card test runs on the interaction project's phone profile, where every handle sits in its row, so it never checks the mouse layout it describes and would fail its own bound at
ListReorderPointer.interaction.browser.spec.ts:142with a mouse. - Where the handle sits in the row (touch, a numbered list,
outset,bleed), rows that stay put keep the old label column while movable rows move 36 px in (ListItem.tsx:476-491). - Numbered lists take the hang gutter although their handle sits in the row, moving their rows 10 px in a Card for nothing (
List.tsx:501-507). ItemLeadingContextis a new internal module shared by Item and ListItem that only this pull request's unapproved Item record edit names, so it needs that owner decision.- ListInput restates List's 30 px hang and padding reach (
ListInput.tsx:202-236), and TransferList restates it as 20 px and 28 px literals, instead of sharing one definition from core's reorder module. - The earlier coarse-pointer finding is fixed in the code but not in the List record, whose bullet still says "Where no pointer is coarse" and "Under a coarse pointer" while the code and the design record follow the primary pointer as the touch-presentation rule requires (
List.spec.md:241-248). - Four description claims are false: ListInput does not pass
isInRow, a disabled row does not dim its start slot, the Card test does not run with a mouse, and the scope checklist marks the hover reveal's interaction change as removed.
Claims and files checked
- Verified: the handle renders before the row's start content; with a mouse it is hidden until hover or focus, and where no host publishes padding the text keeps its place; hidden, it keeps its tab stop and focus reveals it; under a coarse pointer, after a marker and under
outset/bleedit sits in the row;outsetandbleedlists keep their box; reorder mode keeps it shown; where the host's padding is narrower, rows move in by the difference; the in-row layout now follows the primary pointer; TransferList's inset followsreorderable, not the search; ListInput's first-field focus skips only the handle, a toggle first field included; the stale "ends the row" text is gone; the changeset describes the change; no public API changes (built surfaces identical); the List, Item, ListInput and TransferList unit suites pass; the layout uses logical properties. - False: a clipping container never cuts a handle; the Card test checks a mouse; a disabled row's other slots dim to half; ListInput uses
isInRow; behavior and interaction changes were removed or split. - Files with findings:
ListReorderHandle.tsx,List.tsx,ListItem.tsx,ItemLeadingContext.tsx,ListReorderPointer.interaction.browser.spec.ts,List.stories.tsx,ListInput.tsx,TransferList.tsx,List.spec.md,Item.spec.md,ordered-collection-reordering.md. - Clear: the changeset,
Item.tsx, the removedItemTrailingContext.tsx,List.doc.mjs,ListReorder.test.tsx, theListReorderModeandListReorderTouchspecs,listReorderContext.ts,internal/reorder.tsand its test,listReorder.stylex.ts, ListInput's and TransferList's docs, unit tests and Chromium specs, and theReorderGripPinchZoomspec.
| before the row's start content (`spec:AST-103` FR5). Where no pointer is | ||
| coarse, the handle shows while its row is hovered or holds the focus. It | ||
| then hangs before the row's text and takes no width, so the text keeps its | ||
| place. A reorderable list pads that room before its rows and reaches into | ||
| its host's padding by as much of it as the padding holds, so the FR9 clip | ||
| and a clipping host keep the handles. The rows move in only by the room | ||
| the host's padding lacks. Under a coarse pointer, the handle always shows |
There was a problem hiding this comment.
This still keys the reveal on any pointer ("Where no pointer is coarse", "Under a coarse pointer"), while the code now uses (pointer: coarse) and the design record row and changeset say "Where the primary pointer is fine". spec:AST-094 FR13: "A touch presentation applies under a coarse primary pointer". Suggested: "Where the primary pointer is fine, the handle shows while its row is hovered or holds the focus. … Under a coarse primary pointer, the handle always shows and takes its place in the row."
b935ca9 to
5dbbb8d
Compare
|
Folded into #11575, as the spec owner suggested: the start placement and the reveal now ship together with createReorderable's |
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
People reorder rows in core List, Lab TransferList and Lab ListInput.
outsetandbleed: their rows reach the container's padding edge, so nothing past a row could keep a hanging handle. The handle takes its place in the row there too.No API change. Gestures, keys, announcements, the handle's 28px box, its focus ring and its touch hit area are unchanged. The touch queries read the primary pointer,
(pointer: coarse), as main's container reveal does.Merge with #11575. This pull request and #11575 merge back to back. Merged alone, List's handles would stay hidden with a mouse until #11575 makes them show, and under a coarse pointer a row that stays put would start its label before its neighbours'.
Visual authority
DDrow reused or amended.Design decisionstable by a team design owner.docs/design/(awaiting owner approval).Three current records change, and each needs its owner's approval:
design:ordered-collection-reordering(owners: ernestt, cixzhang), therestrow. Its requirement stays the same: "The handle is discoverable without overpowering item content". Its allowed variation gains: "Where no pointer is coarse, the handle may stay hidden until its item is hovered or holds the focus". Placement already "may follow the collection family". Owner question: confirm that a handle shown on row hover and on focus, and always on touch, meets "discoverable".spec:AST-103relationship. The handle sits "at its leading edge, before the row's start content" instead of "at its trailing edge". Where no pointer is coarse, it shows on row hover or focus and hangs before the row's text. The list pads that room and reaches into its host's padding by as much of it as the padding holds, so the FR9 clip and a clipping host keep the handles. Under a coarse pointer, after a list marker, and underoutsetandbleed, it sits in the row.architecture:container-paddingINV3 ("A descendant escapes padding only when its component contract opts into bleed") is why this amendment carries the reach.ItemLeadingContext, is now defined there: a row passes one control through it, and Item renders it before its slots, unwrapped. It replacesItemTrailingContext, which no record defined.Owner decisions:
restrow's question above.@astryxdesign/core/internal/reorder) gainsisReorderHandle, and itsListReorderHandlePropsgainsisInRow. No record defines that entry; Lab's ListInput uses both.spec:AST-103(reorderable collections) FR5 still holds: the handle is the one element reordering adds to a row. Item renders it before its slots, unwrapped, through that seam.Before and after
Real Chromium, static Storybook builds at 2x. Before is the head of #11445: the handle ends the row and always shows. After is this branch. The touch capture emulates a coarse pointer.
List, at rest: the handles stay hidden
List, pointer over a row: the handle hangs before the text
List, keyboard focus on a handle
List, reorder mode
List on a touch screen: the handles always show, inside the rows
List, dark mode, pointer over a row
TransferList (Default), pointer over a row
TransferList (Locked): a row that stays put keeps the label column
ListInput (Tag options), pointer over a record
ListInput (Tag options), keyboard focus on a handle
ListInput (Responsive itinerary), stacked layout, pointer over a record
ListInput (fixed-record fixture): a record that stays put keeps the field column
In a Card, with a mouse
The Reorder in Card story, each card's first row hovered (default theme, 2x). A padded or flush list reaches into the card's padding for its hanging handle, and moves its rows in by the room the padding lacks. Under
outsetandbleed, and after a list marker, the handle sits in its row. The numbered card's Sent stays put: #11575 gives it the handles' room after its marker.State matrix
padded,flush,outsetandbleed, and a numbered list with a row that stays put (List, Reorder in Card).outsetandbleed), a row that stays put does not keep the handle's room yet, so its label starts before its neighbours'. feat(List): createReorderable's handle option places the reorder handle and sets how it reveals #11575 adds that room. TransferList and ListInput keep it already.Pre-review (fresh session)
A fresh agent session ran
pnpm review:preand the pre-review checklist on this branch. Its findings, and what changed:outsetandbleedlists lost 30px at their end edge. The list's reach added start padding but kept its width. These lists no longer keep the room: their rows reach the container's padding edge, so their handles sit in the rows.Review round 2 (Joseph Farina)
outsetandbleedlists shifted 30px: fixed in round 1. Their rows reach the host's padding edge, so the handle sits in the row there, and the list keeps its width. A browser test checks each edge treatment in a Card.48a3d9de1e6), and every touch query in the stack is now(pointer: coarse), the primary pointer, as main's container reveal and AST-094 FR13 use. The docs, the List record and the design record say "where the primary pointer is fine".isReorderHandlefrom the internal reorder entry, so ListInput never writes the private attribute's name. A unit test adds a toggle field.revealcomment says a disabled row dims its label and end content;ListItem.tsx's header says each movable row starts with its handle.isReorderHandle's module, the private attribute's owner, which loads no reorder code.Scope
Components: List, ListItem, Item (internal leading seam), ListInput, TransferList
Testing
vitest runover core List, Item, Icon and reorderable, Lab ListInput and TransferList: 23 files, 581 passed.playwright test --config=playwright.interaction.config.ts --project=chromium ListReorderPointer ListReorderTouch ListReorderMode: 51 passed, on this branch's built Storybook. New inListReorderPointer: in a Card, with a mouse, each edge treatment keeps the handle inside the card, andoutsetandbleedkeep it in the row.playwright test --project=chromium ListInputReorder TransferListReorder ReorderGripPinchZoom: 21 passed.check:knowledge,check:sync,check:changesets, andpnpm review:pre(0 findings).Changed test expectations:
Writing rubric results
Records:
docs/specs/components/List/List.spec.md,docs/specs/components/Item/Item.spec.md,docs/design/ordered-collection-reordering.md.