From e5a609be83427e45f35bde065b0868e02492f06d Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Fri, 5 Jun 2026 08:32:03 -0400 Subject: [PATCH] docs(theme): mark themeissues #6 resolved in 0.3.1 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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). --- ZB.MOM.WW.Theme/themeissues.md | 32 +++++++++++++++++++++++++++----- 1 file changed, 27 insertions(+), 5 deletions(-) diff --git a/ZB.MOM.WW.Theme/themeissues.md b/ZB.MOM.WW.Theme/themeissues.md index 4610f6a..daf7852 100644 --- a/ZB.MOM.WW.Theme/themeissues.md +++ b/ZB.MOM.WW.Theme/themeissues.md @@ -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:` 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. ---