-
Notifications
You must be signed in to change notification settings - Fork 4k
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
[RNMobile] FlatList inside the bottom-sheet #23873
Conversation
Size Change: -1.02 MB (88%) 🏆 Total Size: 1.16 MB
ℹ️ View Unchanged
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tested this via the steps described on Android (Pixel 3a) and iOS (via simulator iPhone 11 Pro), and the warning is no longer logged. I tested out the bottomsheet via the inserter, as well as some of the more complex flows, such as the color settings in button, and mostly everything works as expected.
Also, I've tested this via inclusion of the changeset in a draft PR here: #23922, and it seems to be working there as well.
However, I noticed one odd regression in the scroll behavior of the inserter: when the drag start happens between the buttons, the gesture is lost:
I also encountered a subtle unrelated bug while testing (also observed on master), noting here since there is related work underway with navigation:
In the colors subsheet, after using the "soft" back button (the one in the subsheet header), two button presses are required to dismiss the main modal via the hardware back button:
Hey @mkevins thanks for your review :)
I already fixed it, could you please check it one more time?
Thanks for reporting, i already reimplemented the back button functionality and it seems to work on the navigation PR Hey, @lukewalczak 👋 , could please review this as well? :) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Tested again after the latest fix, and the gesture is no longer lost between buttons 🎉 . LGTM!
Thanks @lukewalczak for your report! I already fixed that issue. I also added the correct padding bottom to the inserter menu. Could you please check it one more time? :) |
Co-authored-by: Luke Walczak <[email protected]>
Description
In this PR i added a possibility to use FlatList inside Bottom-sheet w/o losing the swipe to close functionality (iOS) and w/o losing the optimization of FLatList.
Because we used the ScrollView to wrap content inside the BottomSheet we closed the optimization of FlatList. In this PR I added a prop called
isChildrenScrollable
and add ScrollView wrapper depends on it. I pass also all props that need to be passed to the nested FlatList by BottomSheetConsumer.I demonstrated it on the inserter menu since it was a FlatList with
scrollEnabled
set to false.How has this been tested?
WARN VirtualizedLists should never be nested inside plain ScrollViews with the same orientation - use another VirtualizedList-backed container instead.
in the consoleTypes of changes
Add possibility to use FlatList inside bottom-sheet
Checklist: