-
Notifications
You must be signed in to change notification settings - Fork 63
Pages menu is cut off in mobile landscape view #1212
Comments
Thanks for reporting this issue with all details @Asadpalasara-multidots. We'll work on general improvements for the whole header. CC @panchovm. |
I can not reproduce the bug. Once reaching step 3 to see mobile views, the header changes and shows secondary menu's items inside the content switcher modal. See this gif. |
@panchovm Try in an actual phone, not the browser emulator, that gives you the limited height that prevents seeing the whole dropdown menu, as @Asadpalasara-multidots shown in the screenshot. |
Now I see it. We can tackle this by defining which breakpoint the header changes to its mobile version, and all menus are shown in full-size views. I will keep the needs design label to refer to it in a future design issue. |
Changing the horizontal breakpoint probably doesn't fix the problem. If you have a wide but short device (like a horizontal smartphone, or a browser window aligned to the top half of your screen) this still happens. We could make the inside of the menu scrollable? |
Most devices' aspect ratios display the content in a proper layout, so the challenge seems to be picking a breakpoint where the navigation adapts correctly, as both navigational elements and search results, whether it is landscape or portrait. On desktop, or where you can control the browser size, there will always be cases of cutting the UI due to window size. The scrollable menu sounds reasonable for this case, but I can not envision a smooth interaction in other situations unless you are thinking of special conditions for this behavior. |
The core issue, to my mind, is having a sticky header combined with flyout/dropdown menus. This means that the height of the dropdowns can never exceed the user's screen height, which is a difficult thing to always guarantee. We'd have to find a way to use javascript to make sure the dropdowns are scrollable and never extend past the bottom edge of the viewport. |
@zackkrida if we set |
That's kind of the thing with Tailwind, I'm not sure exactly how to do an escape hatch to be able to easily use variables for other things that need to reference shared sizes. In this case I guess it's okay for it to use JS to calculate the variables because the menus are never open in the SSR render anyway. |
As @zackkrida commented on PR #1257, this issue was not tackled in the code merged. I wonder if we should set a header component shift based on the viewport's height, similar to the breakpoints logic. After seeing the image attached in the initial comment and this example, it might work using the header mobile version and show all actions in full-size menus. |
We could use the |
I am trying to find stats about smartphone screen sizes and only found this site. It seems that Since this might happen mostly on mobile devices, we can try calculating the viewport size in devices smaller than |
The best fix here is probably to make sure if any of our popovers extend outside of the viewport, that we constrain their height and apply an internal scrollbar. I'm going to mark this as 'help wanted', since it's likely someone in the community interested in frontend work could take this on. |
Removing the |
Description
Some of Menu items not visible.
Reproduction
Screenshots
https://prnt.sc/aUuprxKjkp2m
Environment
The text was updated successfully, but these errors were encountered: