fix(theme): shell fills the dynamic viewport — drop calc(100vh - 3.3rem) (scadaproj#10)

.app-shell min-height is now 100vh with a 100dvh override (the 3.3rem was a
donor-app top-bar leftover; ThemeShell has no top bar) and the lg+ sticky
rail is 100vh/100dvh. Source bumped to 0.5.3, UNPUBLISHED. Adds a static
regression test and fixes the CS8602 in NavStateScriptTests (0 warnings).

Browser-checked via Overview on local 0.5.2 vs 0.5.3 packages: at 390x844 a
short page went from a 791px shell (53px gap) to 844px, no extra scroll;
1440x900 rail stays sticky full-height.

Claude-Session: https://claude.ai/code/session_01GT67AEHd2Acv1YPwGfXEoV
This commit is contained in:
Joseph Doherty
2026-11-09 22:36:20 -05:00
parent eab617f741
commit 48af177dce
7 changed files with 45 additions and 7 deletions
@@ -32,7 +32,8 @@ public class NavStateScriptTests
return; // Node not available on this machine.
}
using (node!)
Assert.NotNull(node);
using (node)
{
var output = node.StandardOutput.ReadToEnd() + node.StandardError.ReadToEnd();
node.WaitForExit();
@@ -53,6 +53,19 @@ public class StaticAssetsTests
Assert.Matches(@"\.tt-leaf\s*\{\s*visibility:\s*hidden", css);
}
[Fact]
public void Shell_fills_the_dynamic_viewport_with_no_topbar_offset()
{
// scadaproj#10: ThemeShell has no top bar, so the donor-app `calc(100vh - 3.3rem)` under-filled short pages,
// and plain 100vh overshoots on mobile browsers with collapsing toolbars. 100vh stays as the fallback.
var css = File.ReadAllText(Path.Combine(Wwwroot, "css", "layout.css"));
css = Regex.Replace(css, @"/\*.*?\*/", "", RegexOptions.Singleline);
Assert.DoesNotContain("3.3rem", css);
Assert.Matches(@"\.app-shell\s*\{[^}]*min-height:\s*100vh;\s*min-height:\s*100dvh;", css);
Assert.Matches(@"\.app-shell \.page\s*\{[^}]*flex:\s*1;", css);
Assert.Matches(@"#theme-rail\s*\{[^}]*height:\s*100vh;\s*height:\s*100dvh;", css);
}
[Fact]
public void Closed_mobile_shell_hides_only_the_rail_and_keeps_main_content_visible()
{