Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions changelog.d/fixed-16690.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The drawer toggle's visible "Navigation" label no longer hides at phone widths (≀600px). The drawer toggle inherited the `.nav-chip--action` class intended for other action chips, which were configured to hide their labels on narrow screens; the fix exempts `#oc-drawer-toggle` from that rule ([#16690](https://github.com/hivecommons/hive/issues/16690)).
15 changes: 15 additions & 0 deletions src/pkg/dashboard/navbar_chip_consistency_test.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
package dashboard

import (
"os"
"regexp"
"strings"
"testing"
Expand Down Expand Up @@ -204,3 +205,17 @@ func TestNavbarRemovedChipSpecificMetricOverrides(t *testing.T) {
}
}
}

func TestDrawerToggleLabelVisibleAtPhoneWidths(t *testing.T) {
css, err := os.ReadFile("static-src/css/agent-detail.css")
if err != nil {
t.Fatalf("reading agent-detail.css: %v", err)
}
cssStr := string(css)

// The rule that hides labels for .nav-chip--action must exempt #oc-drawer-toggle
// at phone widths (max-width: 600px) so the Navigation label remains visible.
if !strings.Contains(cssStr, `.oc-topbar .nav-chip--action:not(#oc-drawer-toggle) .nav-chip__label`) {
t.Error("agent-detail.css is missing :not(#oc-drawer-toggle) exemption; drawer toggle label would be hidden at phone widths")
}
}
2 changes: 1 addition & 1 deletion src/pkg/dashboard/static-src/css/agent-detail.css
Original file line number Diff line number Diff line change
Expand Up @@ -330,7 +330,7 @@
.oc-topbar-right { grid-column: auto; flex-wrap: wrap; }
.widget-dl { display: none; }
#oc-project-name { display: none; }
.oc-topbar .nav-chip--action .nav-chip__label,
.oc-topbar .nav-chip--action:not(#oc-drawer-toggle) .nav-chip__label,
.oc-topbar .nav-chip--primary .nav-chip__label { display: none; }
/* keep the pill one line so the right group wraps as a unit
instead of being clipped at the viewport edge */
Expand Down
2 changes: 1 addition & 1 deletion src/pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -929,7 +929,7 @@
.oc-topbar-right { grid-column: auto; flex-wrap: wrap; }
.widget-dl { display: none; }
#oc-project-name { display: none; }
.oc-topbar .nav-chip--action .nav-chip__label,
.oc-topbar .nav-chip--action:not(#oc-drawer-toggle) .nav-chip__label,
.oc-topbar .nav-chip--primary .nav-chip__label { display: none; }
/* keep the pill one line so the right group wraps as a unit
instead of being clipped at the viewport edge */
Expand Down
Loading