Skip to content

Commit

Permalink
refactor scrollable ref & native gestures using useAnimatedRef and Re…
Browse files Browse the repository at this point in the history
…animated.ScrollView + createNativeWrapper

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 using animated scrollEnabled prop based on software-mansion/react-native-gesture-handler#420 (comment)
  • Loading branch information
yayvery committed Mar 18, 2024
1 parent 8093e96 commit 2ec2604
Show file tree
Hide file tree
Showing 31 changed files with 317 additions and 1,560 deletions.

This file was deleted.

This file was deleted.

This file was deleted.

7 changes: 0 additions & 7 deletions example/app/src/screens/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -112,13 +112,6 @@ export const screens = [
slug: 'Advanced/PullToRefreshExample',
getScreen: () => require('./advanced/PullToRefreshExample').default,
},
{
name: 'Custom Gesture Handling',
slug: 'Advanced/CustomGestureHandling',
getScreen: () =>
require('./advanced/customGestureHandling/CustomGestureHandling')
.default,
},
] as ShowcaseExampleScreenType[],
},
];
Loading

0 comments on commit 2ec2604

Please sign in to comment.