Repository navigation
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
AI review status for this pull request.
|
There was a problem hiding this comment.
Approval waits on an engineering owner's decision: this pull request rests on new draft requirements in spec:AST-094 (it cites FR1–FR3, FR17 and DEC-1), and resolveRelease lets a flick open a swipe row where current spec:AST-057 FR5 requires a fling, or any release past the commit point, to fire the outermost entry. An engineering owner records approval of the draft requirements by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), and either amends AST-057 FR5 or asks for the rule to conform to it. Independently of that decision:
- Land #8052, #8053 and #8054 first, so this pull request is reviewed as its own 408-line commit instead of 4,462 lines.
MEASUREMENTS.mdandmotion/uikit/gestures.tspoint atuikit/switch.ts,uikit/contextMenu.tsandsrc/gestures/, which do not exist at this head.
[Automated review]
| if (behavior === 'commit') { | ||
| return projected >= commitAt ? 'perform' : 'closed'; | ||
| } | ||
| if (travel >= commitAt) { | ||
| return 'perform'; | ||
| } | ||
| return projected >= swipeActions.openFraction * openWidth ? 'open' : 'closed'; |
There was a problem hiding this comment.
This rule departs from current spec:AST-057 FR5 ("a drag past the commit point or a fling MUST fire the outermost entry"; under commit, "a release past the commit point or a fling MUST slide the row out and fire the outermost entry"). Under reveal a fling opens instead of firing and a release past the panel's width moving back closes; under commit a release past the commit point moving back closes (swipeRelease.test.ts lines 74, 102-103 and 115-117). Nothing calls it yet, but before useSwipeAction does, FR5 needs an owner's amendment or this branch needs to conform.
| 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 | ||
| makes no haptic call), M-SW11 (Reduce Motion: the lift stays, the stretch | ||
| goes), M-SW16 (iOS 26.2). Partly: M-SW07 (a single tap only). Still open: |
There was a problem hiding this comment.
uikit/switch.ts does not exist at this head, so these "Done" captures have no values in this tree, and springs.switchThumbMove / switchThumbStretch still carry @measure M-SW02 / M-SW03 as webkit values. The same holds for uikit/contextMenu.ts at line 254. Point at files in this tree, or keep these lines out until those tables land.
| * @output Exports UIKIT_GESTURES, the gesture thresholds the gesture system | ||
| * (../../gestures) reads, each with where the number comes from, and the |
There was a problem hiding this comment.
packages/core/src/gestures (the gesture system named here and in the SYNC note at lines 30-31) is not in this tree; it arrives with the recognizer pull requests, which are not ancestors of this head.
PR Analysis Report📚 Storybook Preview🧪 Sandbox PreviewModified ComponentsItem (@astryxdesign/core) · View in Storybook
Component 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 |
a76a532 to
1823b61
Compare
1823b61 to
48767e4
Compare
There was a problem hiding this comment.
Approval waits on an engineering owner's decision: this pull request rests on new draft requirements in spec:AST-094 (FR1–FR3, FR17 and DEC-1), and resolveRelease lets a fling open or close a swipe row where current spec:AST-057 FR5 requires a fling to fire the outermost entry and a release past the panel's width to rest open. An engineering owner records approval of the draft requirements by commenting /approve-spec <full head SHA> on this pull request (the author may do so as an engineering owner), and either amends AST-057 FR5, with AST-094 FR3 reworded since it still asks for projection, or asks for the rule to conform to FR5. Independently of that decision:
- Land #8052, #8053 and #8054 first, so this pull request is reviewed as its own 470-line commit instead of 4,524 lines.
- The changeset says the rule is checked against 50 UIKit releases, but
swipeRelease.test.tschecks 44 of batch 10a's 51; add the missing six or correct the count. MEASUREMENTS.mdandmotion/uikit/gestures.tspoint atuikit/switch.ts,uikit/contextMenu.tsandsrc/gestures/, which do not exist at this head.
[Automated review]
| if (behavior === 'commit') { | ||
| return 'closed'; | ||
| } | ||
| if (velocity >= swipeActions.releaseVelocity) { | ||
| return 'open'; | ||
| } | ||
| if (velocity <= -swipeActions.releaseVelocity) { | ||
| return 'closed'; | ||
| } |
There was a problem hiding this comment.
Under reveal a fling short of the commit point opens here, and a release past the panel's width that is moving back closes; under commit a fling short of the commit point closes. Current spec:AST-057 FR5 requires a fling to fire the outermost entry and a release past the panel's width to rest open, so before useSwipeAction calls this, FR5 needs an owner's amendment or this branch needs to conform.
| '@astryxdesign/core': patch | ||
| --- | ||
|
|
||
| [chore] Internal: the UIKit values of a swipe-action row (the swipe threshold, the spring the row follows the finger and settles with, its Reduce Motion behavior, the touch claim distance the web needs) and the release rule that picks closed, open or fire (a fast release goes the way it moves, a slow one by where it is, and only a release past the commit point fires), checked against 50 releases read from UIKit. Not exported from the package entry point; no component uses it yet. |
There was a problem hiding this comment.
swipeRelease.test.ts checks 44 of batch 10a's 51 releases (the table at lines 32-80, with a 45th commented out), not 50: add the six missing releases, or say 44.
# Conflicts: # packages/core/src/motion/README.md
Touch presentations get one native-feeling behavior by default on every touch device, iOS and Android alike: measured values, compositor motion a finger can catch, recognizer-tracked gestures with native arbitration, two press profiles, and a Reduce Motion cross-fade. Touch motion is themeable, with the measured values as theme defaults; gesture thresholds stay internal. Size keys on the spec:AST-012 FR9 compact definition, a moved default is restored by the caller's presentation choice (INV16, DEC-23), and the record names the current claims it amends. Platform look and feel (OQ3) and module-level experimental subpaths (OQ4) stay open. Co-authored-by: vjeux <197597+vjeux@users.noreply.github.com>
|
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. |
Springs, scroll physics, timing curves, navigation values and gesture thresholds for the touch presentations of core components, each with its source (Apple documentation, a WWDC session, WebKit's UIKit-matched source, or a measurement of UIKit on the iOS 26.2 simulator) or labelled a guess with its measurement task. A test enforces the source rules on every domain file, in their JSDoc and typed forms, and checks the list of simulator measurements still owed.
Pure functions for the touch presentations: a closed-form damped spring with every Apple parameterization and Core Animation's settling duration, a spring chasing a moving target, UIScrollView's coast, rubber band and release projection. Tests hold them to an RK4 integration, WebKit's spring solver, the WWDC conversion equations and values read from UIKit, and play the constants table through them.
…ery measurement Review fixes: the table headers point at uikit.test.ts and MEASUREMENTS.md (not a sources.test.ts or the README); the springs header says how many springs are guesses (two) instead of most; gestures.ts no longer names the gesture system that arrives later; MEASUREMENTS.md keeps the switch and context-menu captures open until their tables land; the switch springs say they are WebKit's iOS 18 values, not UIKit's frames. Every measured source now carries its date, and uikit.test.ts refuses one without.
selectSnapPoint built its search window from fromIndex unclamped, so a stale current page past the end gave an empty window and value undefined. The index is clamped to the points first.
|
Agreed: one implementation.
|
48767e4 to
50ee84f
Compare
|
Pushed in 50ee84f: |
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the swipe release rule: resolveRelease never fires on a fling and closes a release past the panel's width that is moving back, while current spec:AST-057 FR5, which current spec:AST-094 FR36 keeps for row swipes, requires a fling to fire the outermost entry and such a release to rest open. Either an engineering owner amends FR5 to this rule and records it by commenting /approve-spec <full head SHA> on the pull request that carries the amendment (the author may do so as an engineering owner), or the rule and its tests conform to FR5 as written. Independently of that decision:
- The changeset says the rule is checked against 50 UIKit releases;
swipeRelease.test.tschecks 44 of batch 10a's 51. swipeActions.tsdescribesreleaseVelocityagainst UIKit's undecayed pan velocity; describe it against thespec:AST-100velocity, which is 0 after a still pause.
[Automated review]
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the swipe release rule: resolveRelease never fires on a fling and closes a release past the panel's width that is moving back, while current spec:AST-057 FR5, which current spec:AST-094 FR36 keeps for row swipes, requires a fling to fire the outermost entry and such a release to rest open. Either an engineering owner amends FR5 to this rule and records it by commenting /approve-spec <full head SHA> on the pull request that carries the amendment (the author may do so as an engineering owner), or the rule and its tests conform to FR5 as written. Independently of that decision:
- The changeset says the rule is checked against 50 UIKit releases;
swipeRelease.test.tschecks 44 of batch 10a's 51. swipeActions.tsdescribesreleaseVelocityagainst UIKit's undecayed pan velocity; describe it against thespec:AST-100velocity, which is 0 after a still pause.
[Automated review]
# Conflicts: # packages/core/src/motion/README.md
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the swipe release rule: resolveRelease never fires on a fling and closes a release past the panel's width that is moving back, while current spec:AST-057 FR5, which current spec:AST-094 FR36 keeps for row swipes, requires a fling to fire the outermost entry and such a release to rest open. Either an engineering owner amends FR5 to this rule and records it by commenting /approve-spec <full head SHA> on the pull request that carries the amendment (the author may do so as an engineering owner), or the rule and its tests conform to FR5 as written. Independently of that decision:
- The changeset says the rule is checked against 50 UIKit releases;
swipeRelease.test.tschecks 44 of batch 10a's 51. swipeActions.tsdescribesreleaseVelocityagainst UIKit's undecayed pan velocity; describe it against thespec:AST-100velocity, which is 0 after a still pause.
[Automated review]
# Conflicts: # packages/core/src/motion/README.md
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the swipe release rule: resolveRelease never fires on a fling and closes a release past the panel's width that is moving back, while current spec:AST-057 FR5, which current spec:AST-094 FR36 keeps for row swipes, requires a fling to fire the outermost entry and such a release to rest open. Either an engineering owner amends FR5 to this rule and records it by commenting /approve-spec <full head SHA> on the pull request that carries the amendment (the author may do so as an engineering owner), or the rule and its tests conform to FR5 as written. Independently of that decision:
- The changeset says the rule is checked against 50 UIKit releases;
swipeRelease.test.tschecks 44 of batch 10a's 51. swipeActions.tsdescribesreleaseVelocityagainst UIKit's undecayed pan velocity; describe it against thespec:AST-100velocity, which is 0 after a still pause.
[Automated review]
… check, and releaseVelocity names the spec:AST-100 release velocity it compares
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the swipe release rule: resolveRelease never fires on a fling and closes a release past the panel's width that is moving back, while current spec:AST-057 FR5, which current spec:AST-094 FR36 keeps for row swipes, requires a fling to fire the outermost entry and such a release to rest open. Either an engineering owner amends FR5 to this rule and records it by commenting /approve-spec <full head SHA> on the pull request that carries the amendment (the author may do so as an engineering owner), or the rule and its tests conform to FR5 as written. The changeset's release count and the releaseVelocity note now match the tests and spec:AST-100, so nothing else is outstanding here.
[Automated review]
# Conflicts: # packages/core/src/motion/README.md
There was a problem hiding this comment.
Approval waits on an engineering owner's decision on the swipe release rule: resolveRelease never fires on a fling and closes a release past the panel's width that is moving back, while current spec:AST-057 FR5, which current spec:AST-094 FR36 keeps for row swipes, requires a fling to fire the outermost entry and such a release to rest open. Either an engineering owner amends FR5 to this rule and records it by commenting /approve-spec <full head SHA> on the pull request that carries the amendment (the author may do so as an engineering owner), or the rule and its tests conform to FR5 as written. Nothing else is outstanding here.
[Automated review]
Sits on main (#8054 merged). Review only this PR's change: vjeux/astryx@6aea9bd...e805797
Why
On iOS, a list row with swipe actions (Mail's archive, Settings' delete) waits for a short drag, follows the finger on a spring, and on release snaps open, snaps closed or fires its action. Astryx's
Itemimitates it with numbers nobody measured (an 8 px start against UIKit's 25 pt, a 200 ms ease-out against UIKit's 0.92 s spring), and a quick flick fires the row's outermost action, often Delete.What led to it
This is part of a series bringing Astryx's touch interactions to parity with native iOS (UIKit). We recorded real UIKit rows on iOS 26.2 in a small test app: 51 releases at scripted distances and speeds, plus rows released while moving back. This PR turns the recordings into a table of values and a release rule. Nothing uses them yet; #8097 wires them into the row.
Options and tradeoffs
Two tradeoffs are owner decisions this PR proposes:
MEASUREMENTS.md.Why this choice
Option 3 reproduces all 44 checkable releases, and only a drag past the commit point fires, never a flick.
How to check it
pnpm exec vitest run packages/core/src/Item/swipeRelease.test.ts packages/core/src/motion.There is nothing to see in a story yet: the values are internal (
[chore]changeset). Authority:spec:AST-094FR1–FR3 and FR17;spec:AST-057is unchanged.Evidence
swipeRelease.test.ts.Scope