Fix issue with side nav losing highlight for some routes - #18497
Merged
rak-phillip merged 3 commits intoJul 30, 2026
Conversation
rak-phillip
requested review from
aalves08,
codyrancher,
eva-vashkevich and
marcelofukumoto
July 24, 2026 21:43
Member
marcelofukumoto
left a comment
Member
There was a problem hiding this comment.
Some questions and Nit
From my automated and manual tests it seems good.
Member
|
@rak-phillip seems to be working as claimed, even with the new product registration API. Just missing Marcelo's comments. |
`navResources` allows any given nav item to specify resource types that it owns, but does not link to directly. For example, the create page of a resource might not have a nav entry of its own. When specified, these routes will ensure that the proper side nav item is highlighted when active. Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
This moves `isActive()` logic into router utils and adds logic for route claims and exact route matching. Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
rak-phillip
force-pushed
the
fix/#18495-side-nav-highlight
branch
from
July 29, 2026 20:39
567e50b to
3ea17d3
Compare
Signed-off-by: Phillip Rak <rak.phillip@gmail.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.




Summary
This resolves an issue where some routes would lose their highlight and would collapse the containing group when active.
Fixes #18495
Occurred changes and/or fixed issues
navResourcesoption totype-mapisActive()logic into router utilsTechnical notes summary
Two issues were identified during triage:
/c/local/explorer/projectsnamespaces, but creating a Project has an active route of/c/local/explorer/management.cattle.io.project/create#members. The create pages will never match a nav entry in this event.exact: truespecified. In these cases, the list route is/c/_/manager/kontainerDriverand the create route is/c/_/manager/kontainerDriver/create. The create page is a direct child of, but will never match the nav item because it requires an exact route match to be marked as active.Areas or cases that should be tested
The affected areas were identified during triage:
Areas which could experience regressions
Changing exact to false for existing types could impact some behavior elsewhere. I wasn't able to identify where this could be problematic, but I think that we should be cautious of the change.
Screenshot/Video
Create Namespace
Before
After
Create Cluster Driver
Before
After
Checklist
Admin,Standard UserandUser Base