Closed bph closed 4 months ago
I think this one got approved a little ahead of what I was prepared for. I'd still like for us to continue the discussion around code solutions in this ticket.
I know that this is possible since I've seen a couple of implementations, but I also don't know how to approach it. Yet.
Following up on our Twitter exchange, I'd love to help progress this in any way I can. I've been trying on and off for a few months to find a solution to more complicated menus in block themes, but have so far come up short.
I recently did some research on menu implementations around larger sites and put together a Figma file with my findings.
It feels like the core problem is the lack of flexibility to include more block types within a submenu, as its very restrictive at the moment. The ability to include columns for example would be good.
I think the menu block in general is too focused on one style of (simple) navigation, but that's likely a seperate issue. If I can provide any further information that may help then let me know.
Thanks, @brettsmason. That's very helpful feedback. I've got an idea or two that I want to test out, but those will have to wait until at least next week.
Tested out an idea with the upcoming allowedBlocks
filter: https://make.wordpress.org/core/2024/01/31/whats-new-in-gutenberg-17-6-31-january/
Early idea shared in a video here: https://twitter.com/justintadlock/status/1753593003266932887
This one is ready for its second review, thanks @bjmcsherry for doing the first review. https://docs.google.com/document/d/1SHHlMjQ-alxx1ijpoZCZ1qDMxFhHhqO1IgP4kzF8I1w/edit
@ndiego - Really great work here! 🚢 when ready.
This tutorial has been published: https://developer.wordpress.org/news/2024/02/29/an-introduction-to-block-based-mega-menus/
Social copy
Mega menus are one of the most commonly requested features for block themes. Learn how to build your own custom Mega Menu block using new features coming in WordPress 6.5, like the Interactivity API.
https://developer.wordpress.org/news/2024/02/29/an-introduction-to-block-based-mega-menus/
Discussed in https://github.com/WordPress/developer-blog-content/discussions/182