-
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
Navigation Block: Toolbar overlaps with submenu links when opening sidebar or using smaller viewport #40382
Comments
Error.Sub.menu.mp4 |
This isn't the first time this has been reported:
Both issues seem to have been closed when they shouldn't have been, which means the issue has been untracked for some time 😞 . |
@ndiego Thanks for testing and confirming the issue. I have been tracking the development of Navigation Block and related issues continuously and as per my understanding it might take longer time to get this #38275 completed. Till that time we need some kind of temporary quick-fix for Navigation Block. I hope @getdave may be the right person to suggest something on this. @talldan yes this perticular issue has been there for long time. |
I think this comment by @Addison-Stavlo has the best summary of options. I took this for a spin and sought to try and identify the Nav Submenu and place the toolbar according to it's height. This is what I ended up with Screen.Capture.on.2022-04-25.at.11-55-16.mp4It's very rough and to achieve it would require either:
I could look to refine this a little more if we feel it's heading in the right direction. |
I've been waiting for @youknowriad to land the new Popover changes. But it's a very difficult problem. I have a prototype solution in #40625 but I'd love more 👀 on it. |
Related #42010 |
Noting that this came up twice with the seventeenth call for testing with the FSE Outreach Program:
|
There is a PR in place that should fix this #43530 cc @javierarce |
Despite a PR that was merged for 14.6, the nineteenth call for testing for the FSE Outreach Program found this bug once more:
There's a video using replay.io, a new tool that allows you to see the actually environment in which an issue can be replicated. Happy to give someone access as we test this tool out to review and see what's going on :) |
Yes that issue/bug still existing, its a bit a pain specially if you editing a horizontal navigation. My workaround it is to change orientation to vertical then edit the menu that I need to update then revert back to horizontal after. :) Painful but that how it is for now... I am positive that all of the issue will be fixed in the future and wordpress will be awesome again... Yaay. |
Another option in the future will be using the offcanvas navigation if that experiment is accepted going forward for inclusion in Gutenberg Core. |
A variation of the same bug is if you have the Navigation block positioned at the top of the screen.
Kapture.2024-06-04.at.11.43.41.mp4 |
Spent some time playing with this. Mostly it's a design problem, so paging @jasmussen who's thought about all of this before. To recap, here's what things currently look like. The toolbar positions itself below the selected block (Navigation) as there isn't enough room above the Navigation block. This obscures the submenu and results in an experience that feels really broken.
I don't really like (3) as submenus can grow arbitrarily large. If we can figure out a more cohesive design for (1), I'd prefer it. If not, I prefer (2). |
Thanks for the ping, important one to solve. It's also important to solve holistically; this is presently an issue with navigation submenus. But there are endless block types plugins could create, that would cause similar issues.
This is not uniformly a solution, as it would require the frame to be at least as tall as the block toolbar itself, plus the margin, in order to fit contexts where the block goes fully edge to edge. That would come to 48+8px at the moment, which if we add that all around the canvas, it ends up a lot. Option 3 seems hard to build in a generic way that would be aware of what a custom block might be doing. But if it could be addressed in a completely generic way, it does seem to be the best practice for similar cases. Here's an example from Figjam, where the toolbar behaves in this way: Could an idea be that instead of the toolbar being aware of only the top edge of the screen, that it could be aware of that, plus the footprint of the selected block? Problably tricky, since the dropdown menu is abs-positioned, which makes it hard to calculate the height of the block. But this might otherwise have been good to combine with the "absorb toolbar" feature, which captures child block toolbars in the parent toolbar, as shown here for the list block: Option 2 could be a plan B. Lastly, we still need to enable focus mode on virtually any block, at least container blocks (#45264). This would not solve the issue specifically since you should still be able to edit navigation in visual context of the rest of the page, but it might offer an additional affordance for editing complex blocks. |
Description
Navigation toolbar overlaps on submenu links when we open sidebar settings or on smaller viewport. This makes editing or addting submneu links difficult.
Step-by-step reproduction instructions
Screenshots, screen recording, code snippet
Uploading Error Sub menu.mp4…
Environment info
WordPress - 5.9.3 on local
Gutenberg - 13.0.0
Default Theme
No other plugin or theme installed.
Browser - Chrome
Please confirm that you have searched existing issues in the repo.
Yes
Please confirm that you have tested with all plugins deactivated except Gutenberg.
Yes
The text was updated successfully, but these errors were encountered: