Skip to content
Merged
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-13135-header-overlap.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
- The dashboard header's feedback, theme and other right-hand buttons no longer overlap the project title or ACMM badge at window widths between 769px and 900px; those widths now show icon-only Settings, Health and Guide chips ([#13135](https://github.com/hivecommons/hive/issues/13135)).
26 changes: 26 additions & 0 deletions src/pkg/dashboard/navbar_header_overlap_13135_test.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
package dashboard

import (
"strings"
"testing"
)

// TestNavbarRightClusterCannotSpillOverTitle guards #13135: between the
// phone block (≀768px) and 1400px the right chip cluster must keep its
// max-content width, otherwise its flex-end overflow paints the feedback and
// theme buttons over the ACMM badge or project title.
func TestNavbarRightClusterCannotSpillOverTitle(t *testing.T) {
html := indexHTML(t)
for _, want := range []string{
"@media (min-width: 769px) and (max-width: 1400px) {\n .oc-topbar-right { min-width: max-content; }",
"@media (min-width: 769px) and (max-width: 900px) {\n #acmm-badge { display: none; }",
"#welcome-topbar-btn .nav-chip__label { display: none; }\n }",
} {
if !strings.Contains(html, want) {
t.Fatalf("navbar #13135 overlap guard missing %q", want)
}
}
if strings.Contains(html, "@media (min-width: 901px) and (max-width: 1400px) {\n .oc-topbar-right") {
t.Fatal("right cluster min-width guard must also cover 769-900px, where the dashboard was still overlapping")
}
}
8 changes: 6 additions & 2 deletions src/pkg/dashboard/static/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -557,13 +557,17 @@
.oc-topbar-right .widget-dl { margin-left: var(--sp-0); margin-right: var(--sp-0); }
}

/* Right chip cluster keeps its full width so it cannot shrink and spill over the left ACMM badge (#13135); the left/center tracks absorb the squeeze. */
@media (min-width: 901px) and (max-width: 1400px) {
/* Right chip cluster keeps its full width so it cannot shrink and spill over the left ACMM badge or project title (#13135); the left/center tracks absorb the squeeze. Starts at 769px because the ≀768px block clips the cluster instead. */
@media (min-width: 769px) and (max-width: 1400px) {
.oc-topbar-right { min-width: max-content; }
}

/* Icon-only chips here so the full-width right cluster still leaves room for the drawer toggle and title (#13135). */
@media (min-width: 769px) and (max-width: 900px) {
#acmm-badge { display: none; }
.oc-health-badge .nav-chip__label,
#oc-settings-btn .nav-chip__label,
#welcome-topbar-btn .nav-chip__label { display: none; }
}

/* Light main content area */
Expand Down
Loading