From 0bc4d72ebf738ae1cfea14752f60469fd1d13b9b Mon Sep 17 00:00:00 2001 From: Karibhou Date: Tue, 27 Oct 2026 18:23:02 +0000 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix:=20keep=20the=20header's=20r?= =?UTF-8?q?ight=20chips=20from=20overlapping=20the=20title=20at=20769-900p?= =?UTF-8?q?x?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The #13173 fix pinned .oc-topbar-right to max-content only from 901px, so at 769-900px the cluster shrank to 0, its nowrap flex-end chips overflowed leftwards and the feedback/theme buttons painted over the project title. Extend the guard down to 769px (the phone block takes over below) and drop the Settings/Health/Guide labels in that band so the drawer toggle and title keep room. Fixes #13135 Hive-Run: hivecommons/hive#13135 Hive-Plan: dashboard-header-overlap Hive-Spec: dashboard-navbar#13135 Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01HRH6kizfUBgiWsEGGur6Rr Signed-off-by: Karibhou --- changelog.d/fixed-13135-header-overlap.md | 1 + .../navbar_header_overlap_13135_test.go | 26 +++++++++++++++++++ src/pkg/dashboard/static/index.html | 8 ++++-- 3 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 changelog.d/fixed-13135-header-overlap.md create mode 100644 src/pkg/dashboard/navbar_header_overlap_13135_test.go diff --git a/changelog.d/fixed-13135-header-overlap.md b/changelog.d/fixed-13135-header-overlap.md new file mode 100644 index 0000000000..1d06f6f3e6 --- /dev/null +++ b/changelog.d/fixed-13135-header-overlap.md @@ -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)). diff --git a/src/pkg/dashboard/navbar_header_overlap_13135_test.go b/src/pkg/dashboard/navbar_header_overlap_13135_test.go new file mode 100644 index 0000000000..a949f58df6 --- /dev/null +++ b/src/pkg/dashboard/navbar_header_overlap_13135_test.go @@ -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") + } +} diff --git a/src/pkg/dashboard/static/index.html b/src/pkg/dashboard/static/index.html index 80f8c20a32..dee1a4c419 100644 --- a/src/pkg/dashboard/static/index.html +++ b/src/pkg/dashboard/static/index.html @@ -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 */