-
Notifications
You must be signed in to change notification settings - Fork 4.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Allow explicitly specifying additional block navigation menu options in block edit function #22463
Conversation
Size Change: +157 B (0%) Total Size: 1.12 MB
ℹ️ View Unchanged
|
f1ee8c2
to
30cdfaa
Compare
975a416
to
7f6e166
Compare
7f6e166
to
afff954
Compare
packages/block-editor/src/components/block-settings-menu/block-settings-dropdown.js
Show resolved
Hide resolved
I replied to #22427 (comment) as well, but will iterate here, if we're reusing the stuff that is in the Block Settings menu, that has it's own slots, can't we reuse that and not add another slot/fill? I think what we do in this navigator will find its way to the rest of the editor, and in that context I expect that what is in the block's ellipsis menu is also in the navigator item's ellipsis menu, as the item is a smaller representation of the block itself in the hierarchy. If this menu has a different slot/fill there will be things stuck here but not in blocks :) |
6db8d97
to
2f17041
Compare
If we did reuse that, then both the navigation menu AND the toolbar menu would contain the extra options. I introduced a new slot to make sure this does not happen. If you think it would make sense, then let's discuss it in the original issue: #22089 My thinking is that the navigation menu should contain the items from the block toolbar menu PLUS more options to represent all the toolbar actions such as "Set link". This PR is the first step towards that, and ideally the next one will remove the need to separately declare toolbar controls and menu controls.
It's not a bug, it's a feature :-) |
Closing this one - let's discuss the approach from #22674 instead. |
Description
This PR is a Proof of Concept of explicitly specifying per-block ellipsis menu items in the edit.js file.
This is a part of a sequence of few PRs. I propose merging/reviewing these PRs in the following order:
Ellipsis menu in block navigator #22427 - introduce very basic ellipsis menu to the block navigationHow has this been tested?
Note that adding a submenu transfer focus to the Navigation menu page - this is something I am looking forward to addressing in a separate PR once the slot mechanics from this PR are in place.
Screenshots
Types of changes
New feature (non-breaking change which adds functionality)