Skip to content

feat(lab): drag Table columns by their reorder handle - #14019

Open
humbertovirtudes wants to merge 3 commits into
mainfrom
feat/lab-table-drag-columns-pointer
Open

humbertovirtudes wants to merge 3 commits into
mainfrom
feat/lab-table-drag-columns-pointer

Conversation

@humbertovirtudes

@humbertovirtudes humbertovirtudes commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

Part of #3639. Closes #3956 with #14018.

Stack: #14028 → #14018 → #14019 → #14020

The first two commits are #14028 and #14018. Review the last commit, feat(lab): drag Table columns by their reorder handle.

User need

A mouse, pen or touch user moves a column by dragging it to its new place, as in other data tables. #14018 lets them reorder by keyboard and by taps; this adds the drag.

Design

useTableDragAndDropColumns gives the column handles a drag along the inline axis (columnDrag.ts). It adds no public API, and it runs on the parts of List's reorder that #14028 shares.

  • Pointer input. List's attachReorderMouse and attachReorderHold serve the whole table: the mouse input listens on the scroll area and the finger's hold on the header row, and each takes only presses on the handles. A mouse, or a pen where the primary pointer is fine, drags once it moves 4 px. A finger, and a pen where the pointer is coarse, drag after List's hold (spec:AST-103 FR3); before the hold, a flick on the handle scrolls the table (touch-action: manipulation where the pointer is coarse). The click that ends a drag released on its handle does not toggle reorder mode.
  • Drop place. The drop takes the place of the mounted column whose centre is nearest the dragged column's centre, among the places List's movableRange allows over the full columnKeys, so a kept column bounds the drop only in a run at an end of the order. An insertion line stands at the edge of that column, the full height of the table, before it toward the order's start and after it toward its end, mirrored in right-to-left. Two pinned exceptions: over a movable pinned header cell the drop goes to that pinned column, ahead of a nearer-centred column scrolled under it, and a line whose edge a pinned run covers stands at the run's inner edge (see Pinned columns). Nothing moves until the release, and the release reports the move once (design:ordered-collection-reordering).
  • Pinned columns. A pinned header cell sticks where it shows, so its drop place is kept from the scroll area's visible start and read where it shows at each move. A pinned column the reorderable lets move covers the columns that scroll under it, so it takes the drop wherever the dragged column's centre is over it; a pinned column isReorderable keeps at an end of the order is no drop place, as any kept column at an end. A line whose edge scrolls under pinned header cells, the selection column's or any other outside columnKeys among them, stands at the inner edge of the pinned run, where the dropped column comes into view; each cell's side is its sticky inset's, read as the drag begins. A line at a pinned column's own edge marks the place beside that column and stays there.
  • Layout reads. The drag reads the header cells' boxes and the scroll offset as it begins, from the scroll area's content box, inside its border and a scrollbar on its left as in right-to-left. A move reads no layout: it writes the line from what the drag knows. The drag's own autoscroll keeps the offset it sets, clamped to the range read at the start. List's scroll watch (feat(core): a Lab collection that runs its own reorder mode shares List's reorder parts #14028's watchReorderScroll) tells a scroll the drag did not cause, which the drag reads once, before its writes, the edge autoscroll's included, so a wheel scroll during an autoscroll stays. When column windowing mounts other header cells, which the drag tells from their keys without a layout read, it reads their boxes once more (architecture:react-component-runtime INV18).
  • One drag at a time. While a drag runs, the handles take no press and no click toggles reorder mode, and a drag its pointer input leaves when it detaches, or whose handle leaves the page, is cancelled, so a second pointer leaves the drag to end and drop. A drag ends reorder mode, as a List's does. At the scroll end, a scroll the drag did not cause still moves the line on the next autoscroll tick, and one just before the release still moves the drop. After a finger's or a coarse pen's drag, the next tap, Enter or Space on the handle starts reorder mode; a finger's hold that ends on another handle leaves a running drag's mark alone. After a mouse drag, the click a release on the handle raises takes the drag's mark in the release's task. A release away from the handle raises no click: the mark goes a task later, and a key on a handle drops it at once (no key is part of a release, and the browser may run a key's click ahead of that task), so the first Enter, Space or tap on the handle starts reorder mode. The change is in the column drag only; Core's shared mouse input, and so List, is unchanged.
  • Scrolling. Near the scroll area's inline edges, List's reorderAutoscroll and autoscrollStep scroll it at List's speeds. The handle takes the focus as the drag begins, so column windowing keeps the dragged column mounted.
  • Announcements. "Picked up, position 2 of 5", then "Dropped, position 4 of 5" once the move renders, or "Reorder cancelled" when the gesture is cancelled, with List's strings.
  • The dimmed source and the preview that follows the pointer come in feat(lab): a dragged Table column dims and its preview follows the pointer #14020 (Table: column reorder preview #3958).

Owner decisions

  • The pinned-cell drop rule. A pinned header cell takes the drop ahead of a nearer-centred column that scrolled under it. spec:AST-103 FR1's nearest-centre rule does not state it; FR1 could gain it for collections with pinned items.

Testing

