docs(theme): mark themeissues #6 resolved in 0.3.1

Interactive-render nav fix (CSS display:none-when-closed + nav-state.js
MutationObserver re-wire) shipped in 0.3.1 and verified — ScadaBridge Central UI
NavCollapseTests now pass. All six issues now resolved (5 fixed, 1 tradeoff).
This commit is contained in:
Joseph Doherty
2026-06-05 08:32:03 -04:00
parent f1efe6e081
commit e5a609be83
+27 -5
View File
@@ -10,6 +10,11 @@ All file references below point at the kit source under `src/ZB.MOM.WW.Theme/`.
> **RESOLVED in kit 0.3.0 (2026-06-05).** Issues 1, 2, 3, and 5 are fixed in the kit and
> redistributed; Issue 4 is an accepted, documented tradeoff (no code change). See
> [Resolution](#resolution-kit-030) below for what changed and why.
>
> **RESOLVED in kit 0.3.1 (2026-06-05).** Issue 6 (collapsible nav non-functional under
> interactive Blazor render) is fixed — CSS `display:none`-when-closed backstop +
> `MutationObserver` re-wire in `nav-state.js`. See the [Issue 6](#issue-6--collapsible-nav-is-non-functional-under-interactive-blazor-render-mode)
> resolution note. All six issues are now resolved (5 fixed, 1 accepted tradeoff).
## Summary
@@ -20,7 +25,7 @@ All file references below point at the kit source under `src/ZB.MOM.WW.Theme/`.
| 3 | Medium | `nav-state.js` | Persistence wires once on `DOMContentLoaded`; not re-applied after Blazor enhanced navigation / dynamic re-render. | ✅ Fixed |
| 4 | Low | `NavRailSection` | Always-expanded SSR default causes a flash / layout shift of collapsed sections on load. | 📄 Accepted tradeoff (documented) |
| 5 | Low (optional) | `LoginCard` | Heading bakes the localizable `— sign in` suffix into the product title with no separate hook. | ✅ Fixed |
| 6 | High | `NavRailSection` / `nav-state.js` | Under **interactive** Blazor render mode the whole collapsible nav is non-functional: clicking a header doesn't hide items, and `nav-state.js` never wires (no aria sync, no persistence, no active-reveal). | ❌ Open (found in 0.3.0) |
| 6 | High | `NavRailSection` / `nav-state.js` | Under **interactive** Blazor render mode the whole collapsible nav is non-functional: clicking a header doesn't hide items, and `nav-state.js` never wires (no aria sync, no persistence, no active-reveal). | ✅ Fixed (0.3.1) |
---
@@ -234,7 +239,22 @@ or add an optional `Heading` parameter that, when set, replaces the default head
## Issue 6 — Collapsible nav is non-functional under interactive Blazor render mode
**Severity:** High · **Files:** `Components/NavRailSection.razor`, `wwwroot/js/nav-state.js`,
`wwwroot/css/layout.css` · **Status:** Open (found in 0.3.0)
`wwwroot/css/layout.css` · **Status:** ✅ Fixed in 0.3.1
> **Resolution (kit 0.3.1, 2026-06-05).** Both recommended parts shipped, so the collapsible
> nav now works under interactive render modes as well as static SSR:
> 1. **CSS robust collapse** — `layout.css` hides the body explicitly when closed instead of
> relying on the native `::details-content` content-hiding (which an interactive framework
> desyncs): `.rail-section:not([open]) > .rail-section-body { display: none; }`.
> 2. **Render-mode-agnostic re-wire** — `nav-state.js` adds a `MutationObserver` on
> `document.documentElement` (childList + subtree) that re-runs `apply()` whenever
> `details.rail-section` nodes are added/replaced, so the interactive runtime's re-render
> gets wired (aria sync, `data-zbnav-initialized`, localStorage persistence, active-reveal).
> The existing `enhancedload` hook (Issue 3) is kept for static-SSR enhanced navigation.
>
> Verified live in ScadaBridge Central UI (global `@rendermode InteractiveServer`): the
> Playwright `NavCollapseTests` (toggle-hides-items, persistence-survives-reload,
> deep-link-auto-reveal) now pass against 0.3.1.
> **This corrects Issue 3's note**, which claimed interactive Blazor Server consumers are
> "largely unaffected because the rail is patched in place." Direct observation of the live
@@ -311,9 +331,11 @@ silently does nothing.
summary's `aria-expanded` flips; `localStorage` gets a `zbnav:<key>` entry; the state survives
a reload; and deep-linking into a collapsed section reveals it.
**Consumer note (ScadaBridge).** Until the kit ships this, ScadaBridge's Central UI nav
collapse is a no-op; the Playwright `NavCollapseTests` that exercise toggling, persistence, and
auto-reveal are therefore testing behavior the app does not currently have.
**Consumer note (ScadaBridge).** Resolved on 0.3.1: ScadaBridge's Central UI consumes
`ZB.MOM.WW.Theme` 0.3.1, and the Playwright `NavCollapseTests` (toggling, persistence,
auto-reveal) now pass — the `NavCollapseWiredAsync` gate (which waits for
`data-zbnav-initialized` on every `details.rail-section`) is satisfied under interactive
render, so those tests run unskipped and green.
---