Skip to content

Commit

Permalink
fix(perf): Prevents settings route from marking "Performance" in side…
Browse files Browse the repository at this point in the history
…bar as active (#77946)

There's a `/settings/projects/<project-slug>performance/` URL that
activates the "Performance" sidebar item because it's using an inexact
URL match. Omit Settings pages the same way other paths do this. Yucky
but works for now!
  • Loading branch information
gggritso committed Sep 23, 2024
1 parent f8cd085 commit 14db5e8
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion static/app/components/sidebar/sidebarItem.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -335,7 +335,9 @@ export function isItemActive(
location.pathname.includes('/alerts/') &&
!location.pathname.startsWith('/settings/')) ||
(item?.label === 'Releases' && location.pathname.includes('/release-thresholds/')) ||
(item?.label === 'Performance' && location.pathname.includes('/performance/'))
(item?.label === 'Performance' &&
location.pathname.includes('/performance/') &&
!location.pathname.startsWith('/settings/'))
);
}

Expand Down

0 comments on commit 14db5e8

Please sign in to comment.