-
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
Ensure appropriate fallback menu title in Nav block menu selector #47073
Conversation
Size Change: +289 B (0%) Total Size: 1.33 MB
ℹ️ View Unchanged
|
Flaky tests detected in 2c18a4d. 🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/3904340279
|
packages/block-library/src/navigation/edit/navigation-menu-selector.js
Outdated
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
What?
Ensures all menus in the Nav block menu selector have a name.
Closes #47060
Why?
It's possible for a given menu(s) to not have a
title
property (i.e. one which is an empty string). In this case we currently display nothing in the dropdown (see Issue).This needs to be fixed to allow the user to switch between menus.
How?
Checks for title and if missing provides a suitable fallback with an appropriate index to distinguish between them if there are mutliple untitled menus.
Testing Instructions
Untitled menu %%index%%
for each of the untitled menus.Testing Instructions for Keyboard
Screenshots or screencast