Lo-Fi Prototype for Site Editor V2 Navigation Editing#76557
Lo-Fi Prototype for Site Editor V2 Navigation Editing#76557
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
- Use getBlockLibraryApis() to access both NavigationLinkUI and NavigationLinkControls at render time (runtime window lookup) - NavigationLinkUI handles the appender/new-link flow via additionalBlockContent - NavigationLinkControls + Popover handles clicking an existing link to edit it - handleSelect opens the edit popover for blocks with a URL, falls through to offCanvasOnselect for blocks without one Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Default previewSize to max (430) so previews start full-width - Wrap DataViews in a div that adds --full-width modifier when at max - Override dataviews-view-grid__row grid-template-columns to 1fr - Remove aspect-ratio: 1/1 and forced height from grid media so previews shrink to fit their content height (e.g. a header template part shows as a thin strip, not a tall square) - Cap with max-height: 300px to prevent very tall templates overflowing Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
… editor Reverts all edit-site and block-library changes that were introduced by earlier cherry-picks but belong only in the routes module. The default (trunk) navigation experience is now unchanged. Deleted files are leftover from cherry-picks: - navigation-menu-detail.js - navigation-menu-template-areas.js - use-navigation-menus-used-in.js Adds an optional `isContentOnly` prop to the shared `Controls` component so callers can override the store-derived blockEditingMode check without side effects on existing usages. The v2 extensible editor passes `isContentOnly` to hide description and rel fields by default in the link edit popover, matching the trunk navigation editor behaviour. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
|
Warning: Type of PR label mismatch To merge this PR, it requires exactly 1 label indicating the type of PR. Other labels are optional and not being checked here.
Read more about Type labels in Gutenberg. Don't worry if you don't have the required permissions to add labels; the PR reviewer should be able to help with the task. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message. To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
|
Size Change: +183 B (0%) Total Size: 7.69 MB
ℹ️ View Unchanged
|
…one navigation route
Remove stale references to routes/navigation-edit and routes/navigation-list which were combined into routes/navigation. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show "Navigation / [Menu Name]" breadcrumbs instead of a back arrow button when editing a navigation menu. The "Navigation" link navigates back to the menu list. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use the same font-size, weight, family, line-height, and color as the Page component's header title so the breadcrumbs blend with the section. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This reverts commit f77292e.
Target all link states (default, visited, hover, focus) to override browser/WordPress default blue link color. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Replace the Button component (variant="link") with a plain <button> element and use `all: unset` to fully reset browser styles, ensuring the text color inherits from the parent breadcrumb container. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When editing a navigation menu, the breadcrumb now shows a three-dots menu next to the menu name with Trash, Duplicate, and Rename actions. The Edit action is excluded since we're already in an edit context. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
- Filter by action.id 'edit' (not 'edit-navigation') to actually hide the edit action in the breadcrumb menu - Use margin-left: auto to push the kebab to the right of the panel Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Make the breadcrumb kebab menu right-aligned by expanding the header's nested flex containers. Navigate back to navigation list after trashing a menu, and to the edit screen for newly duplicated menus. Fix invalid design system tokens and merge duplicate imports. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
When a navigation menu isn't used in any template parts, show a message with an "Add to template part" button. The modal shows template part previews with checkboxes; applying updates the first navigation block's ref in selected parts. The preview area reactively updates by reading pending entity edits for template part matching. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
…dy-used parts Move the "Add to template part" button next to the dropdown so it's always visible. Filter out template parts that already reference the current navigation menu from the modal. Read pending entity edits so the preview updates immediately after assigning a menu. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Read edited entity content (pending unsaved edits) for template parts so the preview area immediately reflects the new navigation ref after applying from the "Add to template part" modal. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Use a max-height on the scroll area so the footer with Cancel/Apply buttons stays visible without needing to scroll to the bottom. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Show the "Create page" button for navigation links without a type (new/custom links), not just page-type links. Also guard against undefined content being passed to parse() in template part previews. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
What?
Explores designs from #76037, based off prototype explorations from #75791, #75957 and #76412
Why?
How?
Testing Instructions
Testing Instructions for Keyboard
Screenshots or screencast
Screen.Recording.2026-03-18.at.1.28.50.PM.mov
Use of AI Tools
Prototyped with Claude