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

Commits on Mar 18, 2024

  1. feat: rewrite gesture apis with gesture handler 2 (gorhom#1126)

    * chore: updated dependencies
    
    * feat: rewrite the gesture api with gh2
    
    gorhom@6a4d296
    
    fix(gorhom#1119): fixed race condition between onmount and keyboard animations
    yayvery committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    4ffdf5c View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    afb2f9f View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    ed75bb7 View commit details
    Browse the repository at this point in the history
  4. fix: fixed the mount animation with reduce motion enabled (gorhom#1560,

    gorhom#1674)
    
    fix: bottom sheet not appearing for users that have reduced motion turned on (gorhom#1743)(by @fobos531)
    gorhom authored and yayvery committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    fc1a76f View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    8093e96 View commit details
    Browse the repository at this point in the history
  6. refactor ref/gestures

    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
    yayvery committed Mar 18, 2024
    Configuration menu
    Copy the full SHA
    df1cc1c View commit details
    Browse the repository at this point in the history