From a26386895f5720ed444e49b0b9982f4468572186 Mon Sep 17 00:00:00 2001 From: archvillainette Date: Fri, 26 Jun 2026 16:59:08 +0000 Subject: [PATCH] fix top bar bubbles (#9) Reviewed-on: https://git.westgate.pw/ShadowsOverWestgate/sow-nodebb-theme/pulls/9 --- AGENTS.md | 1 + scss/westgate/_topbar.scss | 2 +- tests/global-topbar-contract.test.js | 5 +++++ 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/AGENTS.md b/AGENTS.md index fd29b0a..a62b015 100644 --- a/AGENTS.md +++ b/AGENTS.md @@ -33,6 +33,7 @@ Follow the current NodeBB theme model: - Template overrides belong under `templates/` and must preserve the same relative path as the Harmony template they replace. - Do not copy or redefine Harmony templates unless an actual override is needed. - If a template does not exist here, NodeBB inherits it from the configured base theme. +- In the Westgate topbar, notification, chat, draft, and navigation count bubbles must honor NodeBB/Harmony's `hidden` class and only display when there is an actual count to check. NodeBB theme documentation: https://docs.nodebb.org/development/themes/ diff --git a/scss/westgate/_topbar.scss b/scss/westgate/_topbar.scss index 5698289..dda42c2 100644 --- a/scss/westgate/_topbar.scss +++ b/scss/westgate/_topbar.scss @@ -149,7 +149,7 @@ $wg-topbar-panel-bg: linear-gradient( color: #fff0dc; } -.wg-topbar__utility-list .visible-closed { +.wg-topbar__utility-list .visible-closed:not(.hidden) { display: inline-block !important; } diff --git a/tests/global-topbar-contract.test.js b/tests/global-topbar-contract.test.js index 27a8f27..0f31f82 100644 --- a/tests/global-topbar-contract.test.js +++ b/tests/global-topbar-contract.test.js @@ -74,6 +74,11 @@ assertIncludes( '.wg-topbar', 'Topbar styles should be scoped to .wg-topbar' ); +assertIncludes( + stylesheet, + '.wg-topbar__utility-list .visible-closed:not(.hidden)', + 'Topbar collapsed utility labels should not override hidden count badges' +); assertIncludes( client, 'initWestgateTopbar',