docs: capture topbar refinements
This commit is contained in:
@@ -0,0 +1,74 @@
|
|||||||
|
# Global Topbar Refinements Implementation Plan
|
||||||
|
|
||||||
|
> **For agentic workers:** REQUIRED SUB-SKILL: Use superpowers:subagent-driven-development (recommended) or superpowers:executing-plans to implement this plan task-by-task. Steps use checkbox (`- [ ]`) syntax for tracking.
|
||||||
|
|
||||||
|
**Goal:** Apply the post-review global topbar refinements from `docs/superpowers/specs/2026-06-26-global-topbar-design.md`.
|
||||||
|
|
||||||
|
**Architecture:** Keep the implementation inside the existing NodeBB child theme topbar partial, topbar SCSS partial, and theme client bundle. Extend the existing static topbar contract test so the refinements are pinned without adding a new test harness.
|
||||||
|
|
||||||
|
**Tech Stack:** Node.js built-in test runner, NodeBB templates, SCSS.
|
||||||
|
|
||||||
|
## Global Constraints
|
||||||
|
|
||||||
|
- Keep this as a child theme over `nodebb-theme-harmony`.
|
||||||
|
- Keep `theme.scss` imports-only.
|
||||||
|
- Put substantive Westgate-specific topbar CSS under `scss/westgate/`.
|
||||||
|
- Preserve real NodeBB/Harmony live partials and component hooks for search, notifications, chat, drafts, user menu, and ACP navigation.
|
||||||
|
- Do not commit secrets or token material.
|
||||||
|
|
||||||
|
---
|
||||||
|
|
||||||
|
### Task 1: Topbar Contract Refinements
|
||||||
|
|
||||||
|
**Files:**
|
||||||
|
- Modify: `tests/global-topbar-contract.test.js`
|
||||||
|
- Modify: `templates/partials/header/topbar.tpl`
|
||||||
|
- Modify: `scss/westgate/_topbar.scss`
|
||||||
|
- Modify: `public/client.js`
|
||||||
|
|
||||||
|
**Interfaces:**
|
||||||
|
- Consumes: Existing `topbar.tpl` markup, `_topbar.scss` selectors, and `initWestgateTopbar`.
|
||||||
|
- Produces: A single desktop navigation model, a one-line brand lockup, and opaque topbar menu surfaces.
|
||||||
|
|
||||||
|
- [ ] **Step 1: Write the failing test**
|
||||||
|
|
||||||
|
Add static contract assertions to `tests/global-topbar-contract.test.js`:
|
||||||
|
|
||||||
|
```js
|
||||||
|
assertIncludes(topbar, 'SHADOWS OVER WESTGATE', 'Topbar brand should use the single required identity line');
|
||||||
|
assertExcludes(topbar, 'wg-topbar__brand-subtitle', 'Topbar should not repeat the site name as a subtitle');
|
||||||
|
assertExcludes(topbar, 'wg-topbar__forums', 'Topbar should not ship a separate desktop Forums dropdown');
|
||||||
|
assertExcludes(topbar, 'data-wg-menu="forums"', 'Forums should not use a custom topbar menu trigger');
|
||||||
|
assertIncludes(stylesheet, '$wg-topbar-panel-bg', 'Topbar menu surfaces should use an opaque local panel base');
|
||||||
|
assertExcludes(stylesheet, 'var(--wg-velvet-panel) !important;', 'Topbar menu surfaces should not inherit the translucent velvet panel token');
|
||||||
|
assertExcludes(stylesheet, 'text-overflow: ellipsis;', 'Topbar brand should not truncate in normal desktop layouts');
|
||||||
|
```
|
||||||
|
|
||||||
|
- [ ] **Step 2: Run test to verify it fails**
|
||||||
|
|
||||||
|
Run: `node --test tests/global-topbar-contract.test.js`
|
||||||
|
|
||||||
|
Expected: FAIL because the current topbar still has the brand subtitle, custom Forums dropdown, translucent panel token, and brand truncation.
|
||||||
|
|
||||||
|
- [ ] **Step 3: Write minimal implementation**
|
||||||
|
|
||||||
|
Change the template so the brand is only the mark plus `SHADOWS OVER WESTGATE`, remove the custom desktop Forums dropdown block, and keep mobile drawer forum entry links. Change `_topbar.scss` so dropdown/drawer surfaces use an opaque local panel gradient, remove custom Forums panel rules, and remove desktop brand ellipsis. Remove now-unused custom topbar panel toggle handling from `public/client.js`.
|
||||||
|
|
||||||
|
- [ ] **Step 4: Run test to verify it passes**
|
||||||
|
|
||||||
|
Run: `node --test tests/global-topbar-contract.test.js`
|
||||||
|
|
||||||
|
Expected: PASS.
|
||||||
|
|
||||||
|
- [ ] **Step 5: Run the full available test set**
|
||||||
|
|
||||||
|
Run: `node --test tests/*.test.js`
|
||||||
|
|
||||||
|
Expected: PASS.
|
||||||
|
|
||||||
|
- [ ] **Step 6: Commit**
|
||||||
|
|
||||||
|
```bash
|
||||||
|
git add docs/superpowers/plans/2026-06-26-global-topbar-refinements.md tests/global-topbar-contract.test.js templates/partials/header/topbar.tpl scss/westgate/_topbar.scss public/client.js
|
||||||
|
git commit -m "fix: refine global topbar integration"
|
||||||
|
```
|
||||||
@@ -79,6 +79,30 @@ Harmony sidebar buttons should be restyled as topbar controls. They should feel
|
|||||||
native to the topbar, not like sidebar markup awkwardly placed in a horizontal
|
native to the topbar, not like sidebar markup awkwardly placed in a horizontal
|
||||||
row.
|
row.
|
||||||
|
|
||||||
|
## Post-Review Refinements
|
||||||
|
|
||||||
|
Screenshots captured on 2026-06-26 show the topbar working visually, but with
|
||||||
|
three refinements needed before the topbar feels fully integrated.
|
||||||
|
|
||||||
|
Drawer and dropdown menus must be opaque. The current translucent treatment lets
|
||||||
|
page content show through account, forum, and drawer surfaces, which weakens
|
||||||
|
readability and makes the controls feel less deliberate. Keep the near-black and
|
||||||
|
plum surface direction, but use an opaque panel base; decorative highlights,
|
||||||
|
borders, and shadows may remain subtle.
|
||||||
|
|
||||||
|
The brand lockup should be simplified to one identity line: the circular mark
|
||||||
|
followed by `SHADOWS OVER WESTGATE`. Do not repeat `Shadows Over Westgate` as a
|
||||||
|
subtitle in the topbar, and do not allow the primary brand name to truncate in
|
||||||
|
normal desktop layouts. Longer project context such as `An NWN:EE Roleplaying
|
||||||
|
Experience` belongs on larger page surfaces, not in the dense global chrome.
|
||||||
|
|
||||||
|
The custom right-side `Forums` dropdown is redundant when ACP Navigation already
|
||||||
|
contains a Forums entry. Prefer one seamless navigation model: remove the
|
||||||
|
separate desktop Forums dropdown and let forum entry points live in ACP
|
||||||
|
Navigation or in the mobile drawer as direct links. If ACP-managed navigation
|
||||||
|
needs to drop text bubbles or helper labels to make this feel clean, that is
|
||||||
|
acceptable.
|
||||||
|
|
||||||
## Implementation Direction
|
## Implementation Direction
|
||||||
|
|
||||||
The production implementation should be theme-first:
|
The production implementation should be theme-first:
|
||||||
@@ -142,6 +166,12 @@ mobile bars should not duplicate those controls.
|
|||||||
- Search uses NodeBB search behavior rather than a visual-only input.
|
- Search uses NodeBB search behavior rather than a visual-only input.
|
||||||
- The topbar appears consistently on Custom Pages, wiki routes, and normal forum
|
- The topbar appears consistently on Custom Pages, wiki routes, and normal forum
|
||||||
routes.
|
routes.
|
||||||
|
- Drawer, dropdown, account, and notification surfaces are opaque enough that
|
||||||
|
underlying page content does not show through.
|
||||||
|
- The brand appears once as the mark plus `SHADOWS OVER WESTGATE`; no duplicate
|
||||||
|
topbar subtitle repeats the site name.
|
||||||
|
- Desktop navigation has one Forums entry model, not both ACP Navigation Forums
|
||||||
|
and a separate right-side Forums dropdown.
|
||||||
- The topbar styling follows Westgate theme tokens and lives under
|
- The topbar styling follows Westgate theme tokens and lives under
|
||||||
`scss/westgate/`.
|
`scss/westgate/`.
|
||||||
- The implementation remains a child theme over `nodebb-theme-harmony`.
|
- The implementation remains a child theme over `nodebb-theme-harmony`.
|
||||||
|
|||||||
Reference in New Issue
Block a user