From 3df31d0c7a271135d304ab65e786544ecf6e2e76 Mon Sep 17 00:00:00 2001 From: Joseph Doherty Date: Mon, 9 Nov 2026 15:52:57 -0500 Subject: [PATCH] feat(theme): opt-in ThemeShell ScrollNav rail scroll pane (ScadaBridge#61) Upstreams ScadaBridge's local .rail-scroll pane. ScrollNav (default false) wraps Nav in .rail-scroll and adds side-rail-scroll; layout.css (lg+ only) fills the rail and scrolls just the pane so .rail-foot stays pinned. Default markup/CSS unchanged for other consumers. Stays at 0.5.2, unpublished. Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV --- ZB.MOM.WW.Theme/CLAUDE.md | 4 +++ ZB.MOM.WW.Theme/README.md | 2 +- .../Components/ThemeShell.razor | 18 ++++++++++-- .../ZB.MOM.WW.Theme/wwwroot/css/layout.css | 20 +++++++++++++ .../StaticAssetsTests.cs | 17 +++++++++++ .../ZB.MOM.WW.Theme.Tests/ThemeShellTests.cs | 28 +++++++++++++++++++ 6 files changed, 86 insertions(+), 3 deletions(-) diff --git a/ZB.MOM.WW.Theme/CLAUDE.md b/ZB.MOM.WW.Theme/CLAUDE.md index 3779774..4b9ea57 100644 --- a/ZB.MOM.WW.Theme/CLAUDE.md +++ b/ZB.MOM.WW.Theme/CLAUDE.md @@ -6,6 +6,10 @@ Shared UI kit (Razor Class Library — Technical-Light tokens, IBM Plex, side-ra ## 0.5.2 (2026-11-09, UNPUBLISHED) +Also adds the opt-in `ThemeShell ScrollNav` parameter (ScadaBridge#61, upstreamed from ScadaBridge's local `.rail-scroll`): +default false = markup/CSS unchanged for every consumer; true = `Nav` wrapped in `.rail-scroll`, `nav` gets +`side-rail-scroll`, and layout.css (lg+ only) fills the rail and scrolls just the pane. Not yet adopted by ScadaBridge. + Version bumped in `Directory.Build.props`, not packed or pushed. Fixes Theme-008 (scadaproj#48): `nav-state.js` tracks wired sections in a JS `WeakSet` instead of the `data-zbnav-initialized` DOM attribute, which Blazor's enhanced-navigation DOM sync strips (toggle listeners stacked and the transient active-link reveal was persisted). Regression test diff --git a/ZB.MOM.WW.Theme/README.md b/ZB.MOM.WW.Theme/README.md index 6e66f5d..7e925b8 100644 --- a/ZB.MOM.WW.Theme/README.md +++ b/ZB.MOM.WW.Theme/README.md @@ -59,7 +59,7 @@ server-side** before redirecting (open-redirect risk): | Component | Parameters (key) | Notes | |---|---|---| | `ThemeHead` | — | Emits `` tags for `theme.css` and `layout.css`. Place in `` after Bootstrap. | -| `ThemeShell` | `Product`*, `Accent`, `Logo`, `Nav`, `RailFooter`, `ChildContent` | Side-rail chassis. Not a layout — delegated to from `MainLayout`. `Accent` overrides `--accent` token. | +| `ThemeShell` | `Product`*, `Accent`, `Logo`, `Nav`, `RailFooter`, `ChildContent`, `ScrollNav` | Side-rail chassis. Not a layout — delegated to from `MainLayout`. `Accent` overrides `--accent` token. `ScrollNav` (opt-in, default false; 0.5.2) wraps `Nav` in a `.rail-scroll` pane and fills the rail height on lg+ so a long nav scrolls while `RailFooter` stays pinned. | | `BrandBar` | `Product`*, `Logo` | Brand glyph + product name; rendered inside `ThemeShell`'s rail header. | | `NavRailItem` | `Href`*, `Text`*, `Icon`, `Match` | Wraps ``. | | `NavRailSection` | `Title`*, `Expanded` (default `true`), `ChildContent` | CSS-only collapsible `
` group; no JS, works in static SSR. | diff --git a/ZB.MOM.WW.Theme/src/ZB.MOM.WW.Theme/Components/ThemeShell.razor b/ZB.MOM.WW.Theme/src/ZB.MOM.WW.Theme/Components/ThemeShell.razor index d2973a7..06d78df 100644 --- a/ZB.MOM.WW.Theme/src/ZB.MOM.WW.Theme/Components/ThemeShell.razor +++ b/ZB.MOM.WW.Theme/src/ZB.MOM.WW.Theme/Components/ThemeShell.razor @@ -10,9 +10,16 @@ ☰
-