-
Notifications
You must be signed in to change notification settings - Fork 4.5k
Navigation in Site View: Automatically expand all options #69343
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
Navigation in Site View: Automatically expand all options #69343
Conversation
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 If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.
To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook. |
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.
Sorry for the late reply.
I think that changing the default value of the ListView component itself isn't a good approach, as it affects all the list view.
We should be able to add isExpanded
prop here to override the default vaule:
Line 100 in e49849c
<PrivateListView |
@t-hamano Thanks for the feedbacks, I've added |
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 👍
…69343) * Navigation in Site View: Automatically expand all options * Updated ListViewComponent function doc comment * Add isExpanded prop to navigation menu content * Updates the doc comment Co-authored-by: dhruvikpatel18 <dhruvik18@git.wordpress.org> Co-authored-by: t-hamano <wildworks@git.wordpress.org> Co-authored-by: scruffian <scruffian@git.wordpress.org>
Closes #56346
What?
This PR changes the default state of navigation submenus in Site View from collapsed to expanded, making all navigation options immediately visible to users without requiring manual expansion.
Why?
When viewing the Navigation section in Site View, submenus are currently collapsed by default, requiring users to click on each section to see available options. This creates an unnecessary extra step for users trying to navigate the site structure. Having submenus expanded by default provides better discoverability and improves the overall user experience.
Testing Instructions
Screenshots or screencast
Before
Screen.Recording.2025-02-26.at.1.15.58.PM.mov
After
Screen.Recording.2025-02-27.at.2.04.14.PM.mov