-
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
Migrate block options menu to DropdownMenu v2 and use flyout menus to re-organise actions #49271
Comments
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
Left some feedback on the linked PR.
I am not sure this discussion needs to happen over delete blocks or the entire toolbar itself. Likely the toolbar. That way we can provide some type of description on the toolbar to let users know the controls apply to the selected blocks. Might be good for a follow-up PR since all of this is being discussed currently. |
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
This comment was marked as outdated.
In all, we're a bit in the weeds—but forward progress; love it. The big blocker here is the flyout type component. @alexstine what are your thoughts on flyouts (or submenus) in this use case. Do you have examples, or other libraries, that leverage accessible submenus in UI well? Like the Radix DropdownMenu component for example. |
I don't think we do. |
I am not familiar with any 3rd party libraries that have out of the box accessible components. Most React/Vue libraries are junk for accessibility. Any reason we're not going to develop this in wordpress/components? Happy to check any examples but I will set expectations now. Thanks. |
Likely will, though I would like to start off with good examples to work from if possible. |
@richtabor I am having a really hard time coming up with any ARIA specifications for flyout menus. If it helps, the flyout menu for Google Drive is perfectly accessible. Other than that, I think we'll have to just see what works. I am kind of interested to see if there are any accessible examples out there but I am coming up empty. @joedolson You know of any good material on this? Thanks. |
I've updated the design in the OP based on discussion, and will mark comments as outdated. Agree the design is in a decent place as a starting point. The one detail missing is whether or not we still need the Select parent action. I think it predates both List View and the dedicated parent selector affordance, which both feel like more convenient ways to select the direct ancestor, hence the removal. What do y'all think? |
@jameskoster Where is the dedicated select parent located? |
We are indeed looking into adding support for nested dropdown menus, but as @richtabor also explained, it's good to start exploring our usecases and let that help us to make the right decisions. It's very likely that we'll resort to a third party library, since this pattern is quite complex and difficult to get right, and there's no need for us to reinvent the wheel. Hopefully we'll find a good solution that is accessible, fits our needs, and at the same time works with all the constraints of the editor (the biggest one that comes to mind is syncing position updates across the iframe). I hope we'll be able to share updates within the upcoming weeks. |
Oh, the iFrame. That will be interesting for sure. Still having a really hard time getting basic functionality to work in it across all screen readers. See #47767 for more context. I urge us all to really take our time in testing. I am a screen reader user and not testing on both platforms came back to haunt me there. |
@alexstine it's the first item in the block toolbar, titled 'Select [block name]'. |
@jameskoster Awesome. No need to keep it in the more menu then. |
Here's another use case for supporting nested dropdowns: #40208 |
@ciampo do we have/need an issue separate for the nested dropdown? And is there an update on that front perhaps? Thanks! |
We didn't, but I just created one: #50459
I plan on releasing a very experimental, initial version of the component in the next days. It will still need tweaking and lots of testing in the editor, but hopefully we'll get there quickly enough |
Very cool! |
Where are we on this? |
The proposed organisation is still welcome to feedback. DropdownMenu v2 is available (providing access to flyout menus) so I think this is ready for a PR. |
|
What problem does this address?
We've added a lot of items to the block options menu. It's become a bit unwieldy and it's not uncommon to encounter a scrollbar which buries frequent actions:
options.mp4
What is your proposed solution?
Adopt DropdownMenu v2 and utilise flyouts to reduce its initial footprint and better organise actions.
The text was updated successfully, but these errors were encountered: