Prototype: Navigation editing with drill-down UI in Extensible Site Editor#75957
Closed
Prototype: Navigation editing with drill-down UI in Extensible Site Editor#75957
Conversation
Template parts use string IDs (slugs like 'twentytwentyfive//footer') rather than numeric IDs. The post-edit route was only handling numeric IDs, causing 404s when navigating to edit template parts.
…vigation edit Adapted from Jerry's PR #75791 approach, but with render-time unlock instead of module-level unlock because wp-block-library is loaded lazily via useEditorAssets() in the Extensible Site Editor. - Access block-library private APIs via window.wp.blockLibrary.privateApis at render time - Add NavigationLinkControls + Popover for editing existing navigation links - Keep AdditionalBlockContent + LinkUI for newly inserted blocks - Remove file-copying workaround in favor of proper private API usage
Replace breadcrumbs with title containing back button and menu name. Adds subtitle for editing context.
- Add Badge component to show "Active (X locations)" or "Inactive" status - Create useNavigationStatus hook to count template part usage per menu - Preload template parts and fallback navigation in route loader - Display badges inline with navigation menu titles in list view
|
Size Change: +1.95 kB (+0.03%) Total Size: 6.84 MB
ℹ️ View Unchanged
|
Contributor
Author
|
Closing in favour of iterations in #76557 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
This is a prototype implementation exploring an improved navigation editing experience in the Extensible Site Editor. The PR introduces:
Note: This is a prototype for design feedback and is not production-ready code.
Why
This prototype explores a navigation UX that more closely mirrors the Styles section behavior, allowing users to:
How
Built on top of Jerry Jones's excellent work in #75791, this implementation uses the Extensible Site Editor route system to:
/navigation/edit/$idroute with custom Stage and Canvas componentsTesting Instructions
Enable the experiment:
Navigate to the new Site Editor (URL:
admin.php?page=site-editor-v2)Click "Navigation" in the sidebar
Observe the navigation list with active status badges:
Click "Edit" on any navigation menu
In the Stage (middle panel):
In the Canvas (right panel):
Credits
This prototype builds directly on the excellent work by @jeryj in #75791.