Check Result
Chromium 149 (Chrome for Testing 149.0.7827.55), TableDragAndDropColumns.a11y.chromium.spec.ts 15/15 pass. New this round: after a mouse drag of Status released over the next column, the first Enter on Status's handle turns on reorder mode (it took a second Enter before); the file passed 3 runs in a row. Earlier: with Metric 1 to 3 pinned over 0 to 360 px of a 560 px area, a drag to the place before Metric 4 shows the line at 360 px and drops there (the centre-based side put it inside the run); a drag of Status ends Owner's reorder mode, and a pen pressed on Due's handle and a click on it mid-drag leave the drag to drop and Due out of reorder mode (without the press guard the drag never ended; without the click guard Due entered reorder mode). New: with only the selection column's header cell pinned and Status's edge scrolled under it, a drag of Due to the place before Status shows the line at the selection cell's inner edge and drops there; with the pinned rule over columnKeys only, the line stood 16 px inside the cell. New: with the Task header cell pinned and Owner scrolled 240 px under it, a drag over Task shows the line at Task's visible start and drops Owner first; a mouse drag of Owner by 300 px shows the line within 2 px of Due's end edge and taller than 150 px, moves nothing until the release, then moves the columns once ("Dropped, position 4 of 5"); 10 pointer moves of a drag read no box (getBoundingClientRect) and no scrollLeft while the page handles them; a drag released back on its handle drops in place and turns on no reorder mode; a drag held at the edge of 60 windowed columns scrolls more than 1,600 px and drops past the columns mounted at its start, with fewer than 20 mounted; on a 390 px touch screen a finger held 700 ms drags a column one place, and leaves its handle to start and end reorder mode by taps (without clearing the hold's mark, the first tap did nothing), and a flick on a handle scrolls the table and moves no column
A finger's hold ending on another handle during a mouse drag not driven by a test: neither Chromium's touch emulation nor jsdom delivers a concurrent finger and mouse to the gesture host, so the guard (draggedHandle === handle) is a one-line condition checked by reading
The windowed drag with its drop places read only at the start fails (drops at position 9, inside the 11 columns mounted at the start)
The pinned case with a pinned cell's drop place read as unpinned fails (no line, no drop)
The no-read case with the scroll offset read at each move fails (10 reads)
New: with Metric 1's header cell pinned and the table scrolled 60 px, a drag to the place before Metric 2 shows the line at Metric 1's visible inner edge and drops Metric 4 there; without the line clearing the pinned cell fails (the line 76 px inside, at 58 px less)
Chromium 149, List's ListReorder*.interaction.browser.spec.ts at this head 68/68 pass
vitest --project ui packages/lab/src/TableDragAndDrop 17/17 pass. New this round, columnDrag.test.ts: a release away from the handle drops the drag mark a task later, a release on the handle keeps it for its click, and a key drops it at once (the mark stayed before; red with the key drop removed too). Earlier, columnDrag.test.ts: on a driven clock, a scroll the drag did not cause between two autoscroll ticks stays and the next tick goes on from it (without the read before the write, the tick undid it); a scroll just before the release drops column a at b's place (without the read at the release, a dropped in place); a detach or a handle leaving the page cancels a running drag (without it, the drag stayed active); with a 15 px scrollbar on the area's left, the line after b stands at b's end, 200 px into the content (215 px, one scrollbar inside b, before)
Lab and Storybook typecheck; Storybook build pass
eslint --max-warnings=0 (strict), Prettier pass
pnpm check:repo, changeset coverage (nothing here ships to consumers) pass
check:component-import-boundaries --base-ref origin/main hold
pnpm review:pre --base #14018's branch 0 findings; 1,652 authored lines; merge clean

Scope

Components: Table, useTableDragAndDropColumns

  • One capability is added.
  • Unrelated fixes, cleanup, and policy changes were removed or split.
  • Consumer docs, focused tests, and migration evidence ship with the feature.
  • Public text and artifacts contain no internal Meta context.

@vercel

vercel Bot commented Nov 29, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Dec 2, 2026 10:57am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 29, 2026
@astracat-bot

astracat-bot Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
❓ Needs maintainer input (for maintainers only) Dec 2, 2026, 11:11 AM UTC

@github-actions

github-actions Bot commented Nov 29, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · b6d2858

Storybook · Sandbox · built from this PR's head

Current run: Heavy CI deferred: runs when review passes and before merge. Lint, typecheck and any path-filtered checks ran on this push.


Generated by PR Enrichment workflow | View current CI run

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. With a mouse, the column drag behaves as the description says, but it reads layout on every move, copies two shared Core utilities, departs from the reorder spec in the ways below, and two description claims are false. Separately, a finger now drags a column at once, without the hold the reorder spec gives touch drags: an engineering owner (the author is one) needs to decide whether that spec changes for Table column handles or the drag keeps the hold.

  • Every pointer move and every autoscroll frame reads every mounted header's layout and the scroll area's, after writing the insertion line (columnDrag.ts:81-146, columnReorder.ts:143-149): measure the slots once when the drag begins and read only the scroll offset per frame.
  • The edge autoscroll (columnDrag.ts:69-172) and the reorder-mode hint (useTableDragAndDropColumns.tsx:165-206, :371-433) copy Core's shared edgeAutoscroll and anchored hint, so columns autoscroll up to about 960 px/s while List rows top out at 500 px/s and the hint lost its fade: expose the shared ones to Lab and call them.
  • Each column handle creates its own pan gesture, which gives every mounted handle its own blocking touch listener, and kept columns get a placeholder span, while the reorder spec keeps reorder listeners per collection and the handle as the only added element: attach one recognizer for the header row and find headers by their existing data-column-key.
  • A drag at this head shows only the insertion line, with no dimmed source and no preview that follows the pointer, which the reorder spec and its design record require: ship the preview with the drag, or declare the stack with one identical Stack: #14018 → #14019 → #14020 line so it is reviewed as a whole.
  • The hook copies its latest options into the reorder from a layout effect on every render (useTableDragAndDropColumns.tsx:491-500), so the table's own commit effect first reads the previous column keys and commit() has to run twice: keep the options in useCommittedRef.
  • In a windowed table, the drag works out its bounds over the mounted headers only (columnDrag.ts:107), so a kept column in mid-order blocks the drop while it is the first or last mounted header, unlike reorder mode: work out the bounds over the whole order.
  • The description says no Lab entry exposes the long-press recognizer the finger hold needs, but @astryxdesign/core/internal/touch, which this pull request already imports, exports LongPressGestureRecognizer and GestureArena, and PageControl uses them.
  • The description calls createPanGesture "the shared drag path every Core drag uses", but List's reorder drag uses its own pointer listeners: describe it as Core's public pan.
  • Miss: a re-render that rebuilds the plugin (a reorderable made again on each render, or columns written inline) gives every handle a new ref, which destroys the dragged handle's pan and cancels the drag in progress, although the reorder spec says a new object during a drag does not cancel it (useTableDragAndDropColumns.tsx:276-280, :518-534): keep the labels out of the handle's ref callback.
Claims and files checked

Review mode: full; reason: history

Claims (title: "feat(lab): drag Table columns by their reorder handle"):

  • A column drags by its reorder handle: verified (columnDrag.ts:225-244).
  • The first commit is the keyboard and tap reorder pull request: verified (same commit).
  • Each handle drags along the inline axis through Core's public pan: verified (columnDrag.ts:226-227).
  • That pan is the shared drag path every Core drag uses: false (List's reorder drag).
  • It adds no public API: verified for published packages (Lab is unpublished; Core adds two catalog messages).
  • The drop takes the nearest mounted column's place, within the bounds kept end columns set: false in a windowed table (finding above).
  • The line stands at that column's start or end edge, the full table height, mirrored in right-to-left: verified in code (columnDrag.ts:126-129, columnReorder.ts:147-148); the left-to-right case is in the browser spec (reported).
  • Nothing moves until the release, which reports the move once: verified (columnDrag.ts:197-222 is the only report path); browser spec reported.
  • A release where the drag began drops the column in place: verified (columnDrag.ts:211-214).
  • Near the inline edges the drag scrolls each frame, faster nearer the edge, and re-reads the drop places as it scrolls: verified (columnDrag.ts:140-172).
  • The handle takes the focus as the drag begins, so column windowing keeps the column mounted: verified (columnDrag.ts:193; Core's column windowing keeps a focused cell's column).
  • Picked-up, dropped and cancelled announcements use Core's reorder strings: verified (the cancelled string reads "Reorder cancelled, back to position …").
  • The dimmed source and the preview come in a later pull request: verified absent at this head.
  • A finger drags at once, and a vertical move on the handle still scrolls: verified in code (sideways pan, no hold); waits on an owner decision.
  • Matching the hold needs an internal arena that no Lab entry exposes: false.
  • A pinned column's drop place is read where it shows, and the docs suggest keeping it with isReorderable: verified (measured slots; hook doc).
  • Chromium 8/8, Vitest 7/7, typecheck, lint, repository checks, import-boundary sizes (+0.0 KB), a red-first windowed run and pre-review: reported (CI has not run the heavy checks at this head).
  • Changeset: Core adds the two messages so Lab's hint can name its moves, and apps see no change: verified (no Core source reads them).
  • Scope checklist (one capability, no unrelated changes, docs and tests included, no internal context): verified.

Files:

  • .changeset/list-reorder-move-left-right.md: clear
  • apps/storybook/stories/TableDragAndDropColumns.stories.tsx: clear
  • packages/cli/test/swizzle-proof/samples.mjs: clear
  • packages/core/locales/en.json: clear
  • packages/lab/src/TableDragAndDrop/__tests__/TableDragAndDropColumns.a11y.chromium.spec.ts: clear (its touch test asserts the immediate finger drag that waits on the owner)
  • packages/lab/src/TableDragAndDrop/columnDrag.ts: layout reads, copied autoscroll, per-handle gestures, no preview, windowed bounds
  • packages/lab/src/TableDragAndDrop/columnReorder.ts: layout reads in showLineAt, per-handle attach, re-attach releases the drag
  • packages/lab/src/TableDragAndDrop/useTableDragAndDropColumns.doc.mjs: clear
  • packages/lab/src/TableDragAndDrop/useTableDragAndDropColumns.test.tsx: clear
  • packages/lab/src/TableDragAndDrop/useTableDragAndDropColumns.tsx: copied hint, latest-value effect, placeholder span, labels in the handle's ref identity
  • packages/lab/src/index.ts: clear

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changes requested. The column drag now keeps the finger's hold and runs on List's shared pointer input, autoscroll and drop range, with layout read only at pickup, so the earlier findings on this drag are fixed. Two things remain in this commit.

  • A reorderable pinned column keeps the drop place it had at pickup once the drag scrolls the table, because the drop places are measured once in scroll-content coordinates while a pinned header cell is sticky (columnDrag.ts:127-129, :188), so a drop on a pinned header lands at the column scrolling under it and the description's "its drop place is read where it shows" does not hold.
  • The description says the pointer input uses one listener on the scroll area, but the finger's hold is attached to the header row (columnDrag.ts:304-308), so please reword it to name both places.

The dimmed source and the moving preview are left to #14020, so this drag should land together with it.

Claims and files checked

Review mode: full; reason: history

Claims (title: "feat(lab): drag Table columns by their reorder handle"; this pull request's own commit in its stack):

  • The stack line is the same in all four pull requests, and the first two commits are the two pull requests below this one: verified.
  • A column drags sideways by its handle, with no new public API, on the reorder parts the Core pull request shares: verified (columnDrag.ts imports only the shared parts).
  • A mouse, or a pen on a fine pointer, drags once it moves 4 px; a finger, or a pen on a coarse pointer, after List's hold: verified (columnDrag.ts:292-308).
  • Before the hold, a flick on the handle scrolls the table: verified in code (touch-action: manipulation where the pointer is coarse, and List's hold); the touch test checks only that no column moves.
  • One listener on the scroll area serves the pointer input: false (the hold sits on the header row).
  • The click that ends a drag on its handle does not toggle reorder mode: verified (columnReorder.ts:262-266; browser test, reported).
  • The drop takes the nearest mounted column's place within the shared drop range over all ordered columns, so a kept column bounds it only at an end: verified, except for a reorderable pinned column once the drag scrolls (finding).
  • The line stands at that column's edge, the full table height, mirrored in right-to-left: verified in code (columnDrag.ts:150-154, :197-200).
  • Nothing moves until the release, which reports the move once: verified (columnDrag.ts:230-256).
  • Boxes are read at pickup, only the scroll offset on each move, and boxes again only when windowing mounts other headers: verified (columnDrag.ts:104-134, :188).
  • Near the edges, the drag scrolls at List's speeds with List's autoscroll: verified (columnDrag.ts:162-172, :206-217).
  • The handle takes the focus as the drag begins, so windowing keeps the column mounted: verified (columnDrag.ts:223).
  • Picked up, dropped and cancelled announcements use List's strings: verified.
  • The dimmed source and the preview come in the next pull request: verified absent here.
  • A pinned column's drop place is read where it shows: false once the drag scrolls (finding).
  • The docs suggest keeping a pinned column in place with isReorderable: verified (hook doc).
  • Browser 9/9, the red-first windowed run, List's 68/68, unit 8/8, typecheck, lint, repository checks, import boundaries and 676 authored lines: reported (typecheck and lint pass in CI; the files hold 9 browser and 8 unit tests; the line count matches).
  • Scope checklist (one capability, docs and tests included, no internal context): verified.

Files (this pull request's commit; the other changed files belong to the two pull requests below it):

  • apps/storybook/stories/TableDragAndDropColumns.stories.tsx: clear
  • packages/lab/src/TableDragAndDrop/__tests__/TableDragAndDropColumns.a11y.chromium.spec.ts: clear (the flick case could also assert the scroll)
  • packages/lab/src/TableDragAndDrop/columnDrag.ts: pinned column's drop place after a scrolling drag
  • packages/lab/src/TableDragAndDrop/columnReorder.ts: clear
  • packages/lab/src/TableDragAndDrop/useTableDragAndDropColumns.doc.mjs: clear
  • packages/lab/src/TableDragAndDrop/useTableDragAndDropColumns.tsx: clear

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns, and two fixes are needed in the column drag.

The drag lets a pinned header cell take the drop wherever the dragged column's centre is over it, even when a column scrolled under it has a nearer centre, and spec:AST-103 FR1 (nearest centre) does not state that rule; an engineering owner records whether FR1 gains it by commenting /approve-spec <head SHA> on this pull request, which the author may do as an engineering owner.

Blocking:

  • Miss: in a scrolled table, the insertion line for the place beside a pinned column stands under that column (columnDrag.ts:176-180), 76 px inside Task in the pinned story, instead of at the pinned column's visible edge where the dragged column lands.
  • The description says a pinned header cell "takes the drop wherever the dragged column's centre is over it", which is false for a pinned column kept in place with isReorderable, the setup the pinned story and the hook doc use.

Smaller suggestions: assert the flick's scroll in the touch test, and say in the hook doc that a pen on a coarse primary pointer waits for the hold.

Claims and files checked

Review mode: full; reason: history

  • Claim, a column drag by the reorder handle (title): verified (columnDrag.ts).
  • Claim, the drag runs along the inline axis on Core's shared reorder parts and adds no public API: verified (columnDrag.ts:17-26; no published package changes).
  • Claim, the mouse input listens on the scroll area and the hold on the header row, for handles only: verified (columnDrag.ts:312-333).
  • Claim, a mouse or a fine pen drags after 4 px: verified (reorderPointer.ts:23, :56-58).
  • Claim, a finger or a coarse pen drags after the hold: verified (reorderPointer.ts:199-201, columnDrag.ts:325).
  • Claim, a flick on a handle scrolls before the hold: verified in code (useTableDragAndDropColumns.tsx:132-135; the gesture host blocks only claimed touches); the Table test does not assert the scroll.
  • Claim, releasing a drag on its handle does not toggle reorder mode: verified (columnReorder.ts:261-266).
  • Claim, the drop takes the nearest mounted column inside the shared range over all column keys: verified (columnDrag.ts:151-170).
  • Claim, the line stands at the target's edge, full height, before or after, mirrored in right-to-left: verified (columnDrag.ts:176-180, :222-225); it can stand under a pinned column (blocking).
  • Claim, nothing moves until the release, which reports once: verified (columnDrag.ts:255-281).
  • Claim, a pinned cell's drop place is kept where it shows: verified (columnDrag.ts:109-130).
  • Claim, a pinned cell takes the drop wherever the dragged centre is over it: false for a pinned column kept in place (blocking); the rule itself awaits an owner decision.
  • Claim, one layout pass at pickup and on a windowing change, one scroll read per move: verified (columnDrag.ts:140-150, :200-230).
  • Claim, autoscroll at List's speeds through the shared parts: verified (columnDrag.ts:188-198, :231-242).
  • Claim, the handle takes the focus as the drag begins: verified (columnDrag.ts:248).
  • Claim, picked up, dropped and cancelled announcements with List's strings: verified (columnDrag.ts:249-252, :255-281).
  • Claim, the preview comes in the next pull request of the stack: reported.
  • Claim, no owner decisions beyond the lower pull requests: disputed by the pinned-cell rule.
  • Claim, the Testing table's runs (Chromium, Vitest, typecheck, lint, repository checks): reported; CI's lint, typecheck and import-boundary check pass at this head, and the heavy jobs wait for review.
  • File apps/storybook/stories/TableDragAndDropColumns.stories.tsx: clear.
  • File TableDragAndDropColumns.a11y.chromium.spec.ts: non-blocking (the flick's scroll is not asserted).
  • File columnDrag.ts: blocking (line under a pinned column), owner decision (pinned-cell rule), non-blocking (two comments restate names).
  • File columnReorder.ts: clear.
  • File useTableDragAndDropColumns.doc.mjs: non-blocking (pen wording).
  • File useTableDragAndDropColumns.tsx: non-blocking (handle styles repeat List's).

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns, and three fixes are needed in the column drag.

The drag lets a pinned header cell take the drop wherever the dragged column's centre is over it, even when a column scrolled under it has a nearer centre, and spec:AST-103 FR1 (nearest centre) does not state that rule; an engineering owner records whether FR1 gains it by commenting /approve-spec <head SHA> on this pull request, which the author may do as an engineering owner.

Blocking:

  • The new scroll tracking in columnDrag.ts (:217-272) copies the scroll watch that List's reorder engine already has (listReorderEngine.tsx:1495-1612) and already differs from it, for example by never clearing its own-scroll flag after a write that moves nothing, so move that watch into the shared reorder parts beside reorderAutoscroll and call it from both drags.
  • Miss: in a scrolled table, the insertion line for the place beside a pinned column stands under that column (columnDrag.ts:182-187), 76 px inside Task in the pinned story, instead of at the pinned column's visible edge where the dragged column lands.
  • The description says a pinned header cell "takes the drop wherever the dragged column's centre is over it", which is false for a pinned column kept in place with isReorderable, the setup the pinned story and the hook doc use.

Smaller suggestions: end a running drag before a second one begins, assert the flick's scroll in the touch test, and say in the hook doc that a pen on a coarse primary pointer waits for the hold.

Claims and files checked

Review mode: full; reason: rebase

  • Claim, a column drag by the reorder handle (title): verified (columnDrag.ts).
  • Claim, the drag runs along the inline axis on Core's shared reorder parts and adds no public API: verified (columnDrag.ts:18-27; no published package changes).
  • Claim, the mouse input listens on the scroll area and the hold on the header row, for handles only: verified (columnDrag.ts:344-365).
  • Claim, a mouse or a fine pen drags after 4 px: verified (reorderPointer.ts:23, :56-58).
  • Claim, a finger or a coarse pen drags after the hold: verified (reorderPointer.ts:199-201, useTableDragAndDropColumns.tsx:265, :271).
  • Claim, a flick on a handle scrolls before the hold: verified in code (useTableDragAndDropColumns.tsx:130-136); the Table test asserts only that no column moves.
  • Claim, releasing a drag on its handle does not toggle reorder mode: verified (columnReorder.ts:261-266; browser test at TableDragAndDropColumns.a11y.chromium.spec.ts:234).
  • Claim, the drop takes the nearest mounted column inside the shared range over all column keys: verified (columnDrag.ts:153-176, columnReorder.ts:203-207).
  • Claim, the line stands at the target's edge, full height, before or after, mirrored in right-to-left: verified (columnDrag.ts:182-187, :242-245); beside a pinned column it stands under that column (blocking).
  • Claim, nothing moves until the release, which reports once: verified (columnDrag.ts:286-313).
  • Claim, a pinned cell's drop place is kept where it shows: verified (columnDrag.ts:116-137).
  • Claim, a pinned cell takes the drop wherever the dragged centre is over it: false for a pinned column kept in place (blocking); the rule itself awaits an owner decision.
  • Claim, the drag reads the boxes and the scroll offset at pickup and a move reads no layout: verified (columnDrag.ts:214-218, :147-188).
  • Claim, the drag's autoscroll keeps the offset it sets, clamped to the pickup range, and a scroll it did not cause is read once from its scroll event: verified (columnDrag.ts:217-229, :260-272); the watch copies List's (blocking).
  • Claim, windowing that mounts other header cells, told by their keys, causes one more box read: verified (columnDrag.ts:110-113, :148-152).
  • Claim, autoscroll at List's speeds through the shared parts: verified (columnDrag.ts:195-205, :258).
  • Claim, the handle takes the focus as the drag begins: verified (columnDrag.ts:279).
  • Claim, picked up, dropped and cancelled announcements with List's strings: verified (columnDrag.ts:280-283, :295-312).
  • Claim, the preview comes in the next pull request of the stack: reported.
  • Claim, no owner decisions beyond the lower pull requests: disputed by the pinned-cell rule.
  • Claim, the Testing table's runs (Chromium, Vitest, typecheck, lint, repository checks): reported; CI's lint and typecheck pass at this head, and the build, test and docsite jobs wait for review.
  • File apps/storybook/stories/TableDragAndDropColumns.stories.tsx: clear.
  • File TableDragAndDropColumns.a11y.chromium.spec.ts: non-blocking (the flick's scroll is not asserted).
  • File columnDrag.ts: blocking (scroll-watch copy; line under a pinned column), owner decision (pinned-cell rule), non-blocking (a second drag leaves the first one's scroll listener; two comments restate names).
  • File columnReorder.ts: clear.
  • File useTableDragAndDropColumns.doc.mjs: non-blocking (pen wording).
  • File useTableDragAndDropColumns.tsx: non-blocking (handle styles repeat List's).

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns, and three fixes are needed in the column drag.

An engineering owner records the decision by commenting /approve-spec followed by this head's full commit SHA, or by amending spec:AST-103 FR1 to state the rule; the author may do so as an engineering owner. The three fixes are needed whichever way that goes, and this pull request lands only when it, #14028 and #14018 are approved.

  • Owner decision: a movable pinned header cell takes the drop whenever the dragged column's centre is over it, ahead of a nearer-centred column scrolled under it (columnDrag.ts:192-197), a rule that spec:AST-103 FR1's nearest-centre candidate does not state.
  • A sideways wheel or trackpad scroll made during an edge autoscroll is undone on the next 20 ms tick, because apply writes scrollLeft from the offset the drag last knew before place reads the new scroll (columnDrag.ts:322-334, :173-175); read the stale offset first, as List's edgeStep does.
  • A fine pen pressed on another column's handle during a mouse drag makes the shared mouse input drop that drag's press without an end, so the drag stays active with its line drawn and every later drag is refused (columnDrag.ts:273-275), which makes "a second pointer's drag waits for the first to end" false; refuse new presses while a drag runs (handleOf answering null) or reword the sentence.
  • The description's "a pinned column isReorderable keeps is no drop place" is false for a kept pinned column after a movable pinned one, which movableRange keeps inside the drop range; reword it to "a pinned column isReorderable keeps at an end of the order is no drop place".
Claims and files checked

Review mode: full; reason: rebase

  • Claims: columns drag by their reorder handle, verified (columnDrag.ts, browser test of a mouse drag).
  • Claims: no public API is added and the drag runs on List's shared reorder parts, verified (imports from Core's internal reorder entry; no export changes).
  • Claims: a mouse or a fine pen drags after 4 px, verified (reorderPointer.ts:23, :56-58, :110-116).
  • Claims: a finger or a coarse pen drags after the hold, and a flick on a handle scrolls the table, verified (reorderPointer.ts:191-201; touch test, scroll offset changes after the flick).
  • Claims: the mouse input listens on the scroll area and the hold on the header row, taking only presses on handles, verified (columnDrag.ts:406-427).
  • Claims: the click that ends a drag on its handle does not toggle reorder mode, verified (columnReorder.ts:266-270; browser test of a release on the handle).
  • Claims: the drop takes the nearest-centred mounted column inside the shared drop range over all ordered columns, verified (columnDrag.ts:183-206).
  • Claims: the line stands at the target's edge, full height, before it toward the start and after it toward the end, mirrored in right-to-left, verified (columnDrag.ts:212-221, :301-304).
  • Claims: nothing moves until the release, which reports the move once, verified (columnDrag.ts:348-375; mouse drag test).
  • Claims: a pinned cell's drop place is kept from the visible start and read where it shows, verified (columnDrag.ts:123-138, :156-160; pinned drop test).
  • Claims: a movable pinned column takes the drop when the dragged centre is over it, verified, held for the owner decision (columnDrag.ts:192-197).
  • Claims: a kept pinned column is no drop place, false (above).
  • Claims: a line under pinned cells, the selection column's included, stands at the run's inner edge, and a line at a pinned column's own edge stays, verified (columnDrag.ts:229-252; both inner-edge tests).
  • Claims: the drag reads boxes and the scroll offset at pickup and none on a move, verified (columnDrag.ts:170-182; read-count test).
  • Claims: the drag's own autoscroll keeps the offset it sets, clamped to the start's range, verified (columnDrag.ts:322-334).
  • Claims: a scroll the drag did not cause is read once, before its writes, false on the autoscroll path (above).
  • Claims: windowing that mounts other header cells is told from their keys and measured once more, verified (columnDrag.ts:117-120, :177-182).
  • Claims: a second pointer's drag waits for the first to end, false (above).
  • Claims: autoscroll near the inline edges at List's speeds, and the handle takes the focus so windowing keeps the column mounted, verified (columnDrag.ts:259-269, :341; windowed drag test).
  • Claims: picked up, dropped and cancelled announcements use List's strings, verified (columnDrag.ts:343-345, :360-374; the cancelled string reads "Reorder cancelled, back to position …").
  • Claims: the dimmed source and preview come in #14020, reported.
  • Claims: the testing table's lint and typecheck results, verified (CI passes both at this head); its browser, unit, build and repository-check results, reported (heavy CI is deferred at this head).
  • Claims: the changeset's internal reorder entry, its parts and the Move left and Move right strings, verified (internal/reorder-mode.ts, internal/reorder.ts:66, locales/en.json:654-661).
  • Files: columnDrag.ts, three blocking findings and the owner decision above.
  • Files: columnReorder.ts, clear.
  • Files: useTableDragAndDropColumns.tsx, clear.
  • Files: useTableDragAndDropColumns.doc.mjs, clear.
  • Files: TableDragAndDropColumns.a11y.chromium.spec.ts, clear.
  • Files: TableDragAndDropColumns.stories.tsx, clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns, and two fixes are needed in the column drag.

An engineering owner records the decision by commenting /approve-spec followed by this head's full commit SHA, or by amending spec:AST-103 FR1 to state the rule; the author may do so as an engineering owner. The two fixes are needed whichever way that goes, and this pull request lands only when it, #14028 and #14018 are approved.

  • Owner decision: a movable pinned header cell takes the drop whenever the dragged column's centre is over it, ahead of a nearer-centred column scrolled under it (columnDrag.ts:214-219), a rule that spec:AST-103 FR1's nearest-centre candidate does not state.
  • Miss: a sideways scroll in the last frame or two before the release never reaches the drop, because end keeps the target the last place computed and stops the scroll watch before its fold runs, so the column drops where the line stood before the scroll instead of under the pointer (columnDrag.ts:375-401); at the top of end, read the scroll the watch flagged and place once more, as List's drop does.
  • Miss: after a finger or coarse-pen drag the handle stays marked as dragged, because the hold's lift raises no click to clear the mark, so the next tap, Enter or Space on that handle does not start reorder mode, against spec:AST-103 FR4 (columnDrag.ts:365); clear the mark when a hold's drag ends.
Claims and files checked

Review mode: full; reason: history

  • Claims: columns drag by their reorder handle, verified (columnDrag.ts begin, place and end; wired in columnReorder.ts:214-239 and the hook at useTableDragAndDropColumns.tsx:279).
  • Claims: no public API is added and the drag runs on List's shared reorder parts, verified (imports from Core's internal reorder entry only; no export changes).
  • Claims: the mouse input listens on the scroll area and the hold on the header row, taking only presses on handles, verified (columnDrag.ts:429-456).
  • Claims: a mouse or a fine pen drags after 4 px, verified (reorderPointer.ts:23, :56-58, :110-116).
  • Claims: a finger or a coarse pen drags after the hold, and before it a flick scrolls, verified (reorderPointer.ts:191-201; touch-action: manipulation where the pointer is coarse, useTableDragAndDropColumns.tsx:132-135).
  • Claims: the click that ends a drag released on its handle does not toggle reorder mode, verified (columnReorder.ts:267-272).
  • Claims: the drop takes the nearest-centred mounted column inside the drop range over all ordered columns, false after a scroll just before the release (above).
  • Claims: the line stands at the target's edge, full height, before it toward the start and after it toward the end, mirrored in right-to-left, verified (columnDrag.ts:234-243, :323-326).
  • Claims: nothing moves until the release, which reports the move once, verified (columnDrag.ts:375-401).
  • Claims: a pinned cell's drop place is kept from the visible start and read where it shows, verified (columnDrag.ts:144-147, :179-182).
  • Claims: a movable pinned column takes the drop wherever the dragged centre is over it, verified, held for the owner decision (columnDrag.ts:214-219).
  • Claims: a pinned column kept at an end of the order is no drop place, verified (columnDrag.ts:205-213 with the shared drop range).
  • Claims: a line under pinned header cells, the selection column's included, stands at the run's inner edge on each cell's sticky side, and a line at a pinned column's own edge stays, verified (columnDrag.ts:156-176, :251-271).
  • Claims: the drag reads boxes and the scroll offset as it begins and no layout on a move, verified (columnDrag.ts:192-244, :290-363).
  • Claims: the drag's own autoscroll keeps the offset it sets, clamped to the range read at the start, verified (columnDrag.ts:344-361).
  • Claims: a scroll the drag did not cause is read once, before its writes, the autoscroll's included, verified for moves and ticks (columnDrag.ts:195-197, :347-349), false at the release (above).
  • Claims: windowing that mounts other header cells is told from their keys and measured once more, verified (columnDrag.ts:128-132, :199-204).
  • Claims: while a drag runs no handle takes a press, so a second pointer leaves the drag to end and drop, verified (columnDrag.ts:429-432; reorderPointer.ts:82-86).
  • Claims: a drag ends reorder mode, as a List's does, verified (columnDrag.ts:296-297; List's drag ends the mode as it begins).
  • Claims: autoscroll near the inline edges at List's speeds, and the handle takes the focus so windowing keeps the column mounted, verified (columnDrag.ts:278-288, :342-362, :366-368).
  • Claims: picked up, dropped and cancelled announcements use List's strings, verified (columnDrag.ts:369-372, :387-401).
  • Claims: the dimmed source and preview come in a later pull request of the stack, reported.
  • Claims: the owner decision on the pinned-cell rule, verified (FR1 states only the nearest-centre rule).
  • Claims: the testing table's lint and typecheck results, verified (CI passes both at this head); its browser and unit case counts, verified against the test files (14 and 12); its pass results and its red-first, build, repository-check and boundary-check rows, reported (heavy CI is deferred at this head); its 1,171 authored lines, verified.
  • Files: columnDrag.ts, the two fixes and the owner decision above.
  • Files: columnReorder.ts, the dragged-click fix touches its toggle (:267-272), otherwise clear.
  • Files: useTableDragAndDropColumns.tsx, clear.
  • Files: useTableDragAndDropColumns.doc.mjs, clear.
  • Files: TableDragAndDropColumns.a11y.chromium.spec.ts, clear.
  • Files: columnDrag.test.ts, clear.
  • Files: TableDragAndDropColumns.stories.tsx, clear.

Automated review (maintainer link)

Comment on lines +291 to +292
// One drag at a time: the handles take no press while it runs, as a
// List's do.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): List's handles still take a press during a drag (listReorderEngine.tsx:1131-1143), so "as a List's do" is not so. Suggested: // One drag at a time: no handle takes a press while it runs.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns, and one description fix is needed.

An engineering owner records the decision by commenting /approve-spec followed by this head's full commit SHA, or by amending spec:AST-103 FR1 to state the rule; the author may do so as an engineering owner. The fix is needed whichever way that goes, and this pull request lands only when it, #14028 and #14018 are approved.

  • Owner decision: a movable pinned header cell takes the drop whenever the dragged column's centre is over it, ahead of a nearer-centred column scrolled under it (columnDrag.ts:214-219), a rule that spec:AST-103 FR1's nearest-centre candidate does not state.
  • Miss: the description's Drop place bullet says the drop takes the nearest-centred column and the line stands at that column's edge, but over a pinned header cell the drop goes to the pinned column and the line moves to the pinned run's inner edge (columnDrag.ts:214-219, :251-271), so state that exception in the Drop place bullet itself.
  • Non-blocking: a drag still running when the pointer input re-attaches or its handle unmounts never ends, and the new toggle guard (columnReorder.ts:271) then keeps every handle out of reorder mode until the table unmounts; ending it with end(true) in the detach and on the handle's release, as List's release() does, closes that.

Both fixes from the last review are in: a scroll just before the release now moves the drop, and after a finger drag the next tap, Enter or Space starts reorder mode.

Claims and files checked

Review mode: full; reason: history

  • Claims: columns drag by their reorder handle, verified (columnDrag.ts begin, place and end; wired in columnReorder.ts:214-239 and the hook at useTableDragAndDropColumns.tsx:279).
  • Claims: no public API is added and the drag runs on List's shared reorder parts, verified (imports from Core's internal reorder and touch entries only; no export changes in this increment).
  • Claims: the mouse input listens on the scroll area and the hold on the header row, each taking only presses on handles, verified (columnDrag.ts:442-469).
  • Claims: a mouse or a fine pen drags after 4 px, verified (reorderPointer.ts:23, :56-58, :110-116).
  • Claims: a finger or a coarse pen drags after the hold, and before it a flick scrolls, verified (reorderPointer.ts:191-201; touch-action: manipulation where the pointer is coarse, useTableDragAndDropColumns.tsx:130-136; the touch test asserts the scroll offset changes).
  • Claims: the click that ends a drag released on its handle does not toggle reorder mode, verified (columnReorder.ts:271; browser test of a release on the handle).
  • Claims: the drop takes the nearest-centred mounted column inside the drop range over all ordered columns, and a kept column bounds it only at an end, false over a pinned header cell (above), otherwise verified (columnDrag.ts:205-228, columnReorder.ts:208-212).
  • Claims: the line stands at the target's edge, full height, before it toward the start and after it toward the end, mirrored in right-to-left, false where a pinned run covers that edge (above), otherwise verified (columnDrag.ts:234-243).
  • Claims: nothing moves until the release, which reports the move once, verified (columnDrag.ts:380-413; the mouse drag test checks the order before and after the release).
  • Claims: a pinned cell's drop place is kept from the visible start and read where it shows at each move, verified (columnDrag.ts:144-147, :179-182).
  • Claims: a movable pinned column takes the drop wherever the dragged centre is over it, verified, held for the owner decision (columnDrag.ts:214-219).
  • Claims: a pinned column kept at an end of the order is no drop place, verified (columnDrag.ts:210-213 with the shared drop range).
  • Claims: a line under pinned header cells, the selection column's included, stands at the run's inner edge on each cell's sticky side, and a line at a pinned column's own edge stays, verified (columnDrag.ts:156-176, :251-271; three browser tests).
  • Claims: the drag reads boxes and the scroll offset as it begins, no layout on a move, and the boxes again once windowing mounts other cells, verified (columnDrag.ts:192-204, :290-378; the browser test that counts reads during moves).
  • Claims: the drag's own autoscroll keeps the offset it sets, clamped to the range read at the start, verified (columnDrag.ts:351-363).
  • Claims: a scroll the drag did not cause is read once, before its writes, the autoscroll's included, so a wheel scroll during an autoscroll stays, verified (columnDrag.ts:195-197, :347-350; columnDrag.test.ts:27).
  • Claims: while a drag runs no handle takes a press and no click toggles reorder mode, so a second pointer leaves the drag to end and drop, verified (columnDrag.ts:442-443, columnReorder.ts:271; the second-pointer browser test).
  • Claims: a drag ends reorder mode, as a List's does, verified (columnDrag.ts:297; List's drag ends its mode as it begins).
  • Claims: at the scroll end, a scroll the drag did not cause still moves the line on the next autoscroll tick, verified (columnDrag.ts:354-358: every tick after a flagged scroll places the line).
  • Claims: a scroll just before the release still moves the drop, verified (columnDrag.ts:385-390; columnDrag.test.ts:107).
  • Claims: after a finger or coarse-pen drag, the next tap, Enter or Space on the handle starts reorder mode, verified (columnDrag.ts:461-468; the touch test toggles the handle on, then off, after the drag).
  • Claims: autoscroll near the inline edges at List's speeds, and the handle takes the focus so windowing keeps the column mounted, verified (columnDrag.ts:278-288, :342-367, :373; the windowed drag test).
  • Claims: picked up, dropped once the move renders, and reorder cancelled announcements use List's strings, verified (columnDrag.ts:375-377, :398-412; the shipped catalog's strings).
  • Claims: the dimmed source and preview come in a later pull request of the stack, reported.
  • Claims: the owner decision on the pinned-cell rule, verified (FR1 states only the nearest-centre rule).
  • Claims: the testing table's browser and unit case counts, verified against the test files (14; 11 and 2); its lint and typecheck results, verified (CI passes both at this head); its pass results and its red-first, Storybook build, repository-check and boundary-check rows, reported (heavy CI is deferred at this head); its 1,280 authored lines, verified.
  • Claims: the changeset belongs to the bottom pull request's increment and is judged in that review.
  • Files: columnDrag.ts, the description fix above, the stranded-drag note and two comment-style notes (:184, :291-292, :385-386).
  • Files: columnReorder.ts, the toggle guard's stranded-drag consequence, otherwise clear.
  • Files: useTableDragAndDropColumns.tsx, its handle styles repeat List's handle, otherwise clear.
  • Files: useTableDragAndDropColumns.doc.mjs, clear.
  • Files: TableDragAndDropColumns.a11y.chromium.spec.ts, clear.
  • Files: columnDrag.test.ts, clear.
  • Files: TableDragAndDropColumns.stories.tsx, clear.

Automated review (maintainer link)

Comment on lines +385 to +386
// A scroll the drag did not cause just before the release, which the
// watch has not folded in yet, still moves the drop, as a List's does.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): this is one 27-word sentence; a description stops at 25 words. Suggested:

// The watch folds a scroll in a frame or two later. Read one that came
// before the release, so the drop follows it.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns; no blocking fix is needed.

An engineering owner records the decision by commenting /approve-spec followed by this head's full commit SHA, or by amending spec:AST-103 FR1 to state the rule; the author may do so as an engineering owner. This pull request lands only when it, #14028 and #14018 are approved.

  • Owner decision: whether a movable pinned header cell takes the drop over a nearer-centred column scrolled under it (columnDrag.ts:214-219), a rule FR1's nearest-centre candidate does not state.
  • Non-blocking: a drag whose handle unmounts mid-drag still never ends, because onGesture finds the column by its handle (columnDrag.ts:416-419) after the handle's release has removed it, and the press and toggle guards then keep every handle inert; cancelling the drag in the handle's release, as List's release() does, closes it.

The description fix from the last review is in, and a pointer input that detaches mid-drag now cancels the drag.

Claims and files checked

Review mode: full; reason: history

  • Claims: columns drag by their reorder handle, verified (columnDrag.ts begin, place and end; wired in columnReorder.ts:214-239 and useTableDragAndDropColumns.tsx:279).
  • Claims: no public API is added and the drag runs on List's shared reorder parts, verified (imports from Core's internal reorder-mode and touch entries only; no export changes in this increment).
  • Claims: the mouse input listens on the scroll area and the hold on the header row, each taking only presses on handles, verified (columnDrag.ts:442-469).
  • Claims: a mouse or a fine pen drags after 4 px, verified (reorderPointer.ts:23, :56-58, :110-116).
  • Claims: a finger or a coarse pen drags after the hold, and before it a flick on the handle scrolls, verified (reorderPointer.ts:191-201; touch-action: manipulation under a coarse pointer, useTableDragAndDropColumns.tsx:130-136; the touch browser test asserts the scroll offset changes and no column moves).
  • Claims: the click that ends a drag released on its handle does not toggle reorder mode, verified (columnReorder.ts:271; the browser test of a release on the handle).
  • Claims: the drop takes the nearest-centred mounted column inside the drop range over all ordered columns, and a kept column bounds it only in a run at an end, verified (columnDrag.ts:205-228, columnReorder.ts:208-212).
  • Claims: the line stands at the target's edge, full height, before it toward the start and after it toward the end, mirrored in right-to-left, verified (columnDrag.ts:234-243).
  • Claims: the two pinned exceptions, a pinned cell taking the drop and a covered line moving to the pinned run's inner edge, verified (columnDrag.ts:214-219, :251-271); the first is held for the owner decision.
  • Claims: nothing moves until the release, which reports the move once, verified (columnDrag.ts:380-413; the mouse drag test checks the order before and after the release).
  • Claims: a pinned cell's drop place is kept from the visible start and read where it shows at each move, verified (columnDrag.ts:144-147, :179-182).
  • Claims: a pinned column kept at an end of the order is no drop place, verified (columnDrag.ts:210-213 with the shared drop range).
  • Claims: a line under pinned header cells, the selection column's included, stands at the run's inner edge on each cell's sticky side, and a line at a pinned column's own edge stays, verified (columnDrag.ts:156-176, :251-271; three browser tests).
  • Claims: the drag reads boxes and the scroll offset as it begins, no layout on an ordinary move, and the boxes again once windowing mounts other cells, verified (columnDrag.ts:192-204, :304-316; the browser test that counts reads during moves).
  • Claims: the drag's own autoscroll keeps the offset it sets, clamped to the range read at the start, verified (columnDrag.ts:351-363).
  • Claims: a scroll the drag did not cause is read once, before its writes, the autoscroll's included, so a wheel scroll during an autoscroll stays, verified (columnDrag.ts:195-197, :347-350; columnDrag.test.ts:27).
  • Claims: while a drag runs no handle takes a press and no click toggles reorder mode, and a drag whose pointer input detaches is cancelled, verified (columnDrag.ts:442-443, :470-476, columnReorder.ts:271; columnDrag.test.ts:182; the second-pointer browser test).
  • Claims: a drag ends reorder mode, as a List's does, verified (columnDrag.ts:297).
  • Claims: at the scroll end a scroll the drag did not cause still moves the line on the next autoscroll tick, and one just before the release still moves the drop, verified (columnDrag.ts:354-358, :385-390; columnDrag.test.ts:107).
  • Claims: after a finger or coarse-pen drag, the next tap, Enter or Space on the handle starts reorder mode, verified (columnDrag.ts:461-468; the touch browser test toggles the handle on, then off, after the drag).
  • Claims: autoscroll near the inline edges at List's speeds, and the handle takes the focus so windowing keeps the column mounted, verified (columnDrag.ts:278-288, :342-367, :373; the windowed drag test).
  • Claims: picked up, dropped once the move renders, and cancelled announcements use List's strings, verified (columnDrag.ts:375-377, :398-412; the shipped catalog's strings).
  • Claims: the dimmed source and preview come in a later pull request of the stack, reported.
  • Claims: the owner decision on the pinned-cell rule, verified (FR1 states only the nearest-centre rule).
  • Claims: with the keyboard pull request this closes the drag issue, verified (the issue asks for reordering columns by dragging).
  • Claims: the testing table's browser and unit case counts, verified against the test files (14 and 14); its lint and typecheck results, verified (CI passes both at this head); its pass results and its red-first, Storybook build, repository-check, boundary-check and List spec rows, reported (heavy CI is deferred at this head); its 1,353 authored lines, verified.
  • Claims: the changeset belongs to the bottom pull request's increment and is judged in that review.
  • Files: columnDrag.ts, the stranded-drag note above and three comment-style notes (:184, :291-292, :385-386).
  • Files: columnReorder.ts, the toggle guard's part in the stranded-drag note, otherwise clear.
  • Files: useTableDragAndDropColumns.tsx, clear.
  • Files: useTableDragAndDropColumns.doc.mjs, clear.
  • Files: TableDragAndDropColumns.a11y.chromium.spec.ts, clear.
  • Files: columnDrag.test.ts, clear.
  • Files: TableDragAndDropColumns.stories.tsx, clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns, and one fix is needed either way.

An engineering owner records the decision by commenting /approve-spec followed by this head's full commit SHA, or by amending spec:AST-103 FR1 to state the rule; the author may do so as an engineering owner. This pull request lands only when it, #14028 and #14018 are approved.

  • Owner decision: whether a movable pinned header cell takes the drop over a nearer-centred column scrolled under it (columnDrag.ts:216-221), a rule FR1's nearest-centre candidate does not state.
  • Miss: a finger hold that ends while a mouse drags another column clears the drag's mark (columnDrag.ts:467-469), so the release click on the dragged handle starts reorder mode and release (columnDrag.ts:486-490) no longer cancels the drag if that handle leaves the page; clear the mark only when draggedHandle === handle.

The handle-unmount fix from the last review is in: a drag whose handle leaves the page is now cancelled.

Claims and files checked

Review mode: full; reason: history

  • Claims: columns drag by their reorder handle, verified (columnDrag.ts begin, place and end; wired in columnReorder.ts:214-239 and useTableDragAndDropColumns.tsx:279).
  • Claims: no public API is added and the drag runs on List's shared reorder parts, verified (imports from Core's internal reorder-mode and touch entries only; no export changes in this increment).
  • Claims: the mouse input listens on the scroll area and the hold on the header row, each taking only presses on handles, verified (columnDrag.ts:444-471).
  • Claims: a mouse or a fine pen drags after 4 px, verified (reorderPointer.ts:23, :56-58, :110-116).
  • Claims: a finger or a coarse pen drags after the hold, and before it a flick on the handle scrolls, verified (reorderPointer.ts:191-201; touch-action: manipulation under a coarse pointer, useTableDragAndDropColumns.tsx:132-135; the touch browser test reads the scroll offset before and after the flick).
  • Claims: the click that ends a drag released on its handle does not toggle reorder mode, false (a finger hold on another handle that lifts mid-drag clears the mark, columnDrag.ts:467-469; see the finding).
  • Claims: the drop takes the nearest-centred mounted column inside the drop range over all ordered columns, and a kept column bounds it only in a run at an end, verified (columnDrag.ts:207-230, columnReorder.ts:208-212).
  • Claims: the line stands at the target's edge, full height, before it toward the start and after it toward the end, mirrored in right-to-left, verified (columnDrag.ts:236-245).
  • Claims: the two pinned exceptions, a pinned cell taking the drop and a covered line moving to the pinned run's inner edge, verified (columnDrag.ts:216-221, :253-273); the first waits on the owner decision.
  • Claims: nothing moves until the release, which reports the move once, verified (columnDrag.ts:382-415; the mouse drag browser test checks the order before and after the release).
  • Claims: a pinned cell's drop place is kept from the visible start and read where it shows at each move, verified (columnDrag.ts:146-147, :181-184).
  • Claims: a pinned column kept at an end of the order is no drop place, verified (columnDrag.ts:212-215 with the shared drop range).
  • Claims: a line under pinned header cells, the selection column's included, stands at the run's inner edge on each cell's sticky side, and a line at a pinned column's own edge stays, verified (columnDrag.ts:158-178, :253-273; three browser tests).
  • Claims: the drag reads boxes and the scroll offset as it begins, no layout on an ordinary move, and the boxes again once windowing mounts other cells, verified (columnDrag.ts:197-206, :306-318; the browser test that counts reads during moves).
  • Claims: the drag's own autoscroll keeps the offset it sets, clamped to the range read at the start, verified (columnDrag.ts:353-367).
  • Claims: a scroll the drag did not cause is read once, before its writes, the autoscroll's included, so a wheel scroll during an autoscroll stays, verified (columnDrag.ts:197-199, :349-352; the unit test at columnDrag.test.ts:28).
  • Claims: while a drag runs no handle takes a press and no click toggles reorder mode, verified (columnDrag.ts:444-445, columnReorder.ts:278; the second-pointer browser test).
  • Claims: a drag whose pointer input detaches, or whose handle leaves the page, is cancelled, so a second pointer leaves the drag to end and drop, false for the handle case after a concurrent finger hold (columnDrag.ts:486-490 keys on the mark the hold clears; see the finding); verified otherwise (columnDrag.ts:472-478, columnReorder.ts:263-269; unit tests at columnDrag.test.ts:183 and :253).
  • Claims: a drag ends reorder mode, as a List's does, verified (columnDrag.ts:299; the second-pointer browser test).
  • Claims: at the scroll end a scroll the drag did not cause still moves the line on the next autoscroll tick, and one just before the release still moves the drop, verified (columnDrag.ts:356-361, :389-392; the unit test at columnDrag.test.ts:108).
  • Claims: after a finger or coarse-pen drag, the next tap, Enter or Space on the handle starts reorder mode, verified (columnDrag.ts:465-469; the touch browser test toggles the handle on, then off, after the drag).
  • Claims: autoscroll near the inline edges at List's speeds, and the handle takes the focus so windowing keeps the column mounted, verified (columnDrag.ts:280-290, :344-369, :375; the windowed drag browser test).
  • Claims: picked up, dropped once the move renders, and cancelled announcements use List's strings, verified (columnDrag.ts:376-379, :397-414; the shipped catalog's strings).
  • Claims: the dimmed source and preview come in a later pull request of the stack, reported.
  • Claims: the owner decision on the pinned-cell rule, verified (FR1 states only the nearest-centre rule).
  • Claims: with the keyboard pull request this closes the drag issue, verified (the issue asks for reordering columns by dragging).
  • Claims: the testing table's browser and unit case counts, verified against the test files (14 and 15); its lint and typecheck results, verified (CI passes both at this head); its pass results, red-first, Storybook build, repository-check, boundary-check, List spec and pre-review rows, reported (heavy CI is deferred at this head); its 1,441 authored lines, verified.
  • Claims: the scope checklist (one capability, no unrelated fixes, docs and tests ship with it, no internal context), verified for this increment.
  • Files: columnDrag.ts, the cleared drag mark (blocking) and three comment-style notes (:186, :293-294, :387-388).
  • Files: columnReorder.ts, one comment-style note (:264), otherwise clear.
  • Files: useTableDragAndDropColumns.tsx, clear.
  • Files: useTableDragAndDropColumns.doc.mjs, clear.
  • Files: TableDragAndDropColumns.a11y.chromium.spec.ts, clear.
  • Files: columnDrag.test.ts, clear.
  • Files: TableDragAndDropColumns.stories.tsx, clear.

