Repository navigation
test(ListInput): the first-record mouse-drop case holds the animation clock across the release - #13778
Conversation
… clock across the release The glide starts at the drop and runs on the page's animation clock. The case read the fields' tops in a frame after the release, so on a loaded runner the glide had already moved them about 2 px. The page's animation clock now stands still from just before the release until the tops are read, so the read sees the glide's first frame every run. The 2 px bound is unchanged. Co-authored-by: ernestt <ernestt@users.noreply.github.com>
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
| Component | Size | LoC | Visual · A11y · RTL |
|---|---|---|---|
| lab/ListInput · Storybook | 100.4 kB (0) · 1.3 kB CSS (0) | 1,273 (0) | — · ✓ · — |
Package size: no published package changed; no new dependencies.
Not run on this PR: add ci:run-visual for Visual, ci:run-rtl for RTL.
Generated by PR Enrichment workflow | View full report
There was a problem hiding this comment.
Approved: holding the page's animation clock still across the release makes the first-record mouse-drop case read the glide's first frame on every run, which removes the timing dependence behind its failure on main. The case passed in this head's CI, and the 2 px bound and the rest of the spec are unchanged. Nothing is required before merge; two optional points:
- The description's Evidence and Testing sections are still placeholders; this head's passing CI run of the case could fill them.
- #13762 moves this spec to
packages/core/src/ListInput/__tests__/; whichever of the two lands second should check that the moved file keeps the freeze.
Claims and files checked
Review mode: same-head; reason: none
changed rules (0): none
- Claim: the case fails now and then on
main— verified:main's CI failed exactly this case on 2026-11-25, its shard's only failure; the measured distance could not be checked. - Claim: no product behavior changes, test only — verified: one test file changes, 8 lines added.
- Claim: the glide starts at the drop and runs on the page's animation clock — verified: the drop's rebase starts each moved row's spring at the drop's time (
listReorderEngine.tsx:2061,:2110,:2115) as keyframe animations (animator.ts:2137-2146). - Claim: the case read the tops in an animation frame after the release — verified:
fieldTopsreads inrequestAnimationFrame(:212-231) right afterpage.mouse.up()(:263-264). - Claim: on a loaded runner frames pass first and the glide has moved the fields about 2 px — consistent: the settle spring (0.5 s, no bounce) moves a row about 2% of its shift in the first frame and about 7% by the second.
- Claim: the clock stands still from just before the release until the tops are read, then runs again — verified:
:260-265. - Claim: the read sees the glide's first frame every run — verified from the code: the glide's animations fill both ways and are retired only when their own time reaches the end (
animator.ts:2143,:2239-2246); the case passed on its first attempt in this head's CI. - Claim: the 2 px bound is unchanged — verified:
:271. - Claim: a moved record's glide starts where its fields were shown, under the touch-presentation record's FR43 and FR45 — verified: both requirements are current and cover a mouse drop's spring; the column-label case is the engine's handle-inset offset (
listReorderEngine.tsx:2069-2075). - Claim: one case, three DevTools Protocol calls around the release and the read — verified:
:261,:262,:265, with the session opened at:260. - Claim: overlap with #11720 checked — verified: #11720 edits the stories and the record-columns case, not this one.
- Claim: ListInput (Lab) only, with no new public API, visual change, default or interaction model, and no internal context in public text — verified.
- File:
packages/lab/src/ListInput/__tests__/ListInputReorder.a11y.chromium.spec.ts— clear.
User impact
Contributors and the release check see
ListInputReorder.a11y.chromium.spec.ts("a mouse drop that moves the first record › starts each moved record's glide where its fields were shown…") fail now and then onmain: a record's field measured 2.13 px from where it was shown, against a 2 px bound. No product behavior changes; this fixes the test.Problem and solution fit
Animation.setPlaybackRate0) from just before the release until the tops are read, then runs again. The read sees the glide's first frame every run.Expected behavior and authority
A moved record's glide starts where its fields were shown, also when the record gains or loses the column labels (the drop glide;
spec:AST-094FR43, FR45).Smallest restoration
One case in
packages/lab/src/ListInput/__tests__/ListInputReorder.a11y.chromium.spec.ts: three CDP calls around the release and the read.Evidence
Chromium 149, one worker, no retries, on a quiet machine:
main: with a 50 ms wait forced betweenpage.mouse.up()and the read,main's case failed 3 of 3 (7.68, 9.98 and 7.22 px against the 2 px bound). The same wait with this case passed 3 of 3. This case as committed passed 10 of 10. (mainas committed passed 10 of 10 on that machine; CI's 2.13 px needs a loaded runner.)main): a real mouse drags the first record's handle 150 px down and releases with the animation clock slowed to a tenth. Each moved record's first field is at the same place in the last frame before the release and in the glide's first frame (391 → 391, 471 → 471, 501 → 501 px): 0 px in 6 of 6 takes, at a tenth and at full speed. At full speed the glide's first frame moves the fields 2.3 to 3.1 px, so a read one frame late passes the 2 px bound, as on CI. The test was fragile, not the product.Overlap checked: #11720 (it changes ListInput's stories and other cases in this file; this changes one case that fails on
mainnow, so it lands on its own)Scope
Components: ListInput (Lab), test only
Testing
playwright test ListInputReorder.a11y.chromium.spec.ts -g "glide where its fields were shown"(Chromium,--retries=0 --workers=1): 10 of 10 at this head, and 3 of 3 with a forced 50 ms wait between the release and the read (main: 0 of 3 with that wait).