Skip to content

Commit

Permalink
Fixed header highlight issue when not expanded (rancher#9710)
Browse files Browse the repository at this point in the history
  • Loading branch information
bisht-richa authored Sep 15, 2023
1 parent 67e6691 commit b25c24b
Show file tree
Hide file tree
Showing 2 changed files with 16 additions and 24 deletions.
32 changes: 16 additions & 16 deletions shell/components/nav/Group.vue
Original file line number Diff line number Diff line change
Expand Up @@ -144,7 +144,7 @@ export default {
peek($event) {
// Add active class to the current header if click on chevron icon
$event.target.parentElement.classList.remove('active');
if (this.hasActiveRoute()) {
if (this.hasActiveRoute() && this.isExpanded) {
$event.target.parentElement.classList.add('active');
}
this.isExpanded = !this.isExpanded;
Expand Down Expand Up @@ -288,38 +288,42 @@ export default {
color: var(--body-text);
user-select: none;
text-transform: none;
font-size: 16px;
font-size: 14px;
}
> A {
display: block;
padding-left: 16px;
&:hover{
text-decoration: none;
}
text-decoration: none;
}
&:focus{
outline:none;
}
> H6 {
text-transform: none;
}
}
&.active {
background-color: var(--nav-active);
}
}
.accordion {
.header {
&:hover:not(.noHover) {
background-color: var(--nav-hover);
}
&.active {
color: var(--primary-hover-text);
background-color: var(--primary-hover-bg);
h6 {
font-weight: bold;
color: var(--primary-hover-text);
}
> I {
&:hover {
background-color: var(--nav-expander-hover);
background-color: var(--primary-hover-bg);
}
}
&:hover:not(.active) {
background-color: var(--nav-hover);
}
}
}
Expand All @@ -344,10 +348,6 @@ export default {
padding: 10px 10px 9px 7px;
user-select: none;
}
&:has(> a.nuxt-link-active) {
background: var(--nav-active);
}
}
> .body {
Expand Down
8 changes: 0 additions & 8 deletions shell/layouts/default.vue
Original file line number Diff line number Diff line change
Expand Up @@ -326,14 +326,6 @@ export default {
}
}
&:has(.side-menu) {
padding-left: $app-bar-collapsed-width;
.overlay-content-mode {
left: calc(var(--nav-width) + $app-bar-collapsed-width);
}
}
&.pin-right {
grid-template-areas:
"header header header"
Expand Down

0 comments on commit b25c24b

Please sign in to comment.