fix: prevent Android dismiss handoff jumps - #25
Merged
Conversation
Upward swipe support restarted gesture dismiss timing on both axes. Preserve the cross-axis drag position and animate only the primary dismiss axis. Constraint: Horizontal dismisses animate X; upward dismisses animate Y Rejected: Animate both axes | Android final events can reverse the cross axis Confidence: high Scope-risk: narrow Reversibility: clean Directive: Keep the cross axis unchanged during gesture dismiss handoffs Tested: format, lint, typecheck, 201 tests, build, Android emulator profiling Not-tested: Physical Android device release behavior
🦋 Changeset detectedLatest commit: cb59c4a The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Root cause
#23 generalized gesture dismiss destinations for upward swipes. The gesture runtime then started
withTimingon both X and Y for every accepted direction.On Android, the final cross-axis value reported at gesture end can differ slightly from the last rendered drag frame. Restarting an otherwise unnecessary timing animation on that axis made the card briefly move backward when the finger was released.
Fix
Horizontal dismisses now animate only X, while upward dismisses animate only Y. The cross axis remains on its last drag frame instead of being restarted at the handoff.
This restores the horizontal dismiss translation behavior from before upward swipe support while retaining the new upward gesture path.
Validation
pnpm format:checkpnpm lintpnpm typecheckpnpm test --runInBand— 15 suites, 201 testspnpm buildRemaining validation
A physical Android release device was not available. Emulator profiling still showed general frame drops unrelated to the deterministic cross-axis handoff jump fixed here.