Vue3: Fixed navigation active style not applied #12015
Merged
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
Fixes #11904
In Vue 3, isActive behavior has changed:
https://router.vuejs.org/guide/essentials/active-links#When-are-links-active-
https://v3.router.vuejs.org/api/#active-class
Created computed property that matches old behavior to use instead of router's isActive.
Note: If you navigate to workloads, close group tab and re-open it again, 'Workload' tab is not highlighted. This is unrelated to Vue3 migration and can be reproduced on 2.9. It is not part of this fix and we might want to address it in the future.
Occurred changes and/or fixed issues
Changed behavior to match Vue2
Technical notes summary
Areas or cases that should be tested
Areas which could experience regressions
Side bar navigation
Screenshot/Video
Screen.Recording.2024-09-25.at.11.02.53.AM.mov
Checklist