-
-
Notifications
You must be signed in to change notification settings - Fork 978
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
New onSwipeableOpenDragStart and onSwipeableCloseDragStart events #2589
Conversation
That would be great, i already had this problem on my app and had to fix it manually with patch |
Very nice @rampazzo1989! I was looking for a solution like that. Any updates for this Pull Request ? |
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.
Hi @rampazzo1989, thanks for this PR! It looks ok, but I'd like you to make some cosmetic changes, so I've left some comments.
Thank you for the review @m-bert! I've done the changes, really got better! |
Now it looks much better, thank you once again! ✅ |
…4315) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-native-gesture-handler](https://github.com/software-mansion/react-native-gesture-handler) | [`^2.13.1` -> `^2.13.2`](https://renovatebot.com/diffs/npm/react-native-gesture-handler/2.13.1/2.13.2) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-gesture-handler/2.13.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-gesture-handler/2.13.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-gesture-handler/2.13.1/2.13.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-gesture-handler/2.13.1/2.13.2?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-gesture-handler (react-native-gesture-handler)</summary> ### [`v2.13.2`](https://github.com/software-mansion/react-native-gesture-handler/releases/tag/2.13.2) [Compare Source](https://github.com/software-mansion/react-native-gesture-handler/compare/2.13.1...2.13.2) #### 🐛 Bug fixes - Add `ghQueueMicrotask` by [@​m-bert](https://github.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2612](https://github.com/software-mansion/react-native-gesture-handler/pull/2612) #### 👍 Improvements - New onSwipeableOpenDragStart and onSwipeableCloseDragStart events by [@​rampazzo1989](https://github.com/rampazzo1989) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2589](https://github.com/software-mansion/react-native-gesture-handler/pull/2589) - Remove jcenter by [@​ChaseKnowlden](https://github.com/ChaseKnowlden) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2610](https://github.com/software-mansion/react-native-gesture-handler/pull/2610) - Add buildconfig flag for AGP8+ by [@​pvegh](https://github.com/pvegh) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2599](https://github.com/software-mansion/react-native-gesture-handler/pull/2599) #### 🔢 Miscellaneous - Update dependencies in e2e/web-tests by [@​m-bert](https://github.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2601](https://github.com/software-mansion/react-native-gesture-handler/pull/2601) - Bump [@​sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1 in /FabricExample by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2605](https://github.com/software-mansion/react-native-gesture-handler/pull/2605) - Bump [@​sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1 in /docs by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2602](https://github.com/software-mansion/react-native-gesture-handler/pull/2602) - Give some love to Gesture Handler docs by [@​kacperkapusciak](https://github.com/kacperkapusciak) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2607](https://github.com/software-mansion/react-native-gesture-handler/pull/2607) - Fix typo in Composing gestures docs by [@​S1D007](https://github.com/S1D007) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2614](https://github.com/software-mansion/react-native-gesture-handler/pull/2614) - Bump postcss from 8.4.30 to 8.4.31 in /e2e/web-tests by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2623](https://github.com/software-mansion/react-native-gesture-handler/pull/2623) - Bump postcss from 8.4.14 to 8.4.31 in /docs by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2621](https://github.com/software-mansion/react-native-gesture-handler/pull/2621) - Bump [@​sideway/formula](https://github.com/sideway/formula) from 3.0.0 to 3.0.1 in /example by [@​dependabot](https://github.com/dependabot) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2606](https://github.com/software-mansion/react-native-gesture-handler/pull/2606) #### New Contributors - [@​rampazzo1989](https://github.com/rampazzo1989) made their first contribution in [https://github.com/software-mansion/react-native-gesture-handler/pull/2589](https://github.com/software-mansion/react-native-gesture-handler/pull/2589) - [@​ChaseKnowlden](https://github.com/ChaseKnowlden) made their first contribution in [https://github.com/software-mansion/react-native-gesture-handler/pull/2610](https://github.com/software-mansion/react-native-gesture-handler/pull/2610) - [@​pvegh](https://github.com/pvegh) made their first contribution in [https://github.com/software-mansion/react-native-gesture-handler/pull/2599](https://github.com/software-mansion/react-native-gesture-handler/pull/2599) - [@​S1D007](https://github.com/S1D007) made their first contribution in [https://github.com/software-mansion/react-native-gesture-handler/pull/2614](https://github.com/software-mansion/react-native-gesture-handler/pull/2614) **Full Changelog**: software-mansion/react-native-gesture-handler@2.13.1...2.13.2 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone America/Los_Angeles. 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/valora-inc/wallet). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy44LjEiLCJ1cGRhdGVkSW5WZXIiOiIzNy44LjEiLCJ0YXJnZXRCcmFuY2giOiJtYWluIn0=--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <valorabot@valoraapp.com>
Hey @rampazzo1989, when working on const direction =
rowState === -1
? 'right'
: rowState === 1
? 'left'
: translationX > 0
? 'left'
: 'right'; When swiping to the left when the So when returning On another note, do you think the callbacks should always receive the swiping direction like they do when no panels are open, or should it stay how it is, with swiping direction returned always being |
Description
Fixes #935
The event onSwipeableWillOpen only starts right before the onSwipeableOpen event, not when the drag to open / close starts. This PR includes onSwipeableOpenStartDrag (direction: 'left' | 'right') and onSwipeableCloseStartDrag (direction: 'left' | 'right'), allowing execute actions when the animation to open/close starts (when drag starts).
Test plan
Tested in the example app.