Repository navigation
Conversation
Low-fidelity, working prototypes for the sub-issues of #86181, behind the new `gutenberg-navigation-menu-editing` experiment. Not production code. - Task-based "+" appender for menu list views (add existing page, custom link, submenu, more), shared by the Site Editor sidebar, the extensible site editor and the Navigation block inspector. - Submenu add button shown only for the selected submenu, with the submenu's rows tinted together. - "Create submenu" in an item's options menu, offering the same choice of submenu as the add button. - Label-only submenus with their own icon and a "doesn't link anywhere" notice. - Bulk add modal, ported from the Create Not Learn prototype. - Auto menu (Page List) view, with Customize, and the Page List hidden in the canvas. - Menu locations: preview/locations toggle, remove and edit per location, choose-location modal with replace confirmation. - Custom links offer only the typed URL, not page search. - List view: `renderAppender`, `appenderParentClientIds` and `dropOnRowToNest` private props. Committed with --no-verify: new files are .js/.jsx, which fails the `gutenberg/use-typescript` and `react/jsx-filename-extension` lint rules. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Rename the menu editing prototype's new files from .js/.jsx to .ts/.tsx
so they pass `gutenberg/use-typescript` and `react/jsx-filename-extension`,
and type them, replacing JSDoc types with TypeScript ones.
block-library's build tsconfig only includes .ts/.tsx files, so the
TypeScript modules can't import the existing JS modules they use
(`navigation/constants`, `navigation-link/shared/update-attributes`,
`navigation-link/shared/use-entity-binding` and
`page-list/use-convert-to-navigation-links`). Add .d.ts declarations
beside them until those modules are converted. Also reference
`@wordpress/dataviews`, now a block-library dependency, in its tsconfigs.
The previews' `inert=""` becomes `inert={ inertValue( true ) }`, as React
19 types `inert` as a boolean and ignores an empty string.
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
- Preview shows the front of the site in the block editor canvas, with the header and footer inlined, so unsaved menu edits show as they're made. Only saved menus are editable; nothing else is written back. - A single menu's screen describes how it gets its items: Auto menu, or customized so new pages aren't added automatically. - Rename the experiment to "Navigation menu editing enhancements" and reword its description. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…aming - Preview opens on the template that shows the menu (the homepage when it does), filled with a page or post using it, with a "Shown on" switcher when several templates show the menu. - The current menu is outlined and editable, other menus are faded, and the preview scrolls to the menu. Adds a device switcher. - Explains when a menu is only in template parts no template uses. - Location cards outline the current menu and fade others when a part has more than one, and cap the preview height. - Grey background around the Preview and Locations views. - Renames the Navigation section to Menus, and its messages, behind the experiment. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
🤖 PR meta 🤖🏷️ LabelsThis pull request needs exactly one label indicating its type, and has 0.
Read more about Type labels in Gutenberg. If you cannot add labels yourself, a reviewer can do it for you. 📦 Bundle sizeSize Change: +158 kB (+1.83%) Total Size: 8.84 MB 📦 View Changed
⚡ PerformanceShow the resultsClient side metrics exclude the server response time. front-end-block-theme
front-end-classic-theme
media-processing
media-upload
post-editor
site-editor
🏁 Flaky testsSome tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information. Navigates the items list via UP/DOWN arrow keys (Site Editor v2) in
|
…ppears - Auto menu uses the WPDS EmptyState, lists its pages with page icons and a not-allowed cursor, and points to the Pages screen to add a page. - The preview's notice for menus only in unused parts names headers, footers and overlays, and links to the location chooser. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Nice work, took this for a quick spin:
There's a lot to unpack here, but let me start with the good. Most of this seems a really strong step in the right direction. I think most of this we can pare back ever so slightly, and ship in 7.3 without making it an experiment first. Mainly coming to mind, making the frame on the right that much more interactive with its top toolbar, and its navigation previews, and the whole "Not used" and "Used in 1 location" pieces. Strong stuff. I also like the much smarter plus button, though I think perhaps most of the time you'll just want to insert a page, so it's possible it could be streamlined even further. I also love the idea of auto-menus, though it wasn't clear how to get that functioning for me, let me know if something stands out. Some high level things worth deciding, with input from @WordPress/gutenberg-design. Firstly: do we put navigation stuff or not, in the left menu? I think that's pretty crucial to decide soon. I've always seen the Site Editor (with its odd duplicate "Pages" section) as a temporary thing. Perhaps it's time that the site editor is just a site editor, that it doesn't have its own bespoke left navigation? It could answer a lot of wayfinding questions that keep coming up. And it directs where this prototype puts the interactivity. An easy fix that sidesteps that question is to re-address #65828, and move navigation editing into a second column. You'd know better the implementation, but the menu picker could be a DataViews instance, and the menu editor could be the same inspector that exists for the Navigation block, its List View panel essentially. That might both improve present and future setups. The second is the role of the frame. As soon as it contains a top toolbar, it's no longer "the editor", it's now just a settings page. That's fine, but it means it shouldn't scale up on mouseover, or be resizable to preview mobile. This makes it more like a modern top level page, like Settings > Connectors, or Appearance > Fonts. Thirdly, the context for why navigation menus are called "Navigation", is that "Menus" are what you use in restaurants. I share that only as the context for the past decision to name them that, I don't share that as personal preference. I don't much care whether we call them one or the other. But if we do rename them, here's quite a few places where we have to rename them, including default menu names, navigation overlay, background controls, and so on. We may even need a different icon to the wayfinding-compass used at the moment. Overall, I like this direction. I don't think we have to overthink it. I do think we have some high level questions that are worth separating out. |
- Navigation block `noFallback` setting: removing a menu from a place leaves it with no menu instead of falling back to the newest menu. The block renders nothing on the site and offers "Choose a menu" in the editor. - "Add menu" on the menus list, with "Automatically include all new pages" ticked by default (Page List) or an empty menu. Same checkbox in the extensible site editor. - The menus list always shows, with the standard editor canvas. - No "+" appender on Auto menus in the canvas. - Synced purple notice with an inline link on the Locations view, and a readable "Shown on" template list. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Imo, no. I feel strongly that the left menu should be a navigation surface only. The extensible site editor experiment is moving in this direction which feels right to me. It also allows us to use DataViews to display menus granting access to bulk actions, filtering, and so on. I appreciate most sites don't have enough menus to make this especially useful, but some do, and there's simply value in the consistent handling of entity lists/data. |
|
Good feedback. Thanks everyone. The Create not Learn editor uses the modern "Admin UI" from WordPress Design System so the black area remains navigational. Would be trivial to update to mirror that approach.
Yes I agree. It needs a Design / UX rethink to reduce the "noise".
I appreciate it's a rough mockup but this isn't about "data" it's a very visual thing. Moreover there are likely to be only a few locations where a menu is used. DataViews seem quite complex for such a use case. That said, I'd be happy to create a variant which uses DataViews and then test which ones performs best with users. |
@jameskoster @jasmussen - Do you mean removing the Navigation List View from the left sidebar? It gets confusing talking about navigation of the site editor vs navigation editing in the sidebar 😅 I'm not attached to exactly where the navigation editing happens, but I do feel strongly about prioritizing list view editing for navigation. Navigation is easier to build and edit in a list view than on the canvas, and helps emphasize the structure of the navigation is separate from the presentation (i.e. - editing it in one place updates the content everywhere that navigation is used). @getdave - Thanks for prototyping! I was overwhelmed on the first screenI think the initial menu screen is combing too many concepts and too much text into one screen. As a new user you're asking me to understand:
I think the division of navigation menu structure and where the navigation menu appears could be better segmented. I'd remove the white bar from the top of the screen to focus on structure and presentation of that navigation, then give an easy way to move on to editing the locations (a button... somewhere :) For Auto menu + customize, we can get rid of that concept entirely by implementing auto-add pages. I think this would be a significant simplification. The "Shown on" template preview is wonderfulI love this part. Quickly previewing everywhere the menu shows? Amazing. I want this part in core three years ago. 👏🏻 Add a page flow needs work - why not a popover?
Why not just open a small modal on the navigation screen to ask me for the title and if I want it published or draft? Appender controlsI think you're right to call out that submenus should be way more obvious to build. I'm not sure about the Submenu vs Existing Page vs Custom link or the full fledged modal. I'm going to give this some more thought. Navigation Building ModalI think this modal could be super helpful for bulk-adding and building out a new menu for a power-user. I think it has a lot of potential. Instead of Pages having its own tab apart from Content, why not have Content as one tab, with Pages being the first option within that? However, isn't it a bit odd that you click "More" from the appender, then you're presented with Pages as your first option? Didn't they press "More" because they didn't want to select a page? |
As I mentioned in I'd need to be confident that it could account for backwards compatibility scenarios with existing Page List-based menus we see in the wild today. Maybe it can already? I'm mindful that what I'm trying to advocate for here is not Page List specifically but rather a solution that clearly communicates the behaviour of a Menu so that:
If we can solve for that then we're in a good place. It's harder than it sounds though!
I'm definitely willing to consider that this isn't the optimal flow. I think we need to test
...and see which does best against the criteria above. Otherwise it will just a narrow pool of core contributors guessing what works best which can't provide the level of genuine insight that we could glean from a few user tests 🙏 |
Indeed. The "dark material", the black left sidebar. I think we're both suggesting that spot is for wayfinding in wp-admin, navigating wp-admin, whereas editing a menu is not part of that. |
|
@jasmussen - ah, so it's not about the position or removing the list view editing, just reserving the black background area for navigate-ING and the white for editing.
So, the above extensible site editor view is OK. |
|
Exactly right. Navigation far left, however many columns in the canvas on the right for content. |
|
@jeryj responding to your points...
Let's focus on I'd love some input from Design on how we could refactor the screen UI to be less overwhelming whilst retaining the key functionality that is shown today.
This is another separate problem in the Editor and I didn't want to bring it into scope here. That said we could circumvent the one we have in In the longer term I'd like to see the
Needs testing but typically these are the 3 actions most builders offer to users precisely because they are the common path. For years we've tried to either
This route leans into progressive disclosure - show obvious options first and provide routes to more complex options behind a layer of intentional friction.
I'm glad you agree it's useful. The bulk add UI has been something several folks have reffered to over the years. It's actually really nice for rapidly building out menus and particular submenus. I think your comments are great and I will look into them - but feel free to push your own changes if you'd like! |
…reen With the menu editing experiment on, the dark sidebar lists the menus, the white panel lists the open menu's items under its name and actions, and the canvas shows the preview and locations. - An Auto menu's "Add a page" opens the Pages screen's new page dialog (the new page route in the extensible site editor). - Menu items share one text colour on the white panel. - The Customize dialog explains the outcome in one line. - The submenu appender uses the plus icon. - The no-menu warning takes its menu selector from the block, fixing a type check error. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the menu editing experiment on, the "Add menu items" modal's Pages and Content tabs become one Content tab, which opens out into a sub-item for each post type that can go in a menu, like a WP Admin submenu. It opens on Posts, as pages are already in the "+" menu. - Every tab shows at once, without the modal's own "More". - The search field names what it searches. - A menu's actions no longer offer "Edit", as the menu screen is where it's edited. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This has now been updated @jasmussen |
I think it's both. Whenever I see a need for filtering, (bulk) actions, pagination, etc. (all of which apply here to some extent) I default to DataViews because that's exactly what it's built for. That doesn't mean it can't primarily be a visual experience. We could create a new layout if we don't think Grid works as-is. |





Note
The ideas for this came from the Create Not Learn plugin experiment, as demoed in the menu editing part of my YouTube walkthrough. We're now turning the strongest ideas from that experiment into prototypes in Gutenberg, so we can test them with real users.
What?
See #86181
This is a working prototype of every idea in the Improving Navigation Editing in WordPress 7.3 umbrella issue, built in one branch so you can try the whole menu editing experience end to end. It covers:
The foundational issues (#65881, #45512, #61266) aren't part of this.
Everything is behind a new experiment, "Navigation menu editing enhancements", so nothing changes for anyone who doesn't turn it on. If this were ever merged, it would still be behind that experiment.
This is a prototype, so expect rough edges. It has had no production hardening and has no e2e tests, and it needs design input before any of it goes further. What it does show is how much better managing menus in the Site Editor could be. A demo video will follow.
Why?
Navigation Menus are one of the most persistent sources of confusion in the Site Editor. #86181 lays out the problems in detail, and each sub-issue has its own low-fidelity prototype from Create Not Learn. Seeing them working together in Gutenberg, in the real editor, is the quickest way to judge whether the overall experience holds up and what needs to change before we put it in front of users.
Page List vs auto-add pages
For now the prototype uses the "Auto menu" concept from #86939, where a new menu is a Page List block presented as a menu that follows your pages until you choose to customize it.
That's open for discussion. #85156 proposes replacing the default Page List with an auto-add pages setting on the Navigation block, and that's a reasonable alternative. I've built and designed this so the rest of the experience works either way, so for now the choice is an implementation detail, and the overall experience of managing menus is what I'd most like feedback on.
How?
With the experiment on, the Site Editor's Navigation section is renamed to "Menus", and the changes below apply.
Layout
Menus follow the same layout as the Pages screen. The dark sidebar is only for getting around and lists your menus. When you open a menu, its items are listed in the white panel beside it, under the menu's name and actions, and the canvas on the right shows the Preview and Locations views.
A menu's actions menu has Rename, Duplicate and Delete. "Edit" is gone, since the menu's items are already there to edit.
Adding items (#86935)
Submenus (#86938)
Auto menu (#86939)
Seeing and choosing where a menu is used (#76037)
Taking a menu out of a place
Today a Navigation block with no menu chosen shows the site's newest menu, so taking your only menu out of a header just puts it straight back. To fix that, the Navigation block gets a new
noFallbackattribute. Removing a menu from a place clears its menu and setsnoFallback, so the site renders nothing there, and the editor shows "No menu is assigned to this block" with a "Choose a menu" button. Choosing or creating a menu clears it again.Unlike the rest of the prototype, the attribute and its handling in
navigation/index.phpand the block's edit component aren't behind the experiment, though nothing sets it unless you remove a menu with the experiment on.All of this is in both the Site Editor and the extensible site editor (
routes/navigation-*), though most of my testing has been in the Site Editor. The new code lives mainly inpackages/block-library/src/navigation/menu-list-viewandpackages/block-library/src/navigation/menu-locations, shared through block-library's private APIs.Testing Instructions
Testing Instructions for Keyboard
The new menus, popovers and dialogs are built from existing components and can be used with the keyboard, but I haven't done a thorough keyboard or screen reader pass, so expect gaps.
Screenshots or screencast
A demo video will follow.
Use of AI Tools
I built this prototype with Claude Code (Claude Opus), directing and reviewing the work and testing it in the editor throughout.
🤖 Generated with Claude Code