Repository navigation
chore(motion): ContextMenu's touch timeline and press curve, measured on iOS 26.2 #8065
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from 70 commits
1f79091
c0aea9b
a38d13c
57f26e8
c2e257b
905042e
d778f5b
c19d340
4155755
5b7d1eb
29578a0
0a5b023
eca0738
a261384
95daacd
dd0cbfe
a5725fa
bbec914
732a52d
9969467
6daf622
de1a946
10ba166
c4bc6f8
e71ad6a
acbf411
a1813b9
61e891d
1b0840d
ff2816f
c635439
ab26ff4
c34bf73
1c0162b
92bc9c2
8a8ac32
5e41033
7ee6305
66d1919
225e202
63c3eb8
8c0dbf1
bfcb164
d5ae22d
475b34e
66edc03
a2ac6f9
d019124
f05cb57
0e62702
b61f1ff
1e242be
9d39d7d
ab1afb2
4adaf8b
ab02b27
4874db4
8c8d6f5
3d201a0
f581948
8cd46df
54561a1
1e1b7bd
efdffbe
c833823
89614c7
bd9246d
5d9e4ec
7b26ef2
b61b264
4051fac
370c4d9
15c71e1
2bcd5b2
3c0d8a0
e8b0bb6
2c57208
1e5d0f4
16d3f24
4eac57c
347f0ac
b600a78
772a4b5
7d946d2
ee34b25
355a456
c4412ab
effe685
66232e6
0d1a829
571f088
4c41132
9320644
7ad0455
156e4b3
f60e87d
6eb2193
86ac77d
9d5c20a
b4234d7
cb907b7
462d82c
8fc7f2e
0543b78
79dc151
1fde85a
a4b10f9
1fe597d
b33685a
fa62e29
2cb04fe
803e6d6
fa8c8e2
1ffb20e
a9be409
c2bc85e
c97ab3d
c84803b
84ea877
3cb158a
f0819b9
f9f1162
dcfecc9
2267ee5
b84bcfc
648f355
c494681
1346af4
02ff48f
7847980
c4d1994
374ab86
528dd2d
e05cdd1
b814769
b3f68de
f866874
3190b1a
d1b07a4
51688cd
274ee1b
2f3d6ef
bb79455
23e9ead
93c611d
79aa498
63218c8
0400cb2
be661e2
7f36229
72c25bd
3153b09
5ad1170
49460a6
1a40c3a
f4e8812
835e4e4
38ea7d9
215f031
da5dcb2
47a30b0
7f0f5c4
5712c49
4045092
6762cc5
03058f6
bf5950f
d12ed28
61de06c
c1c46dc
ddf0e3a
f33aea7
357a725
92d6477
6c53298
1ca0138
45a454b
c6f0678
ed4a046
3e3c4e7
a7ffe6e
36abaa1
2931530
b4e0adb
2b264d3
13eceed
212dbb1
ecb9f20
62ecda1
66c651f
5613501
a149b9c
852d55c
4099d7e
6ccd5b4
40c6be3
87e516b
572825b
4c3df94
c8d86ff
bce5d90
7613c98
f79b8a9
a1e7176
ff365ff
97436b2
c27baac
bac4669
f1c5125
bd50829
f405e7f
702529b
fda011c
8715133
15e8c24
bc90acb
7aba599
9f6748f
a103c43
4012259
2a6b934
9f65026
2ec969c
1ddea08
213e86e
6ef5186
70c70e4
6f4173c
915f9d9
d2c3c78
266fa0a
25b468c
182ef2e
793c8db
b9c3b0b
27eeeb8
bec2283
a3e07d8
9adbe2d
cba0ad9
3bfd7c3
1aade8a
3d85c30
9d0f6f2
11dbebf
d9a1e1a
e6ab0b9
3fb31dd
5791389
db7e625
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/build': patch | ||
| --- | ||
|
|
||
| [fix] `astryxStylex` resolves `defineConsts` values read from another file. With the `{stylexOptions}` form (the one Storybook uses), a file that read only constants from a `.stylex.ts` module lost that import once StyleX compiled it, so the constants never reached the CSS: a constant used as a media-query key failed the build ("Invalid empty selector") and one used as a value shipped as a custom property nothing declares. A constant defined on the library side of the layer split and read on the product side stayed unresolved in either form. A production build now also warns, naming the variable and the rule that reads it, when its stylesheet reads a StyleX-generated custom property that nothing declares; set `undefinedVariables: 'error'` to fail the build instead. | ||
|
|
||
| @vjeux | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| '@astryxdesign/cli': patch | ||
| --- | ||
|
|
||
| [chore] The UIKit constants table gains ContextMenu's touch timeline as measured on iOS 26.2: the press feedback starts at 150 ms, the press commits at 400 ms, and the menu displays at 735 ms. It also records the drift tolerance, and the press feedback's growth, spring and display latency. A closed-form press-feedback curve, checked against UIKit's per-frame presentation, comes with them. No component uses them yet. The feedback's spring and display latencies are motion roles a theme can retune, and `astryx docs motion` lists them. The onset, the commit and the menu's moment decide when a press counts and who gets the touch, so they stay out of the theme. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] Touch-action derivation, the native scroll probe and haptics for the gesture system. Not exported from the package root; touch presentations reach them through the experimental subpaths (see their entry). No component uses them yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] The gesture system's DOM host (claims, click suppression, the browser's takeover, the pointer behind a contact). Not exported from the package root; touch presentations reach it through the experimental subpaths (see their entry). No component uses it yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] The pan gesture recognizer, with UIKit's measured hysteresis and velocity filter. Not exported from the package root; touch presentations reach it through the experimental subpaths (see their entry). No component uses it yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] UIControl press tracking with control and cell profiles, the shared press paint, delegated press tracking and the gesture hooks. Not exported from the package root; touch presentations reach them through the experimental subpaths (see their entry). No component uses them yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] The gesture system's README for component authors, with its browser proof in Chromium and WebKit. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] The gesture recognizer core for touch presentations: UIKit's recognizer state machine and the arena that settles which recognizer owns a touch. Not exported from the package root; touch presentations reach it through the experimental subpaths (see their entry). No component uses it yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] Swipe, pinch, rotation, screen-edge pan and hover gesture recognizers. Not exported from the package root; touch presentations reach them through the experimental subpaths (see their entry). No component uses them yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] Tap and long-press gesture recognizers with UIKit's measured thresholds. Not exported from the package root; touch presentations reach them through the experimental subpaths (see their entry). No component uses them yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [fix] The experimental touch animator follows design:reduced-motion. Under Reduce Motion every `animate` and `play` (travel or opacity, on a spring or any curve) becomes an opacity-only cross-fade of 200 ms on a coarse primary pointer, or for a call marked `touchRelease`, and completes at once on any other pointer; nothing moves, scales or springs, and travel lands with a plain style write while the element is transparent, never as an animated transform. `timing.reducedMotionCrossFadeMs` is now 200 ms and is no longer a theme role. The `reducedMotion` and `crossfade` call options are removed; `crossfadeAs` stays. `animator.reducedMotion()` reports the mode for feedback with no fade of its own, `reducedMotionFade()` gives the same fade to code beside the animator, and `reducedMotion.stylex.ts` holds its constants for StyleX transitions. | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. At this head the animator is internal and has never been released or marked experimental, so this |
||
|
|
||
| @vjeux | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [experimental] Two experimental subpaths for building touch presentations, outside the stable compatibility promise (they may change or be removed in a patch release). `@astryxdesign/core/motion/experimental` exports the compositor animator (`createAnimator`, `useAnimator`), UIKit's spring, rubber-band and cubic-bézier math, `resolveMotion` (a motion role's value under the element's theme), and the UIKit constants table as the read-only `uikit` namespace. `@astryxdesign/core/gestures/experimental` exports UIKit-style gesture recognizers (tap, long press, pan, screen-edge pan, swipe, pinch, rotation, hover), `useGestureRecognizer`, `usePressTracker`, `useTouchPresentation`, `readTouchPresentation`, `playHaptic` and `attachTapHaptic`, with the `GestureArena` and `VelocityStrategy` types their options reach. Nothing is added to the package root or to any other subpath. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,8 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| '@astryxdesign/cli': patch | ||
| --- | ||
|
|
||
| [feat] Themes can retune touch motion roles. `defineTheme({motion})` takes `springs`, `durations` and `curves` keyed by motion role, the table path of a measured touch motion value (`springs.sheetPresent`, `navigation.transitionMs`), at the root or in an adaptation rule, and writes one `--motion-*` variable per role it sets. A role the theme leaves out keeps its measured default, an unknown role id is refused, and the duration scale (`fast`, `medium`, `ratio`) is optional when a theme sets only roles. No shipped component reads the roles yet. `astryx docs motion` lists every motion role with its CSS variable and default, and the theme authoring guide and template describe the new fields. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [feat] `presentation="adaptive"` on DropdownMenu, ContextMenu, MoreMenu, Selector and MultiSelector, and a DropdownMenu's default sub-menu drill-in, now use the theme's compact definition with a coarse primary pointer: a viewport narrower than the theme's `md` point (768px by default) or shorter than 500px. This is a behavior change. The old default was a bottom sheet at 768px wide and below on a coarse pointer. Now a coarse-pointer screen exactly 768px wide keeps the anchored popover, and a phone in landscape (wider than 768px but shorter than 500px) gets the bottom sheet and the drilled-in sub-menu. To pin a component's presentation regardless of the rule, pass `presentation="popover"` or `presentation="bottom-sheet"`. Mouse and keyboard users on desktop see no change, because every case requires a coarse pointer. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] The UIKit constants table for touch presentations (springs, scroll physics, timing curves and navigation values), each value with its source and a checked list of the simulator measurements still owed. Not exported from the package entry point; no component reads it yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] The touch presentations' animator plays any closed-form curve (such as a spring chasing a moving target), drives a pseudo-element such as a dialog's ::backdrop, fades on a presentation's own spring under Reduce Motion (with an entrance or exit role for a slide that changes no opacity), and starts a call from rest when the browser commits it, as Core Animation does. Not exported from the package root; touch presentations reach it through the experimental subpaths (see their entry). | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] A compositor animator for touch presentations. It plays UIKit's springs, scroll coasts and any closed-form curve as Web Animations on translate, rotate, scale and opacity, so they keep running while JavaScript is busy, and reads values and velocities back from the curves for interruption, retargeting and Reduce Motion cross-fades. Not exported from the package root; touch presentations reach it through the experimental subpaths (see their entry). No component uses it yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] The spring, decay, rubber-band and projection math of UIKit for touch presentations, as pure functions checked against an independent integration and against values read from UIKit. Not exported from the package root; touch presentations reach it through the experimental subpaths (see their entry). No component uses it yet. | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,7 @@ | ||
| --- | ||
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] UseAnimator, a React wrapper around the touch presentations' animator that never re-renders per frame, and browser proofs on the interaction harness that the animator's motion keeps running through a blocked main thread in Chromium and WebKit. Not exported from the package root; touch presentations reach it through the experimental subpaths (see their entry). | ||
|
|
||
| @vjeux |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -1270,6 +1270,12 @@ jobs: | |
| if: needs.check-scope.outputs.docsite_only != 'true' && needs.check-scope.outputs.spec_only != 'true' && needs.check-scope.outputs.tooling_only != 'true' | ||
| run: pnpm -F @astryxdesign/native typecheck:types | ||
|
|
||
| # The interaction harness is consumed as TypeScript source by Vitest and | ||
| # Playwright, which do not typecheck; this is the only gate over it. | ||
| - name: Typecheck interaction harness | ||
| if: needs.check-scope.outputs.docsite_only != 'true' && needs.check-scope.outputs.spec_only != 'true' && needs.check-scope.outputs.tooling_only != 'true' | ||
| run: pnpm -F @astryxdesign/interaction-harness typecheck | ||
|
|
||
| # Sandbox preview build — the single slowest piece of PR CI (~4min), run as | ||
| # its own job so it overlaps build-storybook instead of serializing after it. | ||
| # PR-only: merge_group runs never deploy previews, and docsite-only PRs skip | ||
|
|
@@ -3803,6 +3809,88 @@ jobs: | |
| retention-days: 30 | ||
| delete-merged: true | ||
|
|
||
| # Touch interaction and animation proofs: the harness in | ||
| # internal/interaction-harness and every *.interaction.browser.spec.ts. | ||
| # Real touch input, composited frames, rendering traces and presented | ||
| # animation values only exist in a real engine, and the specs read stories | ||
| # from this PR's own Storybook build. The harness's self-test runs with | ||
| # them, so a change to an instrument is proven by its negative controls | ||
| # before a component spec relies on it. Chromium only on these runners; | ||
| # see the harness README for running WebKit. | ||
| pr-interaction: | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This job routes itself (its own path list includes
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This job decides its own scope from its own path list (line 3850 includes |
||
| needs: [check-scope, build-storybook] | ||
| if: github.event_name == 'pull_request' && needs.check-scope.outputs.docsite_only != 'true' && needs.check-scope.outputs.spec_only != 'true' && needs.check-scope.outputs.tooling_only != 'true' | ||
| # Frame evidence measures timing: four cores, one Playwright worker. | ||
| runs-on: 4-core-ubuntu | ||
| permissions: | ||
| contents: read | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v7 | ||
| with: | ||
| ref: ${{ github.event.pull_request.head.sha }} | ||
|
|
||
| - name: Verify evidence checkout | ||
| env: | ||
| EXPECTED_HEAD_SHA: ${{ github.event.pull_request.head.sha }} | ||
| run: test "$(git rev-parse HEAD)" = "$EXPECTED_HEAD_SHA" | ||
|
|
||
| # The helper comes from the base, since an older PR head lacks it. | ||
| # Exit 1 means out of scope; 0 in scope; 2 unknown, so run. | ||
| - name: Check interaction scope | ||
| id: scope | ||
| env: | ||
| BASE_SHA: ${{ github.event.pull_request.base.sha }} | ||
| run: | | ||
| scope=2 | ||
| helper="$(mktemp)" | ||
| 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=$? | ||
| fi | ||
| if [ "$scope" = 1 ]; then | ||
| echo "Neither the interaction harness nor a component changed; skipping the interaction proofs." | ||
| echo 'run=false' >> "$GITHUB_OUTPUT" | ||
| else | ||
| echo 'run=true' >> "$GITHUB_OUTPUT" | ||
| fi | ||
|
|
||
| - name: Setup Node and pnpm | ||
| if: steps.scope.outputs.run == 'true' | ||
| uses: ./.github/actions/setup | ||
| with: | ||
| install: 'false' | ||
|
|
||
| - name: Download Storybook artifact | ||
| if: steps.scope.outputs.run == 'true' | ||
| uses: actions/download-artifact@v8 | ||
| with: | ||
| name: storybook-${{ needs.build-storybook.outputs.short_hash }} | ||
| path: apps/storybook/dist | ||
|
|
||
| - name: Install Playwright | ||
| if: steps.scope.outputs.run == 'true' | ||
| run: pnpm install --frozen-lockfile && npx playwright install chromium | ||
|
|
||
| - name: Run interaction proofs | ||
| if: steps.scope.outputs.run == 'true' | ||
| run: | | ||
| pnpm exec playwright test \ | ||
| --config playwright.interaction.config.ts \ | ||
| --project chromium \ | ||
| --output interaction-proof-output | ||
|
|
||
| # Storyboards (PNG contact sheets) and curve traces, for review. | ||
| - name: Upload interaction evidence | ||
| if: always() && steps.scope.outputs.run == 'true' | ||
| uses: actions/upload-artifact@v7 | ||
| with: | ||
| name: interaction-evidence | ||
| path: test-results/interaction-evidence | ||
| if-no-files-found: ignore | ||
| retention-days: 7 | ||
|
|
||
| # Build package test owner. The plugin's production CSS partition is a Build | ||
| # integration contract: source inspection cannot prove which declaration | ||
| # paints after Vite emits the final bundle. The `test-build` name makes that | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Besides the
defineConstsfix, this adds theundefinedVariablesoption, a warning every production build now runs, and theundefinedGeneratedVariablesexport.spec:AST-017FR7 puts compatible capabilities under[feat], so the option and the warning would read correctly as their own[feat]changeset.