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 |
Beta Was this translation helpful? Give feedback.
-
|
Beta Was this translation helpful? Give feedback.
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. |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Prevent resetting the scrollable position when dragging by the handlemore info here #461 lockposition.movTestingyarn add @gorhom/bottom-sheet@4.0.0-alpha.7 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
I think this feature would be nice to have, especially along with web support: I could help with the implementation if needed |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
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 |
Beta Was this translation helpful? Give feedback.
-
Hi @gorhom, quick question... 😄 As in V3 there is the dismiss by name/key functionality, is possible also add the |
Beta Was this translation helpful? Give feedback.
-
Hey @gorhom I was testing But as I seen the value of both condition I changed with equals to sign which worked. |
Beta Was this translation helpful? Give feedback.
This comment has been hidden.
This comment has been hidden.
-
@gorhom when can we expect v4 to be fully released? |
Beta Was this translation helpful? Give feedback.
-
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? |
Beta Was this translation helpful? Give feedback.
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> |
Beta Was this translation helpful? Give feedback.
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, |
Beta Was this translation helpful? Give feedback.
-
I'm waiting for stable |
Beta Was this translation helpful? Give feedback.
-
@gorhom The only error log I can provide is one from crashlytics:
|
Beta Was this translation helpful? Give feedback.
-
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.
Master
tov2
v4
toMaster
Change-log
New Features
snapToPosition
method which will allows user to snap to a custom position out of the provided snap points.bottomInset
prop which will add a space below theBottomSheet
.enablePanDownToClose
prop which will allow user to close the sheet when panning down.footerComponent
prop.BottomSheetVirtualizedList
backgroundStyle
,handleStyle
&handleIndicatorStyle
to theBottomSheet
AddedWeb
support. TBDImprovements
animatedPosition
&animatedIndex
touseBottomSheet
.useBottomSheetInternal
for advanced usage.useBottomSheetDynamicSnapPoints
hookBreaking Changes
animationEasing
fromBottomSheet
props.animationDuration
fromBottomSheet
props.closeOnPress
fromBottomSheetBackdrop
props.dismissOnClose
fromBottomSheetModal
props.DevX
enableLogging
to enable logging in development environment.Beta Was this translation helpful? Give feedback.
All reactions