Repository navigation
chore(core): the motion and gesture internals that Lab's refresh pull reads - #9807
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
PR Analysis Report🔎 Preview ·
|
There was a problem hiding this comment.
Changes requested for one fix in the table-imports guard. The internal-entry re-exports, the refreshControl table and the new catalog key match the current specs.
isInternalEntryinpackages/core/src/motion/uikit/tableImports.test.ts(lines 60–62) exempts every.tsfile underinternal/, includingindicatorPress.stylex.ts,sheetDraft.tsanduseDismissSearchOnTouchDrag.ts, whichCheckboxInput,TokenizerBottomSheetandPowerSearchBottomSheetimport; please exempt only internal files no Core source imports (orinternal/touch.tsalone) and correct the JSDoc that says no Core source imports one.
Optional: the comment at internal/touch.ts:45 can drop its first sentence, which restates the export list (suggestion inline). When RefreshControl leaves Lab, its springs, reveal curve and durations will need motion roles under the touch-presentations spec (FR4).
[Automated review]
0ddf2dc to
d4832f8
Compare
There was a problem hiding this comment.
Ready to approve. The internal-entry re-exports, the refreshControl table and the new catalog key match the current specs, and the table-imports guard now exempts only internal files no Core source imports, which resolves the earlier comment on isInternalEntry.
- Optional: the
internal/touch.tsheader is now 21 lines, and its@outputstill describes only the gesture core's primitives; moving the new@inputtext into@outputkeeps it accurate (suggestion inline). - When RefreshControl leaves Lab, its springs, reveal curve and durations need motion roles named in its component record (touch-presentations FR4).
[Automated review]
| * @input The gesture core: the arena, the recognizers, and their geometry; | ||
| * the motion math and UIKit tables that Lab's RefreshControl reads; the | ||
| * page's scroll-style claims | ||
| * @output `@astryxdesign/core/internal/touch`: the gesture core's primitives |
There was a problem hiding this comment.
Optional (comment style): @output still describes only the gesture core's primitives, while the entry now also serves the motion math, UIKit tables, touch presentation hook and scroll-style claims, and the header is now 21 lines. Moving the new @input text here and keeping @input to what the file reads keeps the header accurate and shorter.
d4832f8 to
8537352
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The pull request is a draft from a fork, so once it is marked ready for review, a maintainer adds the ci:run label so CI runs.
The internal-entry re-exports, the refreshControl table and the new catalog key match the current specs, and the table-imports guard exempts only internal files that no Core source imports.
- Optional: the
internal/touch.tsheader is 21 lines, and its@outputstill describes only the gesture core's primitives; moving the new@inputtext into@outputkeeps it accurate (see the earlier inline suggestion). - When RefreshControl leaves Lab, its springs, reveal curve and durations need motion roles named in its component record (touch-presentations FR4).
[Automated review]
8537352 to
01db4bf
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The pull request is a draft from a fork, so once it is marked ready for review, a maintainer adds the ci:run label so CI runs.
The internal-entry re-exports (now including startsOnSelectableText), the refreshControl table and the new catalog key match the current specs, and the table-imports guard exempts only internal files that no Core source imports.
- Optional: the
internal/touch.tsheader is 21 lines, and its@outputstill describes only the gesture core's primitives; moving the new@inputtext into@outputkeeps it accurate (see the earlier inline suggestion). - When RefreshControl leaves Lab, its springs, reveal curve and durations need motion roles named in its component record (touch-presentations FR4).
[Automated review]
01db4bf to
5a45b8d
Compare
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. The pull request is a draft from a fork, so once it is marked ready for review, a maintainer adds the ci:run label so CI runs.
The internal-entry re-exports (now including lockDragSelection and selectionRangesOf), the refreshControl table and the new catalog key match the current specs, and the table-imports guard exempts only internal files that no Core source imports.
- Optional: the
internal/touch.tsheader is 22 lines, and its@outputstill describes only the gesture core's primitives; moving the new@inputtext into@outputkeeps it accurate (see the earlier inline suggestion). - When RefreshControl leaves Lab, its springs, reveal curve and durations need motion roles named in its component record (touch-presentations FR4).
[Automated review]
5a45b8d to
4a3074b
Compare
|
/approve-spec 4a3074b |
There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. This is a draft from a fork, so a maintainer adds the ci:run label, and marking it ready for review then starts CI.
The new names on Core's internal touch entry match the current specs for internal subpaths, and the new tests show that none of them reaches the public entry.
- Optional: two comments in
packages/core/src/internal/touch.ts(lines 45–47 and 56–57) restate the exports or a name, and the header's@outputstill describes only the gesture core's primitives; suggestions are inline.
[Automated review]
| // Lab's useRefreshControl reads these: its pull's pan and the hook that | ||
| // starts it. It also reads the motion animator, math and UIKit tables of its | ||
| // pull, settle and end. |
There was a problem hiding this comment.
Optional (comment style): after the colon, the comment lists the exports below it again. A version that keeps only the reason:
// Lab's useRefreshControl reads these.| // The animator's internal factory. The public one, `createAnimator`, plays | ||
| // only the theme's state-change motion. |
There was a problem hiding this comment.
Miss: optional (comment style): "The animator's internal factory." restates the name createMotionAnimator. A version that keeps only the reason:
// The public `createAnimator` plays only the theme's state-change motion.There was a problem hiding this comment.
Approved pending CI: CI has not run on this head yet. This is a draft from a fork, so a maintainer adds the ci:run label so CI runs; marking it ready for review then starts the run.
The new names on Core's internal touch entry, including the two motion-role parsers, match the current specs for internal subpaths, and the new tests show that none of them reaches the public entry.
- Optional: in
packages/core/src/internal/touch.ts, the comments at lines 45–48 and 57–58 restate the exports or a name, and the header's@outputstill describes only the gesture core's primitives.
[Automated review]
| // Lab's useRefreshControl reads these: its pull's pan and the hook that | ||
| // starts it. It also reads the motion animator and math, and the scroll | ||
| // view's bounce spring, for its pull, settle and end. The motion-role | ||
| // parsers read the theme's tokens for its end. |
There was a problem hiding this comment.
Optional (comment style): after its first clause, this comment lists the exports below it again, and the new last sentence does the same for the parsers. A version that keeps only the reason:
// Lab's useRefreshControl reads these.263234f to
8db95c8
Compare
|
/approve-spec 8db95c8 |
There was a problem hiding this comment.
This pull request is reviewed as part of its stack; see the review on #9865.
8db95c8 to
bbd153f
Compare
There was a problem hiding this comment.
This pull request is reviewed as part of its stack; see the review on #9865.
|
/approve-spec bbd153f |
… reads Core's internal touch entry re-exports, by name, what Lab's useRefreshControl imports: the pan recognizer, its hook and the gesture types; the motion animator; the cubic Bézier, the rubber band with its inverse and slope, and the map of a companion curve; the UIKit scroll table; and the motion-role parsers. Each one is an existing internal, and Core's behavior does not change. A bundle test checks that the public entry exports none of them.
bbd153f to
aaeeced
Compare
|
/approve-spec aaeeced |
There was a problem hiding this comment.
This pull request is reviewed as part of its stack; see the review on #9865.
Internal entries land with their first user, per meta#8562. Lab's PageControl, NavigationStack and TabBar animate with Core's motion engine and read the touch presentation and the writing direction as Core does. `@astryxdesign/core/internal/touch`, which already carries the pan recognizer, its hook, the engine and the rubber band for Lab's refresh control (meta#9807), gains by name: - `useTouchPresentation` and `TOUCH_QUERY`, the finger-or-mouse decision in render and outside it; - `isRtlElement`, the writing direction a pan mirrors by; - UIKit's `UIKIT_GESTURES` table. The engine's factory is renamed from `createMotionAnimator` to `createMotionEngine` at its source and in every internal caller, with its types `MotionEngine` and `MotionEngineOptions` (the engine's `Animator` and `AnimatorOptions`), so the engine and the public `createAnimator` differ by more than one word (architecture:react-component-runtime INV13). Named re-exports of code already on main, plus that rename: no behavior changes, no public docs, no root re-export, and the `@astryx/no-core-internal-import` lint rule already limits the entry to Core and Lab. The entry's tests check it re-exports the same values Core imports by path and carries no public factory's name; the touch-support bundle test keeps every Lab-only name out of the root entry. One Lab module those components share comes with them: `internal/useMotionEngine`, a stable motion engine bound to an element through a callback ref. Lab's refresh control now uses it in place of its own identical `RefreshControl/useMotionAnimator.ts`.
Internal entries land with their first user, per meta#8562. Lab's PageControl, NavigationStack and TabBar animate with Core's motion engine and read the touch presentation and the writing direction as Core does. `@astryxdesign/core/internal/touch`, which already carries the pan recognizer, its hook, the engine and the rubber band for Lab's refresh control (meta#9807), gains by name: - `useTouchPresentation` and `TOUCH_QUERY`, the finger-or-mouse decision in render and outside it; - `isRtlElement`, the writing direction a pan mirrors by; - UIKit's `UIKIT_GESTURES` table. The engine's factory is renamed from `createMotionAnimator` to `createMotionEngine` at its source and in every internal caller, with its types `MotionEngine` and `MotionEngineOptions` (the engine's `Animator` and `AnimatorOptions`), so the engine and the public `createAnimator` differ by more than one word (architecture:react-component-runtime INV13). Named re-exports of code already on main, plus that rename: no behavior changes, no public docs, no root re-export, and the `@astryx/no-core-internal-import` lint rule already limits the entry to Core and Lab. The entry's tests check it re-exports the same values Core imports by path and carries no public factory's name; the touch-support bundle test keeps every Lab-only name out of the root entry. One Lab module those components share comes with them: `internal/useMotionEngine`, a stable motion engine bound to an element through a callback ref. Lab's refresh control now uses it in place of its own identical `RefreshControl/useMotionAnimator.ts`.
) * chore(lab): Lab's animator hook, over Core's internal touch entry Internal entries land with their first user, per #8562. Lab components, TabBar first, animate with Core's motion engine and read the touch presentation and the writing direction as Core does. `@astryxdesign/core/internal/touch`, which already carries the pan recognizer, its hook, the engine and the rubber band for Lab's refresh control (#9807), gains by name: - `useTouchPresentation` and `TOUCH_QUERY`, the finger-or-mouse decision in render and outside it; - `isRtlElement`, the writing direction a pan mirrors by; - UIKit's `UIKIT_GESTURES` table. The engine's factory is renamed from `createMotionAnimator` to `createMotionEngine` at its source and in every internal caller, with its types `MotionEngine` and `MotionEngineOptions` (the engine's `Animator` and `AnimatorOptions`), so the engine and the public `createAnimator` differ by more than one word (architecture:react-component-runtime INV13). Named re-exports of code already on main, plus that rename: no behavior changes, no public docs, no root re-export, and the `@astryx/no-core-internal-import` lint rule already limits the entry to Core and Lab. The entry's tests check it re-exports the same values Core imports by path and carries no public factory's name; the touch-support bundle test keeps every Lab-only name out of the root entry. One Lab module those components share comes with them: `internal/useMotionEngine`, a stable motion engine bound to an element through a callback ref. Lab's refresh control now uses it in place of its own identical `RefreshControl/useMotionAnimator.ts`. * Merge branch 'main' into c09/core-touch-entry-lab-animator Co-authored-by: Cindy Zhang <[email protected]>
…tracking hook, extended for Lab's TabBar, and a tab-bar string joins the catalog (#9699) * chore(lab): Lab's animator hook, over Core's internal touch entry Internal entries land with their first user, per #8562. Lab components, TabBar first, animate with Core's motion engine and read the touch presentation and the writing direction as Core does. `@astryxdesign/core/internal/touch`, which already carries the pan recognizer, its hook, the engine and the rubber band for Lab's refresh control (#9807), gains by name: - `useTouchPresentation` and `TOUCH_QUERY`, the finger-or-mouse decision in render and outside it; - `isRtlElement`, the writing direction a pan mirrors by; - UIKit's `UIKIT_GESTURES` table. The engine's factory is renamed from `createMotionAnimator` to `createMotionEngine` at its source and in every internal caller, with its types `MotionEngine` and `MotionEngineOptions` (the engine's `Animator` and `AnimatorOptions`), so the engine and the public `createAnimator` differ by more than one word (architecture:react-component-runtime INV13). Named re-exports of code already on main, plus that rename: no behavior changes, no public docs, no root re-export, and the `@astryx/no-core-internal-import` lint rule already limits the entry to Core and Lab. The entry's tests check it re-exports the same values Core imports by path and carries no public factory's name; the touch-support bundle test keeps every Lab-only name out of the root entry. One Lab module those components share comes with them: `internal/useMotionEngine`, a stable motion engine bound to an element through a callback ref. Lab's refresh control now uses it in place of its own identical `RefreshControl/useMotionAnimator.ts`. * chore(core): Core's internal touch entry re-exports the action-group tracking hook, extended for Lab's TabBar, and a tab-bar string joins the catalog Re-exports only on the entry: @astryxdesign/core/internal/touch adds useActionGroupTracking and its options type. So Lab's TabBar presses through the hook AlertDialog uses: a second finger ends the press with nothing acting, and focus follows the lift. The hook gains options for a group that draws its own highlight. All are optional, and without them the hook runs as before, so AlertDialog does not change. A no-paint option leaves the highlight to the group. Press callbacks report the action under the press as it begins and after each move, the lift before its action runs, and a cancel. Core's message catalog gains TabBar's badged-tab name. It lands ahead of the Lab component, so the Lab batch changes only Lab. The entry stays outside the public API: no docs, no root re-export, and the @astryx/no-core-internal-import rule keeps it to Core and Lab. * Merge branch 'main' into c09/core-touch-entry-lab-animator * Merge the updated lower stack branch into tabbar/core-touch-entry * Merge main (#9754 landed) into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.test.ts # packages/core/src/internal/touch.ts * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/hooks/useActionGroupTracking.ts * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.test.ts # packages/core/src/internal/touch.ts * Merge main into the TabBar lab entry branch (#10188 landed) * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.ts * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.test.ts # packages/core/src/internal/touch.ts * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.ts * Merge branch 'main' into tabbar/core-touch-entry * Merge main into tabbar/core-touch-entry * Merge main into tabbar/core-touch-entry Co-authored-by: Cindy Zhang <[email protected]>
… and press tracking (#9700) * chore(lab): Lab's animator hook, over Core's internal touch entry Internal entries land with their first user, per #8562. Lab components, TabBar first, animate with Core's motion engine and read the touch presentation and the writing direction as Core does. `@astryxdesign/core/internal/touch`, which already carries the pan recognizer, its hook, the engine and the rubber band for Lab's refresh control (#9807), gains by name: - `useTouchPresentation` and `TOUCH_QUERY`, the finger-or-mouse decision in render and outside it; - `isRtlElement`, the writing direction a pan mirrors by; - UIKit's `UIKIT_GESTURES` table. The engine's factory is renamed from `createMotionAnimator` to `createMotionEngine` at its source and in every internal caller, with its types `MotionEngine` and `MotionEngineOptions` (the engine's `Animator` and `AnimatorOptions`), so the engine and the public `createAnimator` differ by more than one word (architecture:react-component-runtime INV13). Named re-exports of code already on main, plus that rename: no behavior changes, no public docs, no root re-export, and the `@astryx/no-core-internal-import` lint rule already limits the entry to Core and Lab. The entry's tests check it re-exports the same values Core imports by path and carries no public factory's name; the touch-support bundle test keeps every Lab-only name out of the root entry. One Lab module those components share comes with them: `internal/useMotionEngine`, a stable motion engine bound to an element through a callback ref. Lab's refresh control now uses it in place of its own identical `RefreshControl/useMotionAnimator.ts`. * chore(core): Core's internal touch entry re-exports the action-group tracking hook, extended for Lab's TabBar, and a tab-bar string joins the catalog Re-exports only on the entry: @astryxdesign/core/internal/touch adds useActionGroupTracking and its options type. So Lab's TabBar presses through the hook AlertDialog uses: a second finger ends the press with nothing acting, and focus follows the lift. The hook gains options for a group that draws its own highlight. All are optional, and without them the hook runs as before, so AlertDialog does not change. A no-paint option leaves the highlight to the group. Press callbacks report the action under the press as it begins and after each move, the lift before its action runs, and a cancel. Core's message catalog gains TabBar's badged-tab name. It lands ahead of the Lab component, so the Lab batch changes only Lab. The entry stays outside the public API: no docs, no root re-export, and the @astryx/no-core-internal-import rule keeps it to Core and Lab. * feat(lab): TabBar, iOS 26's floating tab bar, with its selection lens and press tracking TabBar shows an app's top-level sections as iOS 26's floating capsule above the bottom edge, with a selection lens that slides to the chosen tab. Each TabBarItem has an icon, a label and an optional badge. Under a finger, on iOS and Android alike, the lens moves on the springs measured from UIKit on iOS 26.2: it lifts into glass as a finger lands, follows a finger dragged across the tabs and settles on the tab nearest the lift, while the bar flexes. A pen in the touch presentation does the same. Under a fine pointer a press is a plain button press: a click chooses a tab and the lens follows the theme's motion. Sliding off the bar cancels: a press lifted off it chooses nothing. Choosing the selected tab again is reported apart, so a screen can return to its root. Core's action-group tracking owns the press, in the touch presentation only: the tab under it, running that tab at the lift, a second finger's cancel and focus after the lift. TabBar draws the lens. With no tab selected there is no lens, so a held finger paints the tab under it. A tab names the panel it controls through panelId, rendered as aria-controls. TabBar's UIKit values live beside it in uikitTabBar.ts, each with its source, and uikitTabBar.test.ts checks that every value names one. Core's gesture and motion pieces come through Core's internal touch entry. * Merge branch 'main' into c09/core-touch-entry-lab-animator * Merge the updated lower stack branch into tabbar/core-touch-entry * Merge the updated lower stack branch into tabbar/lab-bar-lens * Merge main (#9754 landed) into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.test.ts # packages/core/src/internal/touch.ts * Merge the updated lower stack branch into tabbar/lab-bar-lens * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/hooks/useActionGroupTracking.ts * Merge the updated lower stack branch into tabbar/lab-bar-lens * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.test.ts # packages/core/src/internal/touch.ts * Merge the updated lower stack branch into tabbar/lab-bar-lens * Merge main into tabbar/lab-bar-lens # Conflicts: # packages/lab/src/index.ts * Merge main into the TabBar lab entry branch (#10188 landed) * Merge the updated lower stack branch into the TabBar branch (own diff unchanged) * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.ts * Merge the updated lower stack branch into tabbar/lab-bar-lens * fix(lab): TabBar's finger paint fades on the compositor With no tab selected, a held finger paints its tab, and the paint fades after the lift on the theme's exit duration and curve. The fade was a background-color transition, which runs on the main thread. The paint is now a layer, and only its opacity fades, so the compositor runs the fade through a main-thread block. Its timing is unchanged: at once on the touch, then the theme's exit duration and curve at the lift, within 200 ms under Reduce Motion. Also: TabBar calls itemWidthCss directly, the test-only nearestIndex is gone (the shared tracker decides the tab a lift commits), and the Reduce Motion case cites design:reduced-motion DR2. * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.test.ts # packages/core/src/internal/touch.ts * Merge the updated lower stack branch into tabbar/lab-bar-lens * Merge main into tabbar/core-touch-entry # Conflicts: # packages/core/src/internal/touch.ts * Merge the updated lower stack branch into tabbar/lab-bar-lens # Conflicts: # packages/lab/src/index.ts * Merge branch 'main' into tabbar/core-touch-entry * Merge the updated TabBar base branch (main merged) into the TabBar presentation branch * Merge main into tabbar/core-touch-entry * Merge the updated lower stack branch into tabbar/lab-bar-lens * Merge branch 'main' into tabbar/lab-bar-lens * test(lab): TabBar's spring cases name the motion each hold judges Main's interaction harness now requires every hold sent from a test to name the motion it judges. Each TabBar case names what it samples after the hold: - the keyed slide: the lens body's and the lens copy's translate; - the finger landing: the capsule's scale, the lens body's scale and translate, and the lens clip's ::before opacity; - the lift: the capsule's and the lens body's scale; - the selection storyboard: the lens body's translate. * Merge main into tabbar/core-touch-entry * Merge the updated lower stack branch into tabbar/lab-bar-lens Co-authored-by: Cindy Zhang <[email protected]>
RefreshControl's Core part: internal re-exports only. Supersedes #8086. It lands right before its first user, Lab's pull to refresh.
Stack: #9807 → #9865
Maintainer impact
Lab's
useRefreshControlreads Core's pan recognizer, its hook and the motion engine through the internal touch entry. Lab reaches Core internals only through such entries.Intended invariant
No behavior change in Core: named re-exports only, with no gathering object, root re-export or docs. Lint allows the entry only in Core and Lab.
Change
internal/touch.tsre-exports exactly the 18 names that Lab's hook imports from it at #9865's head d511e52. Importing files are underpackages/lab/src/RefreshControl/:PanGestureRecognizergestures/PanGestureRecognizerRefreshPullRecognizer.tsPanGestureRecognizerOptionsgestures/PanGestureRecognizerRefreshPullRecognizer.tsGestureEventContextgestures/typesRefreshPullRecognizer.tsGestureTouchgestures/typesRefreshPullRecognizer.tsPointerKindgestures/typesRefreshPullRecognizer.ts,refreshTouchController.tsuseGestureRecognizergestures/useGestureRecognizerrefreshTouchController.tscreateMotionAnimatormotion/animatoruseMotionAnimator.tsMotionAnimatormotion/animatoruseMotionAnimator.tsMotionAnimatorOptionsmotion/animatoruseMotionAnimator.tsMotionCurvemotion/animatorrefreshTouchController.tscubicBeziermotion/bezierrefreshPull.ts,refreshTouchController.tsmapProgressmotion/progressrefreshTouchController.tsparseCssEasingmotion/rolesrefreshPull.tsparseMotionRoleValuemotion/rolesrefreshPull.tsrubberBandmotion/rubberBandrefreshPull.tsrubberBandInversemotion/rubberBandrefreshPull.tsrubberBandSlopemotion/rubberBandrefreshPull.tsscrollmotion/uikit/scrollrefreshTouchController.tsCheck: I parsed the export names of
internal/touch.tsat main 9a4627b and at this head. The 18 names it gains equal the 18 those files import; it drops none, and none was on main's entry.observeResizeis public (utils).Evidence
touch.test.tsfails against main's entry.Buttonis the control).Scope
Testing
Gates at this head, on main 9a4627b: typecheck, lint and
review:preclean; 1,795 unit tests pass. The bundle test passes, and its mutant fails.Overlap: #9669, #9696 and #9699 add some of these names; the later merge drops its duplicates. If #9754 lands first, the
createMotionAnimatorexport here takes its name,createMotionEngine.