Uh oh!
There was an error while loading. Please reload this page.
[6.x] Support expanding/collapsing CP subnavs in the sidebar - #12169
[6.x] Support expanding/collapsing CP subnavs in the sidebar#12169godismyjudge95 wants to merge 6 commits into
Conversation
godismyjudge95
commented
Aug 25, 2025
Added missing Aria attributes but one of them was a the |
jackmcdade
commented
Aug 26, 2025
I'm pretty on the fence about this, just want to be up front. That nav lazy loading is important for performance because of the potential for a lot of permission checks, especially with addons installed. It's not just a throwaway thing. Also, it still ends up being the same number of clicks to get to the subpages, you're just saving the page refresh. 🤔 |
godismyjudge95
commented
Aug 26, 2025
Can the permission checks themselves be cached better? I think there should be a way for the nav items/permissions to be initialized once per user and then you'd just have to check/change what the current page is. I'd be happy to look into that. Also, the saving a page refresh is actually a real UX improvement - especially for clients that are still finding their way around the CP or have a slow internet connection. |
andjsch
commented
Sep 4, 2025
@godismyjudge95 I think this might help now: #12258 |
godismyjudge95
commented
Oct 1, 2025
If Inertia gets merged - #12610 |
jasonvarga
commented
Oct 2, 2025
Thanks for the PR. Since Inertia changes the entire nav, this PR would need to be rewritten anyway. We can revisit after Inertia. |
This PR adds the ability to expand and collapse CP subnavs in the sidebar without navigating to the parent page. It also adds the ability to expand the subnav on hover by holding down shift while hovering - requiring no clicks.
Note, the tests modified are due to the removal of the line from NavBuilder to resolve all the children of the nav items on each load. This effectively reverts the functionality of lazy loading CP nav children added in this commit - 5574b28
I don't believe this will cause a huge performance hit in the backend because CP navs should be small enough for it to not matter but I could be wrong?