Skip to content

test(Wheel): the picker wheel's browser proofs, storyboard and activation - #8162

Closed
vjeux wants to merge 1792 commits into
meta:mainfrom
vjeux:uikit/c21-wheel-proofs
Closed

vjeux wants to merge 1792 commits into
meta:mainfrom
vjeux:uikit/c21-wheel-proofs

Conversation

@vjeux

@vjeux vjeux commented Oct 24, 2026 •

Copy link
Copy Markdown
Contributor

Depends on #8159. Review only this PR's change: vjeux/astryx@fe003a4...276a6e9

Maintainer impact

The touch wheel (#8159) moves through a gesture recognizer and compositor animations, and the unit tests' jsdom has neither. Without browser proofs, CI would pass a wheel that freezes when the page is busy, drifts from UIKit's curve, can't be caught mid-coast, takes the wrong Reduce Motion path, or shows the touch wheel under a mouse.

Evidence

  • Before: a coast paused while frames are presented fails the busy-page proof (0 of 30 frames moved); without chore(core): the wheel's compositor player #8526's baked landing, a Reduce Motion tap's row stayed 28 px off the band through a block.
  • After: the coast follows UIKit's curve within 0.07 px in Chromium and 0.06 px in WebKit; through a 566 ms block every frame moved, the longest stall 18 ms.

A flick's first 400 ms of coast, one frame per 16.7 ms (Chromium, touch):

Coast storyboard

A flick in Mobile Safari (iOS 26.2 simulator) through a 530 ms block, and on Android 15 (Chrome 124):

Mobile Safari Android Chrome
Block Flick

Opening the month and year wheels (Chromium, 4× CPU, 390 × 844, worst frame after the tap, 8 runs):

Column 2 years 200 years
Touch column (this stack) median 150 ms median 217 ms
Today's column under a mouse median 133 ms median 217 ms

Intended invariant

What led to it: Astryx's UIKit-parity work (spec:AST-094) makes the wheel behave like iOS, and these proofs keep it that way: motion runs on the compositor through a busy main thread (FR5), a finger catches any motion (FR6), and under Reduce Motion a flick's coast plays while every other turn cross-fades (FR8, design:reduced-motion DR2). Each year is drawn once (architecture:component-style-authoring INV7).

Change

Options: jsdom tests alone are fast but can't see the compositor; screenshot diffs catch looks, not timing. Chosen: browser specs with real touch input in Chromium and WebKit, judging the compositor's own frames. The cost is about a minute of CI, and some cases run only in Chromium, which alone exposes the rendering trace.

  • Wheel.interaction.browser.spec.ts drives a 60-row minute wheel (the Internal/Wheel story): a flick coasts onto its row; the coast advances every frame through a block, with no layout or paint per frame; a finger stops it; Reduce Motion fades a tap in 200 ms or less and lands it through a 700 ms block; a mouse drag scrolls today's column.
  • WheelActivation.interaction.browser.spec.ts, on DateInput's 2- and 200-year stories: every year listed once, and the long range opens about as fast as the short one at 4× CPU throttling.

Scope

  • No intended public API, product behavior, visual direction, or policy change.
  • Product changes discovered during the work were removed or split.
  • Public text and artifacts contain no internal Meta context.

Testing

  1. Build Storybook, then run pnpm exec playwright test --config playwright.interaction.config.ts on the two specs. In Chromium all 11 pass; in WebKit 6 pass and 5 skip (the Chromium-only trace and block cases, and the two mouse cases).
  2. Reverse a fix to check a proof bites: pausing the coast fails the busy-page case, and removing the baked landing fails the Reduce Motion block case.
  3. The date, time, motion, gesture and sheet suites pass. Not this change: CI's root-entry bundle check fails on main's test, which test(core): a touch component's import carries its gesture code, and nothing else does #8671 fixes.

Merge order: #8156, #8526, #8159, then this PR (full order in #8156).

Loading
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants