frontend: prevent external-link extensions from showing as active in the sidebar#3859
Merged
patrickelectric merged 1 commit intobluerobotics:masterfrom Mar 30, 2026
Merged
Conversation
Reviewer's guide (collapsed on small PRs)Reviewer's GuideAdjusts sidebar menu item styling so external-link (new_page) entries no longer appear as active/selected while still supporting opening in a new tab. Flow diagram for sidebar menu item active styling and navigationflowchart TD
A[Start_sidebar_menu_item_render] --> B{menu_new_page}
B -- true --> C[Set_v_list_item_group_color_to_undefined]
B -- false --> D[Set_v_list_item_group_color_to_primary]
C --> E[Add_CSS_class_external-link_to_v_list_item]
D --> E
E --> F{menu_new_page_or_menu_disabled}
F -- true --> G[Set_to_null_prevent_router_navigation]
F -- false --> H[Set_to_menu_route_for_router_navigation]
E --> I{menu_new_page}
I -- true --> J[Set_target_to__blank_open_in_new_tab]
I -- false --> K[Set_target_to__self]
E --> L{menu_extension_and_not_menu_disabled}
L -- true --> M[Set_href_to_menu_route_anchor_behavior]
L -- false --> N[Set_href_to_undefined]
E --> O{v_list_item_has_class_external-link_and_is_active}
O -- true --> P[Apply_CSS_rule_opacity_0_on_active_indicator]
O -- false --> Q[Keep_default_active_indicator]
P --> R[External_link_does_not_appear_selected]
Q --> S[Internal_link_shows_active_highlight]
R --> T[End]
S --> T[End]
File-Level Changes
Assessment against linked issues
Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
There was a problem hiding this comment.
Hey - I've left some high level feedback:
- Instead of relying on a custom
.external-linkclass plus a global CSS rule with!important, consider using Vuetify’sactive-class/exact-active-classprops (or:ripple="false"and related options) on the list item to disable the active styling formenu.new_pageitems in a more idiomatic way. - The
:color="menu.new_page ? undefined : 'primary'"binding onv-list-item-groupchanges the group’s behavior based on each menu, so it’s worth confirming that this doesn’t inadvertently affect other items in the same group (you may want to handle the visual state per-item rather than on the group if multiple item types co-exist).
Prompt for AI Agents
Please address the comments from this code review:
## Overall Comments
- Instead of relying on a custom `.external-link` class plus a global CSS rule with `!important`, consider using Vuetify’s `active-class`/`exact-active-class` props (or `:ripple="false"` and related options) on the list item to disable the active styling for `menu.new_page` items in a more idiomatic way.
- The `:color="menu.new_page ? undefined : 'primary'"` binding on `v-list-item-group` changes the group’s behavior based on each menu, so it’s worth confirming that this doesn’t inadvertently affect other items in the same group (you may want to handle the visual state per-item rather than on the group if multiple item types co-exist).Help me be more useful! Please click 👍 or 👎 on each comment and I'll use the feedback to improve your reviews.
patrickelectric
approved these changes
Mar 30, 2026
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.
fix #2521
remove highlight/color if the item opens in a new tab (aka is a new_page)
Summary by Sourcery
Adjust sidebar navigation styling so external-link menu entries that open in a new tab are not shown as active.
Bug Fixes:
Enhancements: