Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewComponent Size
Sizes are gzip. Import counts the JavaScript the import loads eagerly; CSS counts the package stylesheet rules referenced by the modules it can load from its own package, lazily loaded ones included. Bundle Size SummaryGzip figures measure each package's entry file, not the code an import pulls in.
Accessibility AuditStatus: No accessibility violations detected. Visual Regression55 of 502 shot(s) changed. A change here is a question, not a failure: check whether the after is the
and 35 more. Generated by PR Enrichment workflow | Storybook | Sandbox | View full report |
There was a problem hiding this comment.
This pull request needs an engineering owner's decision before it can be approved: the 0 ms touch arm for the checkbox and radio marks rests only on the draft spec:AST-094 added here, whose FR4 intentionally narrows architecture:theme-tokens to pointer presentations. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so if they are an engineering owner), or amends the record; what has to be settled is whether touch presentations may leave the theme's duration and easing tokens, and how FR13's rule against component-owned media queries applies to the inline (pointer: coarse) arms. Independently of that decision:
- Please land the stacked predecessors first and rebase, so this pull request is its own 687-line commit rather than 13,623 authored lines.
- Please take the new
pr-interactionCI job out with the harness and either fold it into an existing surface owner or admit it through an AST-030 amendment, since FR11 forbids a separately routed lane for new coverage.
[Automated review]
| // Under a finger the mark changes in the frame the selection lands, as | ||
| // iOS's selection marks do (motion/uikit/selection.ts); a mouse keeps | ||
| // the theme's duration. | ||
| '@media (pointer: coarse)': MARK_CHANGE, |
There was a problem hiding this comment.
This arm is the primary change, and its only authority is the draft spec:AST-094 added in this pull request (FR4 narrows architecture:theme-tokens, pending owner review). Note too that the proposed FR13 says a component must not write its own media query for its touch presentation, which this inline (pointer: coarse) arm (here and in RadioIndicator.tsx) would contradict once AST-094 is approved as written.
| if git fetch --quiet --no-tags --depth=1 origin "$BASE_SHA" \ | ||
| && git show "$BASE_SHA:.github/scripts/pr-scope-touches.sh" > "$helper"; then | ||
| scope=0 | ||
| bash "$helper" "$BASE_SHA" '^(internal/interaction-harness/|playwright\.interaction\.config\.ts$|packages/[^/]+/src/|apps/storybook/)' || scope=$? |
There was a problem hiding this comment.
This job routes itself with its own path pattern over packages/[^/]+/src/ and apps/storybook/. spec:AST-030 FR11 says new coverage inside an existing surface must join that surface's owners and must not create a separately routed lane, and FR10 says a new test type is not a new surface. Fold these proofs into an existing owner, or admit the lane with an AST-030 amendment first.
| where a switch outside any scroll view is needed. | ||
|
|
||
| Done (iOS 26.2 simulator, Oct 23 2026; in the switch's own table, | ||
| `uikit/switch.ts`): M-SW02, M-SW03, M-SW04, M-SW05, M-SW06, M-SW09 (UISwitch |
There was a problem hiding this comment.
uikit/switch.ts (and uikit/contextMenu.ts further down) do not exist at this head, and scroll.ts, springs.ts and timing.ts cite a sources.test.ts that is really uikit/uikit.test.ts. Point these notes at files that exist, or drop them until those tables land.
40d3a28 to
ecdce12
Compare
|
Posted by Cindy's agent on her behalf. Parts of this PR re-implement behavior that already exists, or is being specified, as a shared part of core. Converging keeps one implementation per behavior:
This is about where the behavior lives, not about the PR's intent. |
|
Agreed: one implementation.
|
ecdce12 to
33c5a7d
Compare
33c5a7d to
9c8c5e6
Compare
|
Pushed in 9c8c5e6: the marks' touch and Reduce Motion arms now import the shared keys ( |
9c8c5e6 to
b5999ef
Compare
…s, and the action-group tracker writes its own The header and writePress called it the one writer of the press attribute, but main's action-group tracker writes its groups' presses itself. They now say what holds, as meta#8076's gestures README does.
…he press attribute The release note said every press painter writes data-astryx-press through one internal writer, but the action-group tracker (hooks/actionGroupTracker.ts) writes its groups' presses itself, as the gestures README and utils/pressFeedback.ts already say. The note now says paintPress writes every press it tracks and the action-group tracker writes its own.
…llowance under every primary pointer The useMenuPress record's FR9 puts the trigger's held finger under spec:AST-094 FR29 under every primary pointer (FR43), so a finger on a touchscreen laptop may drift 13 pt before the open, as on a phone. The trigger read (pointer: coarse) as its press started and took the long press's 10 px where the pointer was fine. Three cases fail until it does not: a 12 pt drift opens under a fine pointer too, a (12, 12) settle opens there, and nothing reads a pointer query, the trigger's press included.
…lowance under every primary pointer The useMenuPress record's FR9 governs the trigger's held finger by spec:AST-094 FR29 under every primary pointer (FR43). The trigger now hands the long press FR29's 13 px drift allowance whatever the primary pointer, so it no longer reads (pointer: coarse) as its press starts, and the menus drop their coarsePointer import. ContextMenu keeps the long press's own allowable movement. The changeset says the same.
Strict ESLint reported six unused bindings in files this pull request carries: the host's HAPTIC_SWITCH_ATTRIBUTE import, two unused imports in the pan's tests (scrollProbe, ScreenEdgePanGestureRecognizer), the swipe test's drift, the presented-hit-testing test's gestures, and a GestureHost test's before, which now asserts what it was read for: a second finger's moves leave the pan where it was.
…eal angular speed The release velocity of a rotation whose listener sets rotation = 0 on each change, at 2 degrees every 16 ms, read 4.363 rad/s against the 2.182 rad/s of the same stream without a re-base: the test asserted only more than 1.5. It now asserts the 2.18 rad/s (spec:AST-100 FR2), and fails.
The rotation's velocity tracker samples the raw unwrapped angle, which setting rotation does not move, so the setter's shift of the samples read each re-base as extra turn and doubled the release velocity of a listener that re-bases on every change. The setter no longer touches the tracker.
…mates while it runs The proof read the element's animations 230 ms in, after the dip had ended, and asserted only that every animated key is opacity, which an empty list passes: with the cross-fade removed from the plan (the move still landing), the proof still passed. It now reads the keyframe keys right after the call starts and asserts they include opacity and nothing else; the same mutant fails it. Chromium and WebKit pass. (F1's in-flight read from c648034.)
…roller, and its claimed moves are cancelled under pointer events Two comparisons stop at the shadow boundary, each failing a case: - once the host's listener on a recognizer's inner node has seen the finger, isFingerDownIn reads it as outside a light-DOM scroller around that root, so a scroll under it is not the finger's (FR20); - under inputMode 'pointer-events', a claimed pan on a shadow host cancels none of its finger's moves over the inner content, since the finger's target is the inner node and its touches reach the host retargeted (FR19).
…the flat tree isFingerDownIn and the pointer-events finger match compare with containsAlongFlatTree, as the scroll watch already does: a finger on content inside an open shadow root is down in the scroller around that root, and its touches, retargeted to the shadow host, match its pointer finger, so a claimed pan cancels its moves there (spec:AST-094 FR19, FR20).
…achments asks, and only then The host let the last attachment decide whether an element is an action group (useGestureRecognizer always passes the option), and never recomputed it at a detach: a plain attachment after the group's turned the group off, and a group's attachment released left a recognizer that never asked taking presses under a fine pointer. Fails until the host counts the attachments that ask.
…ents asks The host counts the attachments that pass actionGroup: true and keeps the element a group while one remains, recomputed at each detach. An attachment that passes false, as useGestureRecognizer does by default, no longer turns a group off, and a group's last asking attachment taking its leave ends the group.
… that content The presented hit test takes the document's elementFromPoint, which answers a shadow host for anything inside its open root, and compares with Node.contains, which stops at the boundary: a recognizer on a control inside a moving sheet's shadow root gets no finger, and the tap's click goes to the host. Fails until the hit test descends into open roots and compares along the flat tree.
Where a moving element is drawn away from its layout box, the host hit-tests what is drawn under the finger with the document's elementFromPoint, which answers a shadow host for anything inside its open root. The hit test now descends through each open root's own elementFromPoint and compares with the movers along the flat tree, so a recognizer on a control inside a moving sheet's shadow root gets its finger and the tap clicks that control.
…nt lets go The host's touch-action rules sit in an adopted sheet or a style element per document or shadow root, and were never removed, so a page whose last recognizer detached kept them, against spec:AST-094 FR24 (nothing touch-related remains after the last instance unmounts). Fails until a root's rules go with its last marked element.
…th its last marked element The touch-action writer records which elements it marked in each document or shadow root, and when the last one is unmarked (its last recognizer detached) it removes that root's adopted sheet or style element, so nothing touch-related remains after the last instance unmounts (spec:AST-094 FR24). A later mark writes the rules again; an element marked in another root first lets go of the old one.
… the inline style it reads - The motion registry, the host's engine gate and the README name the presented hit test as an engine workaround (spec:AST-013 FR6) with its review condition (re-measure on each iOS release; remove it once iOS WebKit hit-tests a compositor-moved element where it is drawn) and its regression fixture. - While a curve runs the animator holds the value it starts from inline, so presentation.ts and the README no longer say the inline style holds the end.
…core/internal/touch Core ships the internal entry @astryxdesign/core/internal/touch, which re-exports the gesture primitives for Astryx's own packages, and the Lab-import guard fails a Lab import of core outside core's exports (architecture:react-component-runtime INV13). The README and the barrel's header named internal workspace imports and said nothing here is exported; they now name that entry.
…ill needs the element, and the listeners that cancel The release note, the stream's header, the host's comment and the README said the stream is one passive listener per event type and that a document-capture stopPropagation no longer starves the recognizers. Such a stop never hid a listener on the same node, and some subscriptions cancel. They now say what changed: an app's window-capture stopPropagation, or a document-capture stopImmediatePropagation registered before core, no longer hides a touch; a recognizer that must claim still needs the touch to reach its element; the gesture host's touchend, click and contextmenu cancel while a claimer is attached and the page hold's touchmove while it holds; and the stream stays ahead of an app's window-capture listener only until a type's listener is re-added. The README's list of blocking touchmove listeners gains the claimed touch's target and the document while a claiming element moves.
…default it moves
The {stylexOptions} form of astryxStylex now passes StyleX
treeshakeCompensation: true unless the caller sets it. spec:AST-017 FR3
asks the release note to name the old and new default and the option
that restores the old one; it now does.
…er and for the two stops the input stream fixes - A still finger with sub-pixel jitter over a scroll view keeps its tap and scrolls nothing (spec:AST-094 FR18–FR22). - A tap is still recognized under an app's window-capture stopPropagation, and under a document-capture stopImmediatePropagation registered before core's: the recognizers hear touches on the window's capture phase. Chromium and WebKit pass.
…s once Where nothing that claims is attached, the host's touchend listener is passive and cannot cancel the engine's own click after a retargeted tap clicks what is drawn. The shared click guard swallows that late click whatever is attached; this case pins it, as asked on meta#8293.
This pull request sat on meta#8073's old head and carried old copies of the harness meta#8045 and meta#8046 landed on main. meta#8360 carries that foundation with main's harness, so after the merge this pull request's own diff is its three commits (the touch style keys, internal, and the press paint's priority over the coarse-pointer :active reset). The merge is clean.
The touch keys are internal, and core spells these conditions as literal keys wherever a style needs them. The stylex file's header called it the one place core spells them and cited spec:AST-012 FR2, and a test title said "for other packages": the header now names the keys as the reference spellings each literal is pinned to (spec:AST-094 FR13, spec:AST-012 FR9), and the test holds the same keys the resolver defines.
…r, not the devices A changeset tells consumers what changes, so it names the condition (a coarse primary pointer) and no longer claims "every touch device"; the simulator and emulator evidence stays in the pull request's description.
There was a problem hiding this comment.
Approval waits on an engineering owner providing or identifying the governing spec for the one-frame checkbox and radio change under a coarse pointer: spec:AST-094 leaves which components get a touch presentation to each component's own record, which neither indicator has as current authority, and its FR4 asks for a motion role where the marks play a 0 ms table constant. An engineering owner records that decision by commenting /approve-spec <full head SHA> on this pull request (the author may do so, as an engineering owner), or asks for the marks to keep --duration-fast under touch until their record names the presentation and the value is a motion role. Whatever is decided, please land #8076, #8331 and the #8360 stack first, or drop them from this branch, and rebase: they are 27,521 of the 28,369 changed lines, beside the 848-line selection-mark change.
[Automated review]
| // immediate (design:reduced-motion DR3); a finger's already is. | ||
| // The resolver's and the policy's keys, spelled: an imported at-rule | ||
| // key lands in a different StyleX priority layer than a literal one. | ||
| '@media (pointer: coarse)': MARK_CHANGE, |
There was a problem hiding this comment.
This 0 ms arm is the decision the review waits on: spec:AST-094 leaves which components get a touch presentation to each component's own record (component:CheckboxIndicator is draft and silent on touch; RadioIndicator has none), and its FR4 asks for a motion role where this plays the selectionMotionConsts mirror of selection.mark.changeMs. An engineering owner records it with /approve-spec <full head SHA>; RadioIndicator.tsx:52 carries the same arm.
Depends on #8331 and #8076. Review only this PR's change: vjeux/astryx@fa11e53...bf74a5b
User need
On a phone, a tapped checkbox or radio fades between its colors over 125 ms, so the first frames show a pale gray box or two half-filled radios. UIKit changes a selection mark in the frame the selection lands. Under a finger, on every touch device, Astryx's marks now do too.
Problem and solution fit
Under a coarse primary pointer (the touch resolver's query, spelled as
touchKeys.touch) the transition takes the UIKit table'sselection.mark.changeMs(0). A mouse keeps the theme's fade, and under Reduce Motion a mouse's change is immediate (the policy's instant key, spelled asreducedMotionKeys.instant).Current specification
spec:AST-094FR1, FR2, FR13, FR24: measured values, the same on every touch platform, keyed on a coarse pointer, nothing changed under a mouse. Pending owner review: FR4 (DEC-3) makes every touch duration a theme role; its table has no role for a mark's one-frame change yet, so the mark reads the table's build-time mirror.design:reduced-motion(current) DR2, DR3.motion/uikit/selection.ts, new): Settings' checkmark, Reminders' circle and a list's multiselect accessory change in one frame.Public delta and caller burden
selectioninmotion/uikit(not exported from the package entry point).analyze-pr.js).Design and alternatives
Evidence
iOS 26.2 Mobile Safari (the magenta ring is the finger) and Android 15 Chromium 158 (the dot is the finger). Before is main:
Scope
Testing
CI=true pnpm lint0 errors;pnpm buildthen rootpnpm typecheckclean; the full core suite (16 workers) passes with no failure in both; SelectionMarks passes in Chromium and WebKit and TabPressPointer in Chromium; a mouse click still selects a card. The node project's only reds are main's:story-tree.test.ts(main's A11y story titles, fixed in test(storybook): run the story-tree check where Storybook is built, and bring the tree back to its shape #8509) andcache.test.mjs's two npm-lock cases (a Node started under another file name, fixed in fix(cli): a crashed run's release install is recognized by the Node it ran on, whatever its name #8520).CI=true pnpm lint0 errors;pnpm buildthen rootpnpm typecheckclean; SelectionMarks Chromium and WebKit 7/7 each; TabPressPointer passes; units 16,080 (test(Item): wait for the swipe layer's module, not a one-second window #8352's swipe warm-up and the Table render budgets timed out on a box at load 40 withoutCI=true, which gives those wall-clock budgets CI's 1.5× multiplier; both pass alone); a mouse click still selects a card.MultiSelectorbottom-sheet test timed out on a loaded box: its lazy BottomSheet's first load outlasts the 1 s query, which test(Selector, MultiSelector): wait for the on-demand sheet module before the first open #8642 preloads; it passes alone and in its file); SelectionMarks Chromium and WebKit 7/7 each; TabPressPointer passes;lab-core-importspasses;pnpm buildthen rootpnpm typecheckclean;CI=true pnpm lint0 errors.lab-core-importspasses;pnpm buildthen rootpnpm typecheckclean;CI=true pnpm lint0 errors.pnpm buildthen rootpnpm typecheckclean;CI=true pnpm lint0 errors.pnpm vitest runIndicator, motion, touchPresentation: pass, including the policy tests that hold each literal key totouchKeysandreducedMotionKeys.selectionMotion.test.tschecks that the mirror equals the table, that both marks take 0 ms on the coarse-pointer key with no platform gate, that a mouse keepsvar(--duration-fast), and that a mouse under Reduce Motion takes0sin the policy's instant key.pnpm test:interaction SelectionMarks, Chromium and WebKit (the official Playwright image), 7/7 each: under a finger a checkbox tap creates no transition and its first computed color is final; both radios change at once; Reduce Motion keeps the one-frame change; a storyboard shows no blended frame; a blocked main thread still shows the whole mark; the mouse keeps the fade; a mouse under Reduce Motion changes at once.