Repository navigation
feat(lab): TransferList reorders through core's createReorderable - #8143
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
e4d7ed7 to
2c3fd8d
Compare
There was a problem hiding this comment.
Approval waits on an owner decision. TransferList's move to core List's reorder model (owner decisions 1–4 in the description) and the draft AST-094 have no approved spec, so an engineering owner needs to provide or identify the governing records and record the decision by commenting /approve-spec <full head SHA> with this pull request's current head. The author may do this if they are an engineering owner. Whatever the decision, these changes are needed:
- Land #8139 and #8126 first, or rebase once they merge, so this pull request carries only its 1,023-line TransferList commit instead of 32,385 lines.
- In
reorderSelected, keep values that have no option in their own slots: today Space, Home, Escape on Owner with['name', 'retired', 'owner', 'status']reports['name', 'owner', 'retired', 'status']. - With
renderOption, name each reorder handle after its option rather than "Reorder item N". - The description says the keys keep their behavior, but arrow keys now move a row without a pick-up, so please include that in the owner decision.
[Automated review]
2c3fd8d to
d0c7163
Compare
There was a problem hiding this comment.
Approval waits on an owner decision: TransferList's move to core List's reorder model (owner decisions 1–4 in the description, plus arrow keys that now move a row without a Space pick-up) and the draft AST-094 have no approved spec. An engineering owner needs to provide or identify the governing records and record the decision by commenting /approve-spec <full head SHA> with this pull request's current head; the author may do so if they are an engineering owner. Whatever the decision, these changes are needed:
- Land #8139 and #8126 first, or rebase once they merge, so this pull request carries only its 1,023-line TransferList commit instead of 32,445 lines.
- In
reorderSelected, keep values that have no option in their own slots: Space, Home, Escape on Owner with['name', 'retired', 'owner', 'status']reports['name', 'owner', 'retired', 'status']. - Keep the selected rows' Remove buttons in one column and centred: beside the 44 px handle, movable rows grow to 44 px and Remove moves 36 px inward and 4 px up (visible in the Locked story).
- With
renderOption, name each reorder handle after its option rather than "Reorder item N".
[Automated review]
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| CheckboxList | 67.8 kB (0) · 7.7 kB CSS (0) | — | — · — · — |
| ContextMenu | 108.1 kB (0) · 17.4 kB CSS (0) | — | — · — · — |
| DropdownMenu | 97.0 kB (0) · 17.6 kB CSS (0) | — | — · — · — |
12 more components
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| List | 18.0 kB (0) · 790 B CSS (0) | — | ✓ · ✓ · — |
| ListItem | 70.3 kB (0) · 11.4 kB CSS (0) | — | ✓ · ✓ · ✓ |
| Markdown | 187.2 kB (0) · 20.6 kB CSS (0) | — | — · — · — |
| MoreMenu | 97.2 kB (0) · 17.6 kB CSS (0) | — | — · — · — |
| PowerSearch | 285.0 kB (0) · 24.1 kB CSS (0) | — | — · — · — |
| Table | 124.5 kB (0) · 18.3 kB CSS (0) | — | — · — · — |
| TableCell | 109.4 kB (0) · 17.9 kB CSS (0) | — | — · — · — |
| TableHeaderCell | 109.0 kB (0) · 17.7 kB CSS (0) | — | — · — · — |
| lab/Comments | 348.3 kB (0) · 2.5 kB CSS (0) | — | — · — · — |
| lab/CommentThread | 341.6 kB (0) · 2.4 kB CSS (0) | — | — · — · — |
| lab/TransferListSelector | 108.8 kB (−6.1 kB) · 1.4 kB CSS (−500 B) | — | — · ✓ · ✓ |
| lab/TransferList | 101.4 kB (−7.1 kB) · 1.2 kB CSS (−529 B) | — | — · ✓ · ✓ |
Package size: @astryxdesign/core 7.18 MB packed (+1.7 kB); no new dependencies.
API changes: none in this pull request
Committed API report behind this build: cli 29 rows, core 34 rows, theme-butter 1 row, theme-y2k 1 row; run pnpm api:report.
Touched components checked; add ci:run-visual or ci:run-rtl to run the full suites.
Generated by PR Enrichment workflow | View full report
d0c7163 to
03b352e
Compare
There was a problem hiding this comment.
Approval waits on an owner decision: TransferList's move to core List's reorder model (owner decisions 1–4 in the description, plus arrow keys that now move a row without a Space pick-up) and the draft AST-094 have no approved spec, so an engineering owner needs to provide or identify the governing records and record the decision by commenting /approve-spec <full head SHA> on this pull request, which the author may do if they are an engineering owner. Whatever the decision, these changes are needed:
- Land #8139 first, or rebase once it merges, so this pull request carries only its 1,128-line TransferList commit instead of 32,359 lines.
- In
reorderSelected, keep values that have no option in their own slots: Space, Home, Escape on Owner with['name', 'retired', 'owner', 'status']reports['name', 'owner', 'retired', 'status']. - Keep the selected rows' Remove buttons in one column beside the 44 px handle, and name each handle after its option under
renderOptioninstead of "Reorder item N". - Add the List drag browser spec that
ListReorder.test.tsxanduseListReorder.tscite, or correct those references.
[Automated review]
|
On the predecessor stack: this pull request is stacked, as its first line says, and only its last commit (03b352e, 4 files, +156 −972) is its own. It rebases onto main as each predecessor lands, and the diff then shrinks to that commit. |
03b352e to
1a2c33c
Compare
1a2c33c to
60cfda0
Compare
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.
There was a problem hiding this comment.
Changes requested. TransferList's switch to createReorderable follows spec:AST-103 and the opt-in decision cited in the description, but the stack no longer lines up.
- #8163 still builds on this pull request's previous head, so the
Stack: #8139 → #8143 → #8163line no longer holds, and on its own this pull request would land #8139's Core reorder (about 9,300 changed lines) with TransferList's change; rebase #8163 onto this head, or drop it from the Stack line in all three descriptions, so the stack review covers this change.
Non-blocking: design:ordered-collection-reordering still lists TransferList's old keyboard cue and drag preview as gaps, and a disabled list still dims only its selected panel. The pr-interaction-webkit (1/6) failure is in an interaction-harness spec that has since changed on main, so updating the branch picks up that change.
[Automated review]
|
/approve-spec c03aeed |
There was a problem hiding this comment.
Approved for this pull request's own change: TransferList and TransferListSelector now reorder through Core List's reorderable object, which follows spec:AST-103, and the opt-in default carries the owner's decision.
Next steps:
- This lands only after #8139 below it is approved and lands.
- The required
testcheck is red only through the WebKit interaction-harness job (internal/interaction-harness/src/harness.interaction.browser.spec.ts), a file this pull request does not touch;mainhas since changed that harness (#10530), so updating the branch ontomainshould clear it.
Non-blocking:
design:ordered-collection-reordering's implementation-gap note still says TransferList draws no keyboard insertion line and builds its own drag preview; both now come from List, so the note can be amended here or in a follow-up.- In a disabled TransferList only the selected panel dims; the available rows stay at full strength.
[Automated review]
| /** | ||
| * An adapted object's (internal/reorder `adaptReorderable`): the owner's | ||
| * options, which the owner's `start` finds this list by, while the moves go | ||
| * through these. | ||
| */ |
There was a problem hiding this comment.
Miss, non-blocking (INV29): this JSDoc opens with a fragment ("An adapted object's (…)"). Suggested:
/**
* Set by `adaptReorderable`: the owner's options. The owner's `start` finds
* this list by them; moves go through this object's options.
*/There was a problem hiding this comment.
This pull request is reviewed as part of its stack; see the review on #8163.
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.
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.
|
/approve-spec d9379cc |
Main's meta#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.
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.
|
/approve-spec 39059ef |
There was a problem hiding this comment.
Changes requested: TransferList's own switch to createReorderable still looks right, and this head's record edits are approved, but the stack no longer lines up.
- #8163 does not contain this head (it merges #8139's two newest commits), so the declared stack
#8139 → #8143 → #8163does not hold and this pull request as issued would land all of #8139's Core reorder, 9,841 of its 12,385 changed lines; merge this head into #8163's branch, or land #8139 first.
The description's line naming the head it merges also still names the previous one. The build and test workflow has not reported on this head yet.
[Automated review]
There was a problem hiding this comment.
Approved for this pull request's own change: Lab TransferList and TransferListSelector now reorder through Core List's reorderable object, which follows spec:AST-103, and the opt-in default carries the owner's decision.
Approved pending CI: the build and test workflow has not run on this head, because the branch conflicts with main in packages/core/src/motion/MEASUREMENTS.md, a file #8139 changes.
Next steps:
- This lands only after #8139 below it is approved and merged.
- Resolve that
MEASUREMENTS.mdconflict in #8139 and merge it into this branch, so CI runs here.
Non-blocking:
design:ordered-collection-reorderingstill lists TransferList's missing keyboard insertion line and its own drag preview as gaps; #8163 removes that note.- In a disabled TransferList only the selected panel dims; the available rows stay at full strength.
[Automated review]
|
/approve-spec c66c799 |
There was a problem hiding this comment.
Changes requested: TransferList's own switch to createReorderable still looks right, but #8163 has not merged this head, so the declared stack #8139 → #8143 → #8163 no longer holds and this pull request is reviewed on its own against main.
Blocking:
- The diff against
mainnow carries #8139's 9,839 lines (Core'screateReorderable, List's reorder engine, handle and hint, their tests and record edits) beside this pull request's own 2,550, so merging #8143 before #8139 would ship Core's new public reorder API under this review; merge this head into #8163's branch, or land #8139 first, so the stack holds again.
Once #8163 contains this head, #8143 is judged on its own change again, and it lands only after #8139 below it is approved and merged.
Non-blocking:
design:ordered-collection-reorderingstill lists TransferList's missing keyboard insertion line and its own drag preview as gaps; #8163 removes that note.- The description's line naming the head this branch merges, and its compare link, still name the previous head.
[Automated review]
There was a problem hiding this comment.
Approved for this pull request's own change: Lab TransferList and TransferListSelector now reorder through Core List's reorderable object, which follows spec:AST-103, and #8163 now contains this head, so the stack #8139 → #8143 → #8163 lines up again.
This lands only after #8139 below it is approved and merged.
Non-blocking:
design:ordered-collection-reorderingstill lists TransferList's missing keyboard insertion line and its own drag preview as gaps; #8163 removes that note.- In a disabled TransferList only the selected panel dims; the available rows stay at full strength.
- One comment suggestion inline, on the staged selector's reorder comment.
[Automated review]
| // The owner's reorder, aimed at the draft when staged and handed to | ||
| // the owner when immediate, with the owner's `isReorderable`. Made | ||
| // each render, so a move reads this render's value (the object may | ||
| // be made anew). |
There was a problem hiding this comment.
Non-blocking (INV29): the first sentence restates the code below it. Suggest keeping only the reasons:
// A staged selector moves its draft, so Cancel drops the move. The object
// is made each render, so a move reads this render's value.Main's meta#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.
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.
|
/approve-spec f9029bb |
There was a problem hiding this comment.
Changes requested: TransferList's switch to Core List's reorderable still looks right, and its spec changes are approved for this head, but one required check fails.
- Regression: since #8139 merged, its Changeset is no longer part of this pull request, so the required
lintjob's Changeset coverage check now fails on this pull request's own Core changes (the new./internal/reorderexport inpackages/core/package.jsonand the reorder source underpackages/core/src); add a Changeset naming'@astryxdesign/core': patch, for example a[chore] Internal:entry like.changeset/line-clamp-core-internal.md.
Non-blocking: the design record's TransferList implementation-gap note goes stale once this lands, a disabled list still dims only its selected panel, and two comments have suggested rewrites in earlier inline threads.
[Automated review]
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.
|
/approve-spec 1e21069 |
There was a problem hiding this comment.
Approved pending CI: CI is still running on this head.
TransferList's switch to Core List's reorderable follows spec:AST-103, this head's spec changes carry an engineering owner's approval, and the new Changeset for @astryxdesign/core clears the Changeset coverage check that failed before.
Non-blocking: the design record's TransferList implementation-gap note goes stale once this lands, a disabled list still dims only its selected panel, and two comments have suggested rewrites in earlier inline threads.
[Automated review]
Stack: #8143 → #8163
#8139 has merged; its own commits are the whole diff. Review only this PR's change: vjeux/astryx@44862e5...1e21069
Why
TransferList lets people order the items they picked, such as columns to show. Its grip grabbed every touch at once, so swiping over grips on a phone didn't scroll the panel.
What led to it
This is part of the UIKit-parity program, which makes Astryx's components behave like their iOS counterparts on touch screens. Moving Lab's reorders onto core's is part of it. TransferList had its own drag code, duplicating core
List's reorder (#8139). The selected panel becomes a coreListwithreorderable: hold to drag, flick to scroll, pinch to zoom, and keyboard reorder mode. Following Cindy's direction (her commits are here),reorderabletakes thecreateReorderableobject, withisReorderable(value)andonReorder({key, to}). TransferListSelector takes it too: in staged mode a move edits the draft, and Cancel drops it.Before:
<TransferList isReorderable />. After:<TransferList reorderable={createReorderable({onReorder})} />.This changes desktop behavior too: reordering is opt-in through the owner's object, so a TransferList without
reorderableno longer reorders with a mouse either (the oldisReorderabledefaulted to true). Spec owners' ruling, Nov 7 2026, 01:34 UTC: reordering stays opt-in, a consistency ruling underspec:AST-103FR2: onereorderableprop, no separate boolean, and TransferList loads no reorder code of its own. TransferList's doc page leads its migration guidance with their sentence: "With no reorderable, TransferList no longer reorders; pass reorderable={createReorderable(…)}". Cindy's commits are here, and she asked that the doc page and this description carry the migration below (paraphrase). Owner decision: asked whether TransferList reordering becomes opt-in, Cindy answered "yes" (Nov 7 2026, 23:41 UTC). The design record's implementation-gap note, which names TransferList's keyboard insertion line and drag preview, is removed in #8163, once ListInput's half is fixed too.To migrate:
TransferList's doc page carries the same example, "Migrating from isReorderable to reorderable".
Core's internal entry
@astryxdesign/core/internal/reordercomes in here with its first user. It adapts the owner's object, so the panel runs the owner's engine with its own moves, and the owner'sstart(key)still finds the panel's list. Like Core's other internal entries, it is undocumented and outside the public API.Options and tradeoffs
Why this choice
Reusing core's reorder means one implementation, and TransferList gets the hold, the keyboard path and the announcements. The cost is the API change; Lab is private, so there's no changeset. An option that can't move shows no grip (
spec:AST-103FR1). Reordering pauses while a search filters the panel, where a position is ambiguous. Cindy'sinternal/reorder.tstakes string or number keys to match her #8592, named here for her review.A disabled TransferList
On main, a disabled TransferList (#10192) keeps each grip as a focusable disabled control with a "‹label› cannot be reordered" tooltip. This change keeps that on core List's handle. The governing records are
spec:AST-085FR1 (a disabled control stays in the tab order) and FR4 (focus moves only where the component's record says), with #10192 for the rest. The port's earlier head hid the handles and moved focus to the row's Remove button. This head replaces that.ListItem. Its handle hasaria-disabled, stays in the tab order and keeps the focus. Keys and drags do nothing: core List ends a reorder mode or sends a drag home when its row becomes disabled.Tooltipto the handle: the row's last toggle button, which stays core's handle whenrenderOptionadds a toggle of its own.It also ends a text selection on iOS: on main, a finger held on TransferList's grip brings up the loupe and the drag grows a blue selection across the rows (2 of 3 takes on the iOS 26.2 simulator). Core's handle locks selection under a held finger, so this head selects nothing.
The change's own commit carries #8143's files as they were, so on its own it sets #10192's TransferList lines aside until the commits after it restore them; the pull request squash-merges. One commit splits three comment sentences over 25 words. One names the reorder hint in TransferList's anatomy, as
spec:AST-103FR4 asks of each adopting collection, and renames a test whose title still said reordering is on by default. Another lists List's reorder session amongarchitecture:react-component-runtimeINV13's known public-API gaps, asspec:AST-107FR7 asks: TransferList adapts its reorderable object to its values through Core's internal reorder entry, and ListInput (#8163) joins the session with rows that are notListItems, becausecreateReorderable's plain-elementattach(spec:AST-103FR4b) is not built. The last stops the panels clipping in the phone layout, below.The phone layout's panels no longer clip (c03aeed). On iOS, the panel's clip around core List's own inline clip drew the row flush with the panel's bottom edge 1 pt off for the length of the drop's glide: a compositing step, with no layout change. The phone layout's body doesn't scroll, so the clip kept nothing in; the wide layout keeps it. In iOS Simulator takes of a six-row drag, that row sat 3 device pixels off for 14 and 15 frames on a build of the stack without this change (260ccf0), and for 0 frames with it. The last two rows through the glide, 4× slower: before and after. The row at rest, during the glide, and their difference: before, 2,030 pixels apart, and after, 4. Every TransferList story at rest, and the last row in reorder mode, keep the same pixels without the clip in WebKit, at 402 and 1024 px. A Chromium trace of the glide under a coarse pointer paints nothing per frame, before and after.
How to check it
In Storybook
Lab/TransferList:This head, 1e21069, adds this pull request's Changeset for Core to f9029bb. That commit takes #8139's final head (92365e4), then main (44862e5), where #8139 squash-merged as a28d586, with no conflict, and leaves this pull request's own changes as they were. Lab is private, so the Changeset names
@astryxdesign/corealone, as an internal chore ([chore] Internal:). At this head: Core and Lab typecheck 0,check:knowledge, the comment-provenance check, the CLI search goldens, the Lab and Core reorder units (305), and in Chromium the TransferList reorder specs (6) and List's interaction specs (94, 1 skipped). With #8163 merged on top: the Lab and List units (275), the TransferList and ListInput reorder specs (13), the full UI project (23,156 tests) and the node project (17,682 tests, no failures).Earlier gates, at the stack's top before #8139 merged. The full run is at 4fd0951 (#8163, on main 1c8292c), whose tree differs from c7702fb only in the comment-provenance baseline and one file's formatting; at c7702fb lint, the baseline check, typecheck and the List and Item units ran again:
check:knowledge. This head also builds and typechecks on its own.pnpm install --frozen-lockfile: every Lab test (TransferList, TransferListSelector and ListInput included), core List, motion, Layer, Core's utils and internal entries, the keyboard module, Button andcreateReorderable, 5,510 of 5,510. The full UI project passes, 22,672 tests. The full node project passes 17,448 tests; its one failure, a CLI block-picker case (build tree› "login form with single sign-on buttons"), fails the same way on main (1c8292c).renderOptionthat renders its own toggle, the previous head described that toggle and left the handle without a description. On this head the handle has it and the toggle has none.hiddenat 390 px).Bundle cost
Measured with the PR size report's build options on the built packages (the eager chunks, minified, gzip). List and ListItem import 70.0 KB, and 114.8 KB with
createReorderable. TransferList imports 87.8 KB, and 132.7 KB withcreateReorderable(45.0 KB more, 141.3 KB minified). Withoutreorderable, TransferList's import holds no reorder engine, gesture or animator module: the engine comes with the owner's object.Writing rubric results
Over
architecture:react-component-runtime(one item joins INV13's known public-API gaps):Evidence
Before: the grip drags at once, and on iOS 26.2: after, hold, drag and drop, and a pinch zooms.
Pull request size
1,464 lines added and 1,086 removed in 17 files: 302 added of source and 918 of tests. TransferList's own drag code goes.