Skip to content
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

[ Navigation Block ] Make it Mobile Responsive #22824

Closed
munirkamal opened this issue Jun 2, 2020 · 9 comments
Closed

[ Navigation Block ] Make it Mobile Responsive #22824

munirkamal opened this issue Jun 2, 2020 · 9 comments
Assignees
Labels
[Block] Navigation Affects the Navigation Block Mobile Web Viewport sizes for mobile and tablet devices

Comments

@munirkamal
Copy link
Contributor

Hi,

I am using Navigation Block for creating Header Templates. I know it is still a WIP, just want to raise an issue that it is not mobile responsive yet.

From mobile responsive I mean to convert the menu items in a menu toggle icon for mobile screen sizes.

Is this something already in consideration?

Cheers.

@annezazu
Copy link
Contributor

annezazu commented Jun 3, 2020

@munirkamal thanks for reporting this and sharing! Right now, work is in progress to improve responsiveness here: #22497

Does this cover what you were hoping to see? If so, please close this out so we can focus efforts there. If not, definitely share more of what you'd like to see and know that the people working on this are doing their best to create a responsive experience.

@annezazu annezazu added [Block] Navigation Affects the Navigation Block [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Feature] Navigation Screen Mobile Web Viewport sizes for mobile and tablet devices labels Jun 3, 2020
@munirkamal
Copy link
Contributor Author

@annezazu

Thank you for reviewing this. I've checked the issue #22497 and that is not what this issue is about. That issue is to make the menu editing experience responsive.

In this issue, I want to raise it to devs attention that the menu itself is not responsive on the front-end.

By Responsive I mean to make the menu items enclosed inside a menu toggle for mobile devices.

For example here are the screenshots of a simple header template I have created.

Desktop:
Image 2020-06-04 at 1 12 55 PM

Mobile:
Image 2020-06-04 at 1 13 11 PM

Now for the mobile, I wish the menu block should be responsive and work something like this.
Screen Recording 2020-06-04 at 01 32 PM

Do you get my point? Right now in the gif above I implemented it with a little JS and inserting the icon/div in an HTML block.

let me know if you need more info.

@annezazu
Copy link
Contributor

annezazu commented Jun 4, 2020

@munirkamal thanks for this GIF and further explanation - makes perfect sense. I've added this to the project board so the people working on this can take a look.

@munirkamal
Copy link
Contributor Author

@annezazu

Great 👍

@draganescu draganescu changed the title Block: Navigation - Make it Mobile Responsive [ Navigation Block ] Make it Mobile Responsive Jun 4, 2020
@draganescu draganescu removed [Feature] List View Menu item in the top toolbar to select blocks from a list of links. [Feature] Navigation Screen labels Jun 4, 2020
@mtias mtias added the Needs Design Needs design efforts. label Jan 28, 2021
@jasmussen
Copy link
Contributor

jasmussen commented Mar 2, 2021

Here's a rough outline for what we could start with —

Make a toggle on the Navigation block that defaults to collapsing to a menu on mobile.

Desktop

On mobile, with the navigation block unselected, you see the burger icon.

Editor

Tap to edit. When you are editing (navigation block is-selected or has-child-selected), the block itself gets the same treatment as the modal dialog on the frontend. Click outside to deselect the block, and collapse the menu.

On the frontend it works: on mobile (f.ex. we <480px), you see the burger icon:

Frontend

Click it and a modal dialog opens, trapping tabs, and Esc or or the close icon closes the menu:

We could potentially use Micromodal for the dialog behavior, and this same behavior would benefit the burger menu whether it was a small dropdown, a fullscreen modal, an overlay sidebar, or most things in between.

It seems feasible to be able to offer both fullscreen modal menus, sidebar overlays, and inline dropdowns using the same markup and CSS only, as position: fixed; breaks out of any ancestors that apply position: relative;, therefore those three styles could simply be style variations.

@mtias
Copy link
Member

mtias commented Mar 3, 2021

Lovely. I think it might be worth allowing to both have an icon to trigger (default), but also the option of a text button (like "Menu"). Perhaps rather than text it's an actual Button block with all its customization settings and some good defaults?

image

@jasmussen
Copy link
Contributor

I'll think about the best way to let you edit and configure such a button in the flow from both the desktop and mobile breakpoints, seems like we might need to show it on-select at both.

@mtias
Copy link
Member

mtias commented Mar 3, 2021

I think we can keep it just on the context it's actually shown. Another thing I think we really need to do is to allow the button -> overlay to also work on desktop as an option.

@vcanales
Copy link
Member

Closed by #30047
Follow in #31765

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
[Block] Navigation Affects the Navigation Block Mobile Web Viewport sizes for mobile and tablet devices
Projects
None yet
Development

No branches or pull requests

6 participants