-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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] Adjust bottom-sheet #18574
Conversation
cc @iamthomasbishop Could you check the screen captures in this PR? |
cc @koke could you also verify this is solving the problems you mentioned in the issue? |
Hi! It is only a temporary solution since in the future we will be able to have swipe with the scroll on Android as well. We just need to wait for that fix to be merged software-mansion/react-native-gesture-handler#937. Some context: We need to render it inside Technically we are able to make it with |
Thank you @dratwas for those great news and all your effort on that! To sum up, until the time we have that perfect solution we'll need to solve the issue about block picker not fitting into small screens anymore. So I believe this PR brings a good short term solution to that. |
scrollEventThrottle={ 16 } | ||
style={ { maxHeight } } | ||
contentContainerStyle={ [ styles.content, contentStyle ] } | ||
> | ||
{ this.props.children } |
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.
One thing which is worrying me ( and I'm not proud of it :( ) is placing a FlatList
within a ScrollView
. Generally, it shouldn't have any performance issues since scrolling is disabled in a FlatList
. There is no issue with rewriting it, but we're going to lose nice features such as ItemSeparatorComponent
or numColumns
. Please let me know wdyt.
371174d
to
54196b2
Compare
This is much better than what exists now so I agree w/ @pinarol we should ship these improvements and iterate. With that said, I have a few bits of feedback:
Can the user tap the scrim to dismiss the sheet? I would hope so. Even if they can, because we won't provide swipe-to-dismiss on Android, we might want to target that for a shorter max-height on Android so that the scrim and drag handle are slightly more reachable while still showing ~2.5 rows of blocks — maybe ~250-260px tall so that it looks something like this? |
ba954ef
to
d311517
Compare
786c6df
to
d311517
Compare
f84965b
to
edfc88c
Compare
UPDATES
Q&A
This is kind of expected behavior, especially on devices with an 18:9 (or 18,5:9) aspect ratio and enabled screen zoom on max. Number of columns is calculated based on
Tbh, I was not able to reproduce it before refactor and after as well. Please check it one more time, if you will face that issue again, please send me some repro steps along with device configuration / specs 🙏 |
4190f55
to
6292cfb
Compare
6292cfb
to
d58567c
Compare
@lukewalczak I think even with "large" display zoom, we should ensure there are 3 columns per row. If we need to adjust the spacing around grid items, widths, or font-sizes, then let's do that. |
Also, the other screenshots above (bottom sheet inset and landscape mode) look great 👍 |
Looking great on Android now! 🎉
@iamthomasbishop no, it just tries to scroll the content.
@lukewalczak you are right, it's not the normal behaviour, but a corner case. That's probably why you couldn't reproduce it. I was able to reproduce it on an iPhone XS with these steps:
This being a corner case, I don't consider it a blocker for this PR, but it would be great to fix it if it's not too complex. EDIT: Adding a video showing the steps to reproduce the issue: https://cloudup.com/cBxQc0qynbx Let me know! |
04f1c6f
to
e70b44b
Compare
e70b44b
to
01c18d4
Compare
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.
The remaining issues seem to be fixed. Looking great to me! 🎉
Super job @lukewalczak ! I'm so glad we will finally have a scrolling bottom sheet
Description
Ref to gb-mobile PR: wordpress-mobile/gutenberg-mobile#1837
That PR is fixing the issue with wrong layout within inserter: wordpress-mobile/gutenberg-mobile#1404
That PR is fixing: wordpress-mobile/WordPress-iOS#13304.
NOTE: At the same point, it's disabling swipe-to-close option on Android ( swipe / drag is still available in the top most area - near drag indicator).
How has this been tested?
Image
settingsScreenshots
Types of changes
Checklist: