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

use rngh v2 api, refactor scrollable animated ref & gesture interaction w/ scrollEnabled #18

Draft
wants to merge 6 commits into
base: discord-fork-4.6.1
Choose a base branch
from

Conversation

yayvery
Copy link

@yayvery yayvery commented Mar 18, 2024

yayvery and others added 4 commits March 17, 2024 17:03
* chore: updated dependencies

* feat: rewrite the gesture api with gh2

gorhom@6a4d296

fix(gorhom#1119): fixed race condition between onmount and keyboard animations
gorhom#1674)

fix: bottom sheet not appearing for users that have reduced motion turned on (gorhom#1743)(by @fobos531)
@yayvery yayvery force-pushed the discord-fork-4.6.1-rngh-v2 branch 5 times, most recently from 56c3c78 to 2ec2604 Compare March 18, 2024 09:52
@yayvery yayvery changed the title feat: rewrite gesture apis with gesture handler 2 (gorhom#1126) rngh v2, refactor scrollable ref & gesture handling, remove custom gesture/scroll handling Mar 18, 2024
@yayvery yayvery force-pushed the discord-fork-4.6.1-rngh-v2 branch 3 times, most recently from f1f41b2 to ed0359c Compare March 18, 2024 10:12
@yayvery yayvery changed the title rngh v2, refactor scrollable ref & gesture handling, remove custom gesture/scroll handling use rngh v2 api, refactor scrollable animated ref & gesture interaction, remove custom gesture/scroll handling Mar 18, 2024
@yayvery yayvery changed the title use rngh v2 api, refactor scrollable animated ref & gesture interaction, remove custom gesture/scroll handling use rngh v2 api, refactor scrollable animated ref & gesture interaction Mar 18, 2024
@yayvery yayvery changed the title use rngh v2 api, refactor scrollable animated ref & gesture interaction use rngh v2 api, refactor scrollable animated ref & gesture interaction w/ scrollEnabled Mar 18, 2024
@yayvery yayvery force-pushed the discord-fork-4.6.1-rngh-v2 branch 8 times, most recently from c82d5b8 to 9fd7242 Compare March 18, 2024 16:24
remove preserveScrollMomentum + scrollBuffer + lockableScrollableContentOffsetY props

we're using `preserveScrollMomentum` in the media picker, but i'm removing it because i feel the behavior is actually detrimental to the UX, and to simplify the refactor to scrollEnabled in the next commit.

`lockableScrollableContentOffsetY` is removed since it won't be necessary after the scrollEnabled refactor

`scrollBuffer` was no longer used.

removed custom gesture/scroll handling hooks

after refactoring to use scrollEnabled, we can add other props to add custom behaviors if needed.

refactored scroll/pan gesture interaction based on software-mansion/react-native-gesture-handler#420 (comment)

and approach from rngh example

https://github.com/software-mansion/react-native-gesture-handler/blob/main/example/src/new_api/bottom_sheet/index.tsx#L87

scrollEnabled inspired by react-native-swipe-modal

https://github.com/birdwingo/react-native-swipe-modal
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants