Repository navigation
Replies: 26 comments 54 replies
Converted all internal state/memoized variables to Reanimated shared values.In this branch, I have refactored the library to use shared values to store and update layout values. NoticeCalculating snap points position had change in this branch, now the library will count the handle height when positioning the sheet. This is a breaking change and will require developers to carefully monitor the change. This is how you can visualise it: Testingyarn add ssh://git@github.com:gorhom/react-native-bottom-sheet#refactor/convert-variables-to-shared-values |
|
This comment was marked as off-topic.
This comment was marked as off-topic.
|
This looks great. Thanks for sharing the progress, @gorhom. For now, should I assume that issues like #52 won't be fixed? It makes sense if you're working on a refactor but any information would be good to help me decide which route to take — use version 2 for now as 3 isn't working or use neither and wait for version 4. Thanks again and good luck with version 4. |
|
Hey @gorhom! Thank you very much for your work. @nandorojo sent me your gist to test BottomSheet v4 with RN Modal. It's working fine on iOS but there is a weird behavior on web: bottomsheetrnmodal.mp4Any idea why? |
Added BottomSheetFooterThis component will be placed at the bottom of the sheet all the time and will react to keyboard appearnce. Props
screencap-2021-05-25T220030.468Z.mp4Testingyarn add @gorhom/bottom-sheet@4.0.0-alpha.4 |
Prevent resetting the scrollable position when dragging by the handlemore info here #461 lockposition.movTestingyarn add @gorhom/bottom-sheet@4.0.0-alpha.7 |
Detached Bottom SheetThis will allow user to create a detached bottom sheet with less effort. Detached.mp4Testingyarn add @gorhom/bottom-sheet@4.0.0-alpha.12 |
|
I think this feature would be nice to have, especially along with web support: I could help with the implementation if needed |
|
I'd love it if we could get the onScroll event working for BottomSheetScrollView and related components. I have a few animations that need to run when the y contentOffset !== 0 but currently can't because there's no way (that I know of) to get that information. #488 |
|
I've been getting this issue on v4, a bit hard to reproduce but notice it only happens like 1/10 times (midway through the video it shoots up.) I'm using the sheet inside of a Upload.from.GitHub.for.iOS.MOV |
|
Not sure if this is the place to write this, but it would be nice to have the option to use it in a more declarative way so I can just set the |
|
Hi @gorhom, quick question... 😄 As in V3 there is the dismiss by name/key functionality, is possible also add the |
|
Hey @gorhom I was testing But as I seen the value of both condition I changed with equals to sign which worked. |
This comment has been hidden.
This comment has been hidden.
|
@gorhom when can we expect v4 to be fully released? |
|
Hello 👋 It would be really nice to have complete control over the accessibility props (accessible, accessibilityLabel, accessibilityRole, accessibilityHint, accessibilityState) on the BottomSheet as well as it's sub-components (handle, backdrop) since it is currently not possible to do localisation. In my team we have done some research on how accessibility is handled on different apps, platforms and it seems like everyone does it completely differently (e.g. some do not make the backdrop accessible, others do not even make the handle accessible and basically anything in between). Are there any plans in introducing customisable accessibility in the v4 release? |
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
|
Good Afternoon @gorhom I'm am continuing the convo here instead of Twitter. Here is some feedback: The snack has some issues.React Navigation integrationWhen trying to implement a navigator (as below and according to your examples) nothing happens. The code below is the way I implemented it. const {
animatedHandleHeight,
animatedSnapPoints,
animatedContentHeight,
handleContentLayout,
} = useBottomSheetDynamicSnapPoints(["CONTENT_HEIGHT"]);
<NativeViewGestureHandler disallowInterruption={true}>
<View flex={1}>
<BottomSheetModal
name="Select"
ref={newBookingModal.ref}
onDismiss={resetCarForm}
snapPoints={animatedSnapPoints}
handleHeight={animatedHandleHeight}
contentHeight={animatedContentHeight}
enablePanDownToClose={true}
keyboardBehavior="interactive"
android_keyboardInputMode="adjustPan"
>
<BottomSheetScrollView
onLayout={handleContentLayout}
style={{
flex: 1,
backgroundColor: "red",
}}
>
<NewBookingNavigator />
</BottomSheetScrollView>
</BottomSheetModal>
</View>
</NativeViewGestureHandler>
<NavigationContainer independent={true}>
<Stack.Navigator
screenOptions={screenOptions}
initialRouteName="ScreenOne"
>
<Stack.Screen
name="ScreenOne"
options={{ title: "Screen One", headerShown: false }}
component={ScreenOne}
/>
<Stack.Screen
name="ScreenTwo"
options={{ title: "Screen Two", headerShown: false }}
component={ScreenTwo}
/>
...
</Stack.Navigator>
</NavigationContainer> |
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment has been hidden.
This comment was marked as off-topic.
This comment was marked as off-topic.
|
Hi everyone, |
|
I'm waiting for stable |
|
@gorhom The only error log I can provide is one from crashlytics: |


Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
Overview
Hi everyone 👋
After introducing Keyboard Handling on the previous discussion, I notice that the core library needs a refactor especially when it comes to state and memoized variables. Some of the issues that needed this major refactor #401 #402, and others.
Another area I wanted to improve is logging and in-code docs to help the community to contribute and debug issues easily, so I will try to document the major functionalities and main components.
Finally, I would love to hear your feedback or improvements that could be shipped with this release.
Testing
I will be posting an individual PRs for each feature/improvements and include installation commands.
You can test latest alpha here:
Any issue should be reported with this reproducible issue template on Expo Snack
https://snack.expo.io/@gorhom/bottom-sheet-v4-reproducible-issue-template
Status
We've reach to the sable version so far, I am currently working on finalising this release.
Mastertov2v4toMasterChange-log
New Features
snapToPositionmethod which will allows user to snap to a custom position out of the provided snap points.bottomInsetprop which will add a space below theBottomSheet.enablePanDownToCloseprop which will allow user to close the sheet when panning down.footerComponentprop.BottomSheetVirtualizedListbackgroundStyle,handleStyle&handleIndicatorStyleto theBottomSheetAddedWebsupport. TBDImprovements
animatedPosition&animatedIndextouseBottomSheet.useBottomSheetInternalfor advanced usage.useBottomSheetDynamicSnapPointshookBreaking Changes
animationEasingfromBottomSheetprops.animationDurationfromBottomSheetprops.closeOnPressfromBottomSheetBackdropprops.dismissOnClosefromBottomSheetModalprops.DevX
enableLoggingto enable logging in development environment.All reactions