Automated review (maintainer link)

releases.delete(key);
}
// A handle that leaves the page mid-drag cancels the drag, as a
// List's does. One React only re-attaches stays on the page.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): "One React only re-attaches stays on the page." is hard to parse. Suggested:

// A handle that leaves the page mid-drag cancels the drag, as a
// List's does. A handle whose ref React only re-attaches stays on the page.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns, and one fix is needed either way.

An engineering owner records the decision by commenting /approve-spec followed by this head's full commit SHA, or by amending spec:AST-103 FR1 to state the rule; the author may do so as an engineering owner. This pull request lands only when it, #14028 and #14018 are approved.

  • Owner decision: whether a movable pinned header cell takes the drop over a nearer-centred column scrolled under it (columnDrag.ts:216-221), a rule FR1's nearest-centre candidate does not state.
  • Miss: in a right-to-left table whose scroll area also scrolls vertically, the drag's insertion line stands one scrollbar width inside the column it should border, because columnDrag.ts:138, :159 and :312 measure from the scroll area's border box without clientLeft, which reorder mode's line already takes off (columnReorder.ts:130).

The fix for a finger hold that cleared a running drag's mark is in.

Claims and files checked

Review mode: full; reason: history

  • Claims: columns drag by their reorder handle, verified (columnDrag.ts begin, place and end; wired in columnReorder.ts:214-239 and useTableDragAndDropColumns.tsx:279).
  • Claims: no public API is added and the drag runs on List's shared reorder parts, verified (imports from Core's internal reorder-mode and touch entries only; no export changes in this increment).
  • Claims: the mouse input listens on the scroll area and the hold on the header row, each taking only presses on handles, verified (columnDrag.ts:444-474).
  • Claims: a mouse or a fine pen drags after 4 px, verified (reorderPointer.ts:23, :56-58, :110-116).
  • Claims: a finger or a coarse pen drags after the hold, and before it a flick on the handle scrolls, verified (reorderPointer.ts:191-201; touch-action: manipulation under a coarse pointer, useTableDragAndDropColumns.tsx:130-135; the touch browser test reads the scroll offset before and after the flick).
  • Claims: the click that ends a drag released on its handle does not toggle reorder mode, verified (columnReorder.ts:274-280, columnDrag.ts:484-488; the mark changes mid-drag only through the dragged handle, :467-470; browser test at :427).
  • Claims: the drop takes the nearest-centred mounted column inside the drop range over all ordered columns, and a kept column bounds it only in a run at an end, verified (columnDrag.ts:207-230, columnReorder.ts:208-212).
  • Claims: the line stands at the target's edge, full height, before it toward the start and after it toward the end, mirrored in right-to-left, false (in right-to-left with a vertical scrollbar it stands one scrollbar width inside the column; see the finding); verified in left-to-right (columnDrag.ts:236-245).
  • Claims: the two pinned exceptions, a pinned cell taking the drop and a covered line moving to the pinned run's inner edge, verified (columnDrag.ts:216-221, :253-273); the first waits on the owner decision.
  • Claims: nothing moves until the release, which reports the move once, verified (columnDrag.ts:382-415; the mouse drag browser test checks the order before and after the release).
  • Claims: a pinned cell's drop place is kept from the visible start and read where it shows at each move, verified (columnDrag.ts:146-147, :181-184).
  • Claims: a pinned column kept at an end of the order is no drop place, verified (columnDrag.ts:212-215 with the shared drop range).
  • Claims: a line under pinned header cells, the selection column's included, stands at the run's inner edge on each cell's sticky side, and a line at a pinned column's own edge stays, verified (columnDrag.ts:158-178, :253-273; three browser tests).
  • Claims: the drag reads boxes and the scroll offset as it begins, no layout on an ordinary move, and the boxes again once windowing mounts other cells, verified (columnDrag.ts:197-206, :306-318; the browser test that counts reads during moves).
  • Claims: the drag's own autoscroll keeps the offset it sets, clamped to the range read at the start, verified (columnDrag.ts:353-367).
  • Claims: a scroll the drag did not cause is read once, before its writes, the autoscroll's included, so a wheel scroll during an autoscroll stays, verified (columnDrag.ts:197-199, :347-352; the unit test at columnDrag.test.ts:28).
  • Claims: while a drag runs no handle takes a press and no click toggles reorder mode, verified (columnDrag.ts:444-445, columnReorder.ts:278; the second-pointer browser test).
  • Claims: a drag whose pointer input detaches, or whose handle leaves the page, is cancelled, so a second pointer leaves the drag to end and drop, verified (columnDrag.ts:475-481, :489-493, columnReorder.ts:263-269; unit tests at columnDrag.test.ts:183 and :253).
  • Claims: a drag ends reorder mode, as a List's does, verified (columnDrag.ts:299; the second-pointer browser test).
  • Claims: at the scroll end a scroll the drag did not cause still moves the line on the next autoscroll tick, and one just before the release still moves the drop, verified (columnDrag.ts:356-361, :389-392; the unit test at columnDrag.test.ts:108).
  • Claims: after a finger or coarse-pen drag, the next tap, Enter or Space on the handle starts reorder mode, verified (columnDrag.ts:463-473; the touch browser test toggles the handle on, then off, after the drag).
  • Claims: a finger's hold that ends on another handle leaves a running drag's mark alone, verified by reading (columnDrag.ts:467-470); no browser drives a finger and a mouse at once, as the description says.
  • Claims: autoscroll near the inline edges at List's speeds, and the handle takes the focus so windowing keeps the column mounted, verified (columnDrag.ts:280-290, :344-369, :375; the windowed drag browser test).
  • Claims: picked up, dropped once the move renders, and cancelled announcements use List's strings, verified (columnDrag.ts:376-379, :397-414).
  • Claims: the dimmed source and preview come in a later pull request of the stack, reported.
  • Claims: the owner decision on the pinned-cell rule, verified (FR1 states only the nearest-centre rule).
  • Claims: with the keyboard pull request this closes the drag issue, verified (the issue asks for reordering columns by dragging).
  • Claims: the testing table's browser and unit case counts, verified against the test files (14 and 15); its lint and typecheck results, verified (CI passes both at this head); its pass results, red-first, List spec, Storybook build, repository-check and boundary-check rows, reported (heavy CI is deferred at this head); its pre-review authored-line count, reported (this head counts 1,444, three more after the last guard).
  • Claims: the scope checklist (one capability, no unrelated fixes, docs and tests ship with it, no internal context), verified for this increment.
  • Files: columnDrag.ts, the right-to-left line origin (blocking) and three comment-style notes (:186, :293-294, :387-388).
  • Files: columnReorder.ts, one comment-style note (:264), otherwise clear.
  • Files: useTableDragAndDropColumns.tsx, clear.
  • Files: useTableDragAndDropColumns.doc.mjs, clear.
  • Files: TableDragAndDropColumns.a11y.chromium.spec.ts, clear.
  • Files: columnDrag.test.ts, clear.
  • Files: TableDragAndDropColumns.stories.tsx, clear.

Automated review (maintainer link)

@astracat-bot astracat-bot Bot left a comment •

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns; no other fix is needed.

An engineering owner records the decision by commenting /approve-spec followed by this head's full commit SHA, or by amending spec:AST-103 FR1 to state the rule; the author may do so as an engineering owner. This pull request lands only when it, #14028 and #14018 are approved.

  • Owner decision: whether a movable pinned header cell takes the drop over a nearer-centred column scrolled under it (columnDrag.ts:223-228), a rule FR1's nearest-centre candidate does not state.

The 16 unit tests pass and a mouse drag of the Default story shows the line at Due's end edge and drops Owner fourth, both reproduced locally. Four comment-wording suggestions from earlier rounds remain optional (columnDrag.ts:193, :300-301, :394-395, columnReorder.ts:263-264).

Claims and files checked

Review mode: same-head; reason: none

  • changed rules (3): Claim bounding in one round; A claim bounded by a record is bounded; The rules above still apply to every case.
  • Rule, claim bounding in one round: checked the title, description and changeset claims against columnDrag.ts, columnReorder.ts, useTableDragAndDropColumns.tsx and Core's shared pointer, scroll-watch and autoscroll parts, no finding.
  • Rule, a claim bounded by a record: checked the claims that cite the reorder records (FR1, FR3, the ordering design record, the runtime record's layout-read rule) against those clauses, no finding.
  • Rule, the rules above still apply: checked every listed case below, no finding.
  • Claims: columns drag by their reorder handle, verified (columnDrag.ts begin, place and end; wired in columnReorder.ts:214-239 and useTableDragAndDropColumns.tsx:279; a mouse drag reproduced locally).
  • Claims: no public API is added and the drag runs on List's shared reorder parts, verified (imports from Core's internal reorder-mode and touch entries only; no export change in this increment).
  • Claims: the mouse input listens on the scroll area and the hold on the header row, each taking only presses on handles, verified (columnDrag.ts:455-481).
  • Claims: a mouse or a fine pen drags after 4 px, verified (reorderPointer.ts:23, :56-58, :110-116).
  • Claims: a finger or a coarse pen drags after the hold, and before it a flick on the handle scrolls, verified (reorderPointer.ts:191-201; touch-action: manipulation under a coarse pointer, useTableDragAndDropColumns.tsx:131-134; the touch browser test reads the scroll offset before and after the flick).
  • Claims: the click that ends a drag released on its handle does not toggle reorder mode, verified (columnReorder.ts:274-280, columnDrag.ts:491-495; browser test at :427).
  • Claims: the drop takes the nearest-centred mounted column inside the drop range over all ordered columns, and a kept column bounds it only in a run at an end, verified (columnDrag.ts:214-237, columnReorder.ts:208-212).
  • Claims: the line stands at the target's edge, full height, before it toward the start and after it toward the end, mirrored in right-to-left, verified (columnDrag.ts:243-252, :332-335; unit test at columnDrag.test.ts:328; reproduced locally at Due's end edge, 184 px tall).
  • Claims: the two pinned exceptions, a pinned cell taking the drop and a covered line moving to the pinned run's inner edge, verified (columnDrag.ts:223-228, :260-280); the first waits on the owner decision.
  • Claims: nothing moves until the release, which reports the move once, verified (columnDrag.ts:389-422; reproduced locally: the order is unchanged mid-drag and one "Dropped, position 4 of 5" follows the release).
  • Claims: a pinned cell's drop place is kept from the visible start and read where it shows at each move, verified (columnDrag.ts:153-156, :188-191).
  • Claims: a pinned column kept at an end of the order is no drop place, verified (columnDrag.ts:219-222 with the shared drop range).
  • Claims: a line under pinned header cells, the selection column's included, stands at the run's inner edge on each cell's sticky side, and a line at a pinned column's own edge stays, verified (columnDrag.ts:165-185, :260-280; three browser tests).
  • Claims: the drag reads boxes and the scroll offset as it begins, from inside the scroll area's border and a left scrollbar, verified (columnDrag.ts:140-141, :313-325; unit test at columnDrag.test.ts:328).
  • Claims: a move reads no layout, and the boxes are read again once windowing mounts other cells, told from their keys, verified (columnDrag.ts:130-134, :201-213).
  • Claims: the drag's own autoscroll keeps the offset it sets, clamped to the range read at the start, verified (columnDrag.ts:360-372).
  • Claims: a scroll the drag did not cause is read once, before its writes, so a wheel scroll during an autoscroll stays, verified (columnDrag.ts:204-207, :356-359; unit test at columnDrag.test.ts:29, passing locally).
  • Claims: while a drag runs no handle takes a press and no click toggles reorder mode, verified (columnDrag.ts:451-452, columnReorder.ts:278).
  • Claims: a drag whose pointer input detaches, or whose handle leaves the page, is cancelled, verified (columnDrag.ts:482-488, :496-500, columnReorder.ts:263-269; unit tests at columnDrag.test.ts:184 and :254, passing locally).
  • Claims: a drag ends reorder mode, as a List's does, verified (columnDrag.ts:305-306).
  • Claims: at the scroll end a foreign scroll still moves the line on the next autoscroll tick, and one just before the release still moves the drop, verified (columnDrag.ts:363-368, :396-399; unit test at columnDrag.test.ts:109, passing locally).
  • Claims: after a finger or coarse-pen drag, the next tap, Enter or Space on the handle starts reorder mode, verified (columnDrag.ts:470-479).
  • Claims: a finger's hold that ends on another handle leaves a running drag's mark alone, verified by reading (columnDrag.ts:474-477), as the description says.
  • Claims: autoscroll near the inline edges at List's speeds, and the handle takes the focus so windowing keeps the column mounted, verified (columnDrag.ts:287-297, :351-376, :382).
  • Claims: picked up, dropped once the move renders, and cancelled announcements use List's strings, verified (columnDrag.ts:384-386, :404-421).
  • Claims: the dimmed source and preview come in a later pull request of the stack, reported.
  • Claims: the owner decision on the pinned-cell rule, verified (FR1 states only the nearest-centre rule).
  • Claims: with the keyboard pull request this closes the drag issue, verified (the issue asks for reordering columns by dragging).
  • Claims: the testing table's unit result, verified (16 of 16 pass locally); its browser count, verified against the spec file (14 tests); its lint and typecheck results, verified (CI passes both at this head); its browser pass results, red-first, List spec, Storybook build, repository-check and boundary-check rows, reported (heavy CI is deferred at this head); its authored-line count, verified (1,509).
  • Claims: the scope checklist (one capability, no unrelated fixes, docs and tests ship with it, no internal context), verified for this increment.
  • Files: columnDrag.ts, three comment-style notes (:193, :300-301, :394-395), otherwise clear.
  • Files: columnReorder.ts, one comment-style note (:263-264), otherwise clear.
  • Files: useTableDragAndDropColumns.tsx, clear.
  • Files: useTableDragAndDropColumns.doc.mjs, clear.
  • Files: TableDragAndDropColumns.a11y.chromium.spec.ts, clear.
  • Files: columnDrag.test.ts, clear.
  • Files: TableDragAndDropColumns.stories.tsx, clear.

