-
Notifications
You must be signed in to change notification settings - Fork 3.2k
Enhance Nav Menu functionality: Add check for already added menu item and change font weight to normal for them #9290
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
base: trunk
Are you sure you want to change the base?
Conversation
…s and update UI accordingly
Test using WordPress PlaygroundThe changes in this pull request can previewed and tested using a WordPress Playground instance. WordPress Playground is an experimental project that creates a full WordPress instance entirely within the browser. Some things to be aware of
For more details about these limitations and more, check out the Limitations page in the WordPress Playground documentation. |
…ove in-use state handling
|
This feedback is purely visual; it's going to need to also be available to screen reader users. Perhaps by appending screen-reader-text with the text "(in current menu)" to the item. |
|
The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the Core Committers: Use this line as a base for the props when committing in SVN: To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
…eader text for already added items
|
Thanks @joedolson for the quick review 🙇 I also suggest that instead of |
|
I think the If you have an opinion, @alexstine, that would be appreciated. |
|
@AKSHAT2802 @joedolson The text "in current menu" is fine. Thanks. |
|
In testing, I found that this has a pretty strange bug - when I attempt to scroll the list of pages, most of the items disappear. I don't have time right this moment to track this down, but I wanted to mention it in a comment now, if you want to try to explore it @AKSHAT2802. To reproduce: I was testing in Firefox on MacOS. Open the customizer, going to add items to a menu. Before doing anything else, swipe on the track pad to explore the list of pages. In my test, this resulted in most items in the list disappearing. I haven't yet explored this further, yet. Additionally, the same functionality will need to be applied in both the admin menu management and in the customizer; we want to always try and keep user experience parity between those two interfaces. |
Hii @joedolson Screen.Recording.2025-09-10.at.11.46.13.PM.1.1.mov
Thanks for the feedback. As mentioned in the comment, I thought this ticket was scoped only to the Customizer → Menus section, so this PR focuses on that interface. I agree that parity should also be maintained in the Appearance → Menus screen. Could you please guide me on how we should differentiate the items there? 🙇 At the moment, items in that screen are displayed in normal font weight by default. |
|
I'd say that the comment that suggests that ticket was about the customizer was actually wrong; based on the original reporter, I'd say that the ticket was about the admin menu manager. Regardless, I generally prefer to do both at the same time, to ensure that we're keeping the two interfaces in sync. Re: differentiating on appearance. I actually don't think we should use font weight to do this in either menu. To me, it's not very clear. For the admin menu management, where there are checkboxes in use, perhaps we can use the same mechanism that the bulk editor uses for managing categories? It uses an indeterminate state for checkboxes. See https://core.trac.wordpress.org/changeset/57580 for how that was done. For the customizer, there's an existing "selected" state added by the class |
Trac ticket: https://core.trac.wordpress.org/ticket/49876
This PR improves the clarity of available menu items in the WordPress Customizer by visually differentiating which items are already added to the current menu. The styling is reversed from typical patterns — unused items are emphasised in bold, while in-use items appear with normal font weight
Benefits: