-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Description
I've been exploring some ideas to integrate a preview functionality inside the Navigation Screen.
Since the menu in this editor is an abstraction, the main benefit of this feature would be to have a contextual live preview to show how the menu would look once it's published. This could be especially useful for previewing complex menus (i.e. mega-menus).
From talking with several people and reading some related issues (regarding the Customizer API and the relationship between the FSE and non-block-based themes, for instance), I understand that implementing a feature like this one could be challenging at this moment. Still, I'd like to bring the idea here to check if the general concept of a preview for menus makes sense and discuss possible solutions.
Here's the first design for this functionality to get the conversation started.
The preview could work as it currently does in the Customizer, so users could navigate to different pages of the site within this view, locate their menus, and even interact with them.
- As in the Customizer, the Theme location section in the right sidebar would update the preview window.
- There could be a divider between the menu and the preview to resize each division and reveal more content.
- Also, both areas could be independently scrollable.
If the user hasn't assigned a menu to a location, we could render a standalone preview using a navigation block with some basic styles applied.
This preview would not be 100% accurate, but it would give users a general idea of how it will look. Also, this standalone view could be rendered without the responsive toggles, as it would act as a quick preview.
Here's a related issue that addresses some of the technical aspects of this kind of preview from the Widget editor perspective. The conversation there between @celloexpressions, @noisysocks, @draganescu, and others also raises several questions and concerns that are relevant to this issue.
If the two widget interfaces ("Appearance → Widgets" and "Appearance → Customize → Widgets") don't get consolidated, and the general idea described in this issue is accepted, it could be interesting to explore a preview solution that works for both the Navigation and the Widget editor using the same design language.