Site Editor v2: Add missing menu items to navigation leaf more menu#76804
Site Editor v2: Add missing menu items to navigation leaf more menu#76804
Conversation
Add Duplicate, Add before, and Add after menu items to the navigation edit LeafMoreMenu in the extensible site editor, matching the changes from #75979. Also adds disabled states for Move up/Move down at list boundaries. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
27fbc87 to
eb22ad6
Compare
|
Size Change: 0 B Total Size: 7.66 MB ℹ️ View Unchanged
|
|
Flaky tests detected in eb22ad6. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/23531098870
|
|
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. |
Please do not invent this term 😅 |
😬 updated |
getdave
left a comment
There was a problem hiding this comment.
Worked as described when testing!
What?
Follow up to #75979
Add missing menu items to the navigation edit LeafMoreMenu in the extensible site editor (site editor v2), matching the unification done in #75979 for the v1 site editor.
Why?
PR #75979 unified the block settings dropdown menu items across list views in the current Site Editor, but the site editor v2 has its own
LeafMoreMenucomponent (routes/navigation-edit/editor/leaf-more-menu.tsx) that was not updated. This leaves the v2 navigation editor with fewer menu options than the v1 editor.How?
Updated
routes/navigation-edit/editor/leaf-more-menu.tsxto:disabled+accessibleWhenDisabledprops to Move up / Move down based on position (first/last item)useSelectto computecanDuplicate,canInsertBlock,isFirst,isLastduplicateBlocks,insertBeforeBlock,insertAfterBlockdispatch actionsTesting Instructions
Testing Instructions for Keyboard
Screenshots