Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 27, 2025

Summary

Fixes #15551

Resource Type Search dialog (Ctrl+K) was incorrectly highlighting the current location. The search dialog is for navigation, not for showing current state.

Occurred changes and/or fixed issues

  • Added highlightRoute prop to Type.vue and Group.vue components
  • SearchDialog.vue now passes highlightRoute="false" to disable highlighting
  • Visual classes, TabTitle, and aria-current all respect the new prop

Technical notes summary

New highlightRoute prop (default: true) controls:

  • router-link-active / router-link-exact-active classes
  • group-highlight / active classes on groups
  • TabTitle component rendering
  • aria-current="page" attribute

Side navigation behavior unchanged (default true). Only search dialog explicitly disables.

Areas or cases that should be tested

  1. Open Resource Type Search (Ctrl+K) - current location should NOT be highlighted
  2. Side navigation - current location should still be highlighted
  3. Navigate via search dialog - verify navigation works correctly
  4. Test in both light and dark mode

Local testing: Chrome

Areas which could experience regressions

  • Side navigation highlighting
  • Group expansion/collapse behavior
  • Keyboard navigation in search dialog

Screenshot/Video

Before (left) vs After (right):
image

Checklist

  • The PR is linked to an issue and the linked issue has a Milestone, or no issue is needed
  • The PR has a Milestone
  • The PR template has been filled out
  • The PR has been self reviewed
  • The PR has a reviewer assigned
  • The PR has automated tests or clear instructions for manual tests and the linked issue has appropriate QA labels, or tests are not needed
  • The PR has reviewed with UX and tested in light and dark mode, or there are no UX changes
  • The PR has been reviewed in terms of Accessibility
  • The PR has considered, and if applicable tested with, the three Global Roles Admin, Standard User and User Base

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • download.cypress.io
    • Triggering command: /usr/local/bin/node /usr/local/bin/node index.js --exec install (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Original prompt

This section details on the original issue you should resolve

<issue_title>Resource search highlights the current location</issue_title>
<issue_description><!--------- For bugs and general issues --------->
Setup

  • Rancher version: Rancher Head
  • Rancher UI Extensions: NA
  • Browser type & version: Firefox & Chrome

Describe the bug

Resource search (uses same component i think as side nav, or at least same input) highlights the current location

Originally posted by @richard-cox in #15256 (review)

To Reproduce

  1. Navigate to local cluster
  2. Open Resource Type Search (ctrl+k)

Result

Expected Result

Screenshots

Image

Additional context

See comment:

#15256 (review)
</issue_description>

Comments on the Issue (you are @copilot in this section)

@rak-phillip This is existing behavior and unrelated to the themes change.

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI and others added 2 commits November 27, 2025 14:32
Added highlightRoute prop to Type.vue and Group.vue components.
Set highlightRoute=false in SearchDialog.vue to prevent highlighting
the current route in the resource type search modal.

Co-authored-by: nwmac <[email protected]>
…rent

- Updated TabTitle condition to only render when highlightRoute is true
- Updated aria-current attribute to only be set when highlightRoute is true

Co-authored-by: nwmac <[email protected]>
Copilot AI changed the title [WIP] Fix resource search highlighting current location Fix: Resource search no longer highlights current location Nov 27, 2025
Copilot AI requested a review from nwmac November 27, 2025 14:39
@nwmac nwmac added this to the v2.14.0 milestone Nov 27, 2025
@nwmac nwmac marked this pull request as ready for review November 27, 2025 14:53
Copy link
Member

@nwmac nwmac left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@nwmac nwmac requested a review from richard-cox November 27, 2025 14:54
@nwmac nwmac merged commit e2830cf into master Dec 12, 2025
42 of 51 checks passed
@nwmac nwmac deleted the copilot/fix-resource-search-highlighting branch December 12, 2025 13:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Resource search highlights the current location

3 participants