Skip to content
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

ReanimatedSwipable Delayed #3147

Closed
enchorb opened this issue Oct 10, 2024 · 2 comments · Fixed by #3149
Closed

ReanimatedSwipable Delayed #3147

enchorb opened this issue Oct 10, 2024 · 2 comments · Fixed by #3149
Labels
Can repro It is confirmed we can reproduce the issue Platform: iOS This issue is specific to iOS

Comments

@enchorb
Copy link

enchorb commented Oct 10, 2024

Description

Tried upgrading from Swipeable to ReanimatedSwipable but had to rollback.

For some reason the progress value on ReanimatedSwipable updates delayed as to what happened on the UI, the swipeable is already open but the progess.value, onSwipeableOpen, etc all fire 1-2 seconds after. This was not an issue with Swipeable

Steps to reproduce

Test side-by-side a Swipeable and ReanimatedSwipable

Snack or a link to a repository

N/A

Gesture Handler version

2.20.0

React Native version

0.75.4

Platforms

iOS

JavaScript runtime

Hermes

Workflow

Expo bare workflow

Architecture

Paper (Old Architecture)

Build type

Debug mode

Device

iOS simulator

Device model

iPhone 16 Pro Max - iOS 18

Acknowledgements

Yes

Copy link

Hey! 👋

The issue doesn't seem to contain a minimal reproduction.

Could you provide a snack or a link to a GitHub repository under your username that reproduces the problem?

@latekvo
Copy link
Contributor

latekvo commented Oct 11, 2024

Hi @enchorb,

Thank you for reporting this issue,

Please let me know if the following PR resolves it for you: (link)

@latekvo latekvo added Can repro It is confirmed we can reproduce the issue and removed Missing repro labels Oct 11, 2024
latekvo added a commit that referenced this issue Oct 17, 2024
## Description

This PR applies multiple bug fixes and improvements to the
`ReanimatedSwipeable`

### Changes:

- Fix reversed swipe direction being supplied to `open` and `willOpen`
callbacks.
- Fix `startDrag` callbacks receiving invalid `direction` when opening
swipeable.
- Fix unpredictable swipe direction being supplied to `close` and
`willClose` callbacks.
- Fix `onSwipeableWillClose` and `onSwipeableClose` callbacks sometimes
being called on open.
- Fix `progress` value skipping last `10%` of it's range and having a
delay relative to the `translation`.
  closes #3147

## Test plan

Will create an example showcasing outputs of all the affected callbacks,
work in progress.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Can repro It is confirmed we can reproduce the issue Platform: iOS This issue is specific to iOS
Projects
None yet
2 participants