-
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
Try: use ariakit
for DropdownMenu v2, test it in block editor settings
#54612
Conversation
Size Change: +4.03 kB (0%) Total Size: 1.63 MB
ℹ️ View Unchanged
|
Flaky tests detected in 967bb13. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/6313340010
|
7298894
to
b5f168b
Compare
Good news! After the latest Here's a quick video highlighting a nested dropdown menu across slotfills. Clicking on the nested items correctly opens our first-party modal. Focus is handled correctly too. Kapture.2023-09-26.at.12.15.36.mp4 |
I'll start pulling out some updates from this PR and land them individually, starting from updating |
@diegohaz it would be great to have your eyes on the code in this PR, to make sure that the overall approach is correct (especially around using a custom react context to pass the store around the components, so that we can leverage it also in slot fills) |
a2a1939
to
967bb13
Compare
Where does focus return to when the modal is closed? It looks like the submenu collapses when you click on "Create pattern", so I'm guessing not there! Not a big thing right now, but something to think about as we progress. |
Good point! The video is outdated though, the problem should have been solved by this commit |
Closing this PR as it only served as a quick way to check ariakit's compatibility with some aspects of the editor. Please follow #50459 for updates related to the next version of |
What?
This PR aims at investigating if
ariakit
'sMenu
can handle all edge cases that were flagged while working on theradix-ui
version (see #51400)Why?
We want to provide a new version of
DropdownMenu
, supporting (among other things) nested submenus.How?
Things to look for:
Modal
component, command palette, any browser extensions like GTranslate)<a />
) as menu itemsTesting Instructions
Testing Instructions for Keyboard
Screenshots or screencast