Automated review (maintainer link)

…st's reorder parts

A new internal entry, @astryxdesign/core/internal/reorder-mode, gives Lab the parts of List's reorder: the mode hint, which now offers Up and Down or Left and Right, the strings, the pointer input with a finger's hold, the edge autoscroll, the drop bounds and the preview copy. internal/reorder gains mountReorderStarter, so a reorderable object's start(key) reaches such a collection. List's session uses the same parts, so List does not change. The catalog gains Move left and Move right.
useTableDragAndDropColumns puts a reorder handle in the header cell of each column in columnKeys. The handle turns on reorder mode: Left and Right move the column one place at a time, mirrored in right-to-left, and List's mode hint offers the moves and Done as buttons. Each move reports once, and announces the column's place with List's reorder strings after it lands. The reorderable's handle option places the handle and reveals it, and its start(key) turns on the mode from the app's own action.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns, and one fix is needed either way.

An engineering owner records the decision by commenting /approve-spec followed by this head's full commit SHA, or by amending spec:AST-103 FR1 to state the rule; the author may do so as an engineering owner. This pull request lands only when it, #14028 and #14018 are approved.

  • Owner decision: whether a movable pinned header cell takes the drop over a nearer-centred column scrolled under it (columnDrag.ts:223-228), a rule FR1's nearest-centre candidate does not state.
  • Miss: after a mouse drag, the dragged handle keeps its drag mark (columnDrag.ts:379) because no click follows a release away from the handle, so the first Enter, Space or tap on that focused handle does not enter reorder mode, against spec:AST-103 FR4 (reproduced locally in the Default story, where the second Enter works), and clearing the mark a task after the release, ideally in Core's shared mouse input since List behaves the same, fixes it.

The 16 unit tests pass locally and CI's lint and typecheck pass on this head; four earlier comment-wording suggestions remain optional.

Claims and files checked

Review mode: full; reason: rebase

  • Claim, columns drag by their reorder handle: verified (drag code begin, place and end; a mouse drag reproduced locally).
  • Claim, no public API is added and the drag runs on List's shared reorder parts: verified (imports from Core's internal reorder entries only; no export change in this increment).
  • Claim, the mouse input listens on the scroll area and the hold on the header row, each taking only presses on handles: verified (columnDrag.ts:455-481).
  • Claim, a mouse or a fine pen drags after 4 px: verified (shared pointer input's slop and pointer-type check).
  • Claim, a finger or a coarse pen drags after the hold, and before it a flick on the handle scrolls: verified by reading (hold for touch and coarse pen; touch-action: manipulation under a coarse pointer); the touch browser run is reported.
  • Claim, the click that ends a drag released on its handle does not toggle reorder mode: verified (columnReorder.ts:274-280 with the drag mark).
  • Claim, the drop takes the nearest-centred mounted column inside the drop range over all ordered columns, and a kept column bounds it only at an end: verified (columnDrag.ts:214-237; a drag over a kept pinned column reproduced locally).
  • Claim, the line stands at the target's edge, full height, before it toward the start and after it toward the end, mirrored in right-to-left: verified (columnDrag.ts:243-252; left-to-right and right-to-left drags reproduced locally).
  • Claim, a pinned cell takes the drop and a covered line moves to the pinned run's inner edge: verified (columnDrag.ts:223-228, :260-280); the first waits on the owner decision.
  • Claim, nothing moves until the release, which reports the move once: verified (reproduced locally).
  • Claim, a pinned cell's drop place is kept from the visible start, and a pinned column kept at an end is no drop place: verified (columnDrag.ts:153-156, :188-191; reproduced locally).
  • Claim, the drag reads boxes and the scroll offset as it begins, from inside the border and a left scrollbar, and a move reads no layout: verified (columnDrag.ts:140-141, :201-213, :313-325; unit test).
  • Claim, the autoscroll keeps the offset it sets, clamped to the range read at the start, and a scroll the drag did not cause is read once before its writes: verified (columnDrag.ts:353-375; unit test).
  • Claim, boxes are read again only when column windowing mounts other cells: verified (columnDrag.ts:208-213).
  • Claim, one drag at a time; a detach or a removed handle cancels it; a drag ends reorder mode: verified (columnDrag.ts:302-306, :451-452, :482-500; unit tests).
  • Claim, a foreign scroll at the scroll end moves the line on the next tick, and one just before the release moves the drop: verified (columnDrag.ts:363-368, :396-399; unit test).
  • Claim, after a finger or coarse-pen drag the next tap, Enter or Space starts reorder mode, and another handle's hold leaves the mark alone: verified by reading (columnDrag.ts:470-479).
  • Claim, edge autoscroll at List's speeds, and the handle takes the focus so windowing keeps the column mounted: verified (columnDrag.ts:287-297, :382).
  • Claim, picked-up, dropped and cancelled announcements with List's strings: verified (reproduced locally).
  • Claim, the dimmed source and preview come later in the stack: reported.
  • Claim, the owner decision on the pinned-cell rule: verified (FR1 states only the nearest centre).
  • Claim, the testing table: unit tests verified (16 of 16 locally); lint and typecheck verified by CI on this head; browser, red-first, Storybook build, repository and boundary rows reported; authored lines verified (1,509).
  • Claim, the scope checklist: verified for this increment.
  • File columnDrag.ts: the first-Enter defect; three comment-style notes; otherwise clear.
  • File columnReorder.ts: one comment-style note; otherwise clear.
  • File useTableDragAndDropColumns.tsx: clear.
  • File useTableDragAndDropColumns.doc.mjs: clear.
  • File TableDragAndDropColumns.a11y.chromium.spec.ts: clear.
  • File columnDrag.test.ts: clear.
  • File TableDragAndDropColumns.stories.tsx: clear.

Automated review (maintainer link)

A mouse drags a column sideways by its handle at once, and a finger after List's hold. A line marks the drop place nearest the dragged column, the scroll area scrolls near its inline edges at List's speeds, and the columns move once, at the drop. The drag uses List's pointer input and edge autoscroll, with one listener for the table. It reads the header cells' boxes as it begins, and again only once column windowing mounts other cells; each move reads the scroll offset alone.

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approval waits on an engineering owner's decision about pinned columns; no other fix is needed.

The column drag now keeps reorder mode reachable after a drag: after a mouse drag released away from the handle, the first Enter on it turns reorder mode on. We reproduced that locally, and your 15 Chromium tests and 17 unit tests pass locally too.

  • Owner decision: while the dragged column's centre is over a movable pinned header cell, that pinned column takes the drop even when a column scrolled under it has a nearer centre. spec:AST-103 FR1 states only the nearest-centre rule. An engineering owner records the decision by commenting /approve-spec with this head's full SHA, or by amending FR1; you may do so yourself as an engineering owner.

Non-blocking: a few new and earlier source comments break INV29's length or accuracy rules; see the inline note on columnDrag.ts. This pull request lands only when it, #14028 and #14018 are approved.

Claims and files checked

Review mode: full; reason: history

  • Title, drag Table columns by their reorder handle: verified (columnDrag.ts; the Chromium mouse test passes locally)
  • A mouse or a fine pen drags after 4 px, a finger or a coarse pen after List's hold, and a flick on a handle scrolls: verified (shared pointer input, touch-action under a coarse pointer, Chromium touch test)
  • A drag released on its handle does not toggle reorder mode: verified (local capture and Chromium test)
  • The drop takes the nearest mounted column inside the shared drop range over all column keys, with a line at its edge, mirrored in right-to-left: verified (place, Chromium mouse and pinned tests)
  • The two pinned exceptions (a movable pinned cell takes the drop; a covered line stands at the pinned run's inner edge): verified as built; the first waits on the owner decision above
  • Nothing moves until the release, and the move reports once: verified (Chromium mouse test)
  • A move reads no layout; boxes are read at pickup and again only when windowing mounts other cells; a scroll the drag did not cause is read once before its writes: verified (Chromium no-read test, unit autoscroll and release tests)
  • One drag at a time, a detach or a removed handle cancels it, and a drag ends reorder mode: verified (unit tests, Chromium second-pointer test)
  • After a finger's or coarse pen's drag, and after a mouse drag released away from the handle, the first tap, Enter or Space starts reorder mode: verified (code, unit test, Chromium tests, local capture)
  • Core's shared mouse input and List are unchanged by this pull request's own commit: verified (the commit touches only Lab files and one story)
  • Edge autoscroll at List's speeds, and the handle takes the focus so windowing keeps the column mounted: verified (Chromium windowed test)
  • Announcements use List's strings: verified (catalog and Chromium test)
  • Testing table: reported; the unit and Chromium rows reproduced locally, and CI's lint and typecheck jobs pass at this head
  • Files: columnDrag.ts (comment notes only), columnDrag.test.ts, TableDragAndDropColumns.a11y.chromium.spec.ts, columnReorder.ts (comment note only), useTableDragAndDropColumns.tsx, useTableDragAndDropColumns.doc.mjs, TableDragAndDropColumns.stories.tsx: clear

Automated review (maintainer link)

Comment on lines +499 to +501
// No key is part of a release, and the input may run a key's click
// ahead of the task that drops the mark: a key on a handle drops it
// first, so Enter or Space after a drag starts reorder mode.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Non-blocking (INV29): this is one 41-word sentence, and it says "a key on a handle" while the listener at :507 takes every key in the scroll area. Suggested:

// A key's click can come before the timer drops the mark. Any key in
// the table drops it first, so Enter or Space starts reorder mode.

This branch was successfully deployed

1 active deployment
Preview — b6d28581 Deployed Dec 2, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review needs:spec-owner-review Current knowledge records await owner approval

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Table: drag-and-drop columns plugin

1 participant