-
Notifications
You must be signed in to change notification settings - Fork 58
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
Inserter shows wrong layout with Display Zoom enabled #1404
Comments
@koke What do you think about setting
Using proposed solution and place block one above the other. |
That sounds like a good approach. One thing to watch for is to avoid things being scrollable until the contents are larger than the screen. The right interactions between the scrolling and dragging down to close the sheet might be tricky, but Also, another issue that wasn't obvious here is that on "regular zoom", the inserter has 3 columns of items, but here it has only 2. I think that unless you use one of the huge font sizes, we should be able to still fit 3 columns on the screen by having less padding on each button. |
Would you like to use |
No, I don't think that would fix the issue. From what I understand, display zoom doesn't adjust font sizes, but it's like setting a lower resolution on the display so things appear bigger. Here's a comparison of both modes with the same (default) font size: What I think it's happening is that each icon has a fixed width, which is assuming a certain minimum window width, and it's that layout code that should be adapted. If you look at those screenshots, the buttons are what's too big to fit 3 in a row, but I think the labels would still fit without modification. |
I cannot find @koke Could you please specify the general expectations of that issue? |
Interesting, it seems it's only available on some phone models: https://support.apple.com/guide/iphone/magnify-the-screen-iphd6804774e/ios I can't make sense of why those are the ones supported but I can't find the setting on my iPhone XS on iOS 13 either: I'm not sure if this can be tested without an actual device in that list 😞 |
Maybe we can achieve a similar effect by setting the width of the bottom sheet to 80-90% for testing? |
I think we can decrease the width to simulate the issue, and set blocks in 2 columns instead of 3. Actually I'm wondering what do we want to achieve in general when text |
That seems like the best option to me. @iamthomasbishop what do you think? Thinking about this in terms of flexbox:
|
That sounds right @koke. Normally, the gutters and margins between columns is 16px, but we can narrow down the gutters (spaces in between the 2 columns) to 8px if we need to. Vertical padding could probably stay the same (12px below each row, IIRC?).
👍. This was the one thing I was going to recommend we keep an eye on. Let's make sure wrapping looks okay – probably force a line-height of between |
Actually I've managed to fit it properly, however I'm still working over the right interactions between the scrolling and dragging down (unblocked the scroll in the I checked the scrollable example from the react-native-modal and currently I'm investigating why it doesn't work properly in our project, but on snack it works as expected. Currently, I'm not able to achieve closing the bottom sheet by swiping down, only closing by dragging the indicator works. Let me know wdyt @koke , @iamthomasbishop |
Can we set initial Regarding large font settings, I think this is about as good as it's going to get unless we wanted to dynamically switch the grid to a 2-column layout instead of 3 in this type of case (which I imagine isn't desirable).
I would consider this a blocker. |
I was going to ask you what should be the maxHeight, so I have an answer. I managed to make it scrollable and it was smooth, but as mentioned I faced the issue with closing the bottom sheet by swiping down.
Actually the number of columns is calculated on the basis of |
Hello Thomas! I have prepared a working version for ios, however I was struggling with properly working swiping down mechanism on Android. |
Sounds good regarding timing! Thanks for the update.
I would prefer to stay with vertical, for a few reasons:
|
I've been running into similar issues while working on #1466. The library we use (react-native-modal) seems to support this but you need to make the scroll view and the bottom sheet talk to each other, as you did in WordPress/gutenberg#18574. But in the case of template previews, we need to make that work with a BlockList, so we shouldn't make it part of the BottomSheet directly. This week, I kind of made it work, but the scrolling is still not feeling as good as it should, and |
I was trying to play a bit with that lib, but the main disadvantage is that we will have to add 3 three libs at the end (react-native-gesture-handler, react-native-reanimated and react-native-reanimated-bottom-sheet). |
@koke that library looks really great. @lukewalczak's concerns, esp about inputs within the component, would be worrisome to me considering we will rely heavily on complex controls in the sheets. But if we can avoid those issues I think something like this would be really great. |
This came up in WPiOS 14.1 beta testing at wordpress-mobile/WordPress-iOS#13304. More blocks have made the issue more relevant! |
Currently, we are supporting more and more blocks and that issue is more expanded - it's not related only to zoom but even on the horizontal mode we are not able to choose some block. This is a temporarily workaround. For more details, please check that comment |
The inserter currently doesn't support scrolling, which has been fine for now but it won't be for long. Besides that, when you enable Display Zoom, it shows up with too much padding making things worse.
Tested on an iPhone 8 iOS 12.4.1:
In the latest TestFlight build (13.3):
In the current development builds with three more blocks (code, group, and media-text) it starts to not fit on the screen:
Even in the TestFlight version, things get out of hand if you set the Dynamic Type size to the largest accessibility setting allowed:
The text was updated successfully, but these errors were encountered: