-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
Reuse BlockControls in block navigation ellipsis menu #22462
Conversation
Size Change: +531 B (0%) Total Size: 1.11 MB
ℹ️ View Unchanged
|
This looks like a really promising first iteration 👍 . There are a few challenges I noticed when testing. One is that when choosing an option like Remove Block or Duplicate, focus is transferred outside of the block navigation to the block list itself. That seems like it would be confusing for those who rely on keyboard navigation and might want to perform further actions in the block navigation. I think the block selection logic is built into the action that's dispatched when removing or duplicating, so I wonder what the best way to uncouple that would be. There also seems to be an error thrown when opening the menu using the keyboard, something somewhere is unexpectedly undefined. |
f1ee8c2
to
30cdfaa
Compare
@talldan all good notes 👍 I'll address the focus issue in a separate PR. Let's tackle it bit by bit, I propose the following sequence for the core changes:
And spinning parallel PRs for improvements like focus or overflowing ellipsis button |
The concept of the navigator ellipsis menu keeps evolving. This PR is stale and may not be needed after all. I'm closing it for now, and we can always revive it later after all. |
Description
This PR is a Proof of Concept of reusing the existing block controls from edit.js in the block navigation ellipsis menu.
This PR introduces the idea of
<UniversalBlockControls />
(name to be changed) component that accepts controls groups and buttons, and knows how to apply them in different contexts. For the purposes of this Proof of Concept, it's the block toolbar and the navigation ellipsis menu. Maybe the could would be better if we could passed a prop with an object describing the menus we want to get in the end instead of children?This is a part of a sequence of few PRs. I propose merging/reviewing these PRs in the following order:
1. #22427 - introduce very basic ellipsis menu to the block navigationHow has this been tested?
Screenshots
Types of changes
Checklist: