fix(admin): keep one page link visible in the scrolling sidebar on short windows

The scrolling page list could shrink to its padding, hiding every link below about
255 px of height; it now keeps one link's height and the sidebar scrolls past that,
without a horizontal scrollbar. The panel test pins the About rows that fill in late.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
Alby96andClaude Opus 5.5 committed 2026-10-26 23:41:35 +01:00
1 parent 5dfd5f93cf
commit cecbadab70
2 files changed
+6 -1

No files matched your search

+3 -1
View File
@@ -83,7 +83,9 @@ h2 { font-size: 14px; font-weight: 600; }
/* Short windows: the pages above scroll, so Settings and the account stay docked in view; the whole sidebar scrolls
only when even those do not fit. The padding keeps the links' focus rings inside the scrolling list. */
.sidebar, .nav-group:not(.bottom) { overflow-y: auto; scrollbar-width: thin; }
.nav-group:not(.bottom) { flex: 1 1 0; align-content: start; padding: 4px; margin: -4px; }
.sidebar { overflow-x: hidden; }
/* At least one whole link stays visible (36 px plus the padding); below that the sidebar itself scrolls. */
.nav-group:not(.bottom) { flex: 1 1 0; min-height: 44px; align-content: start; padding: 4px; margin: -4px; }
.shell.collapsed { grid-template-columns: 56px minmax(0, 1fr); }
.shell.collapsed .sidebar { padding-inline: 8px; }
.shell.collapsed .sidebar-toggle { align-self: center; margin-inline-start: 0; }
@@ -171,6 +171,9 @@ public sealed class SystemEndpointTests(TestContext context)
Assert.Equal(HttpStatusCode.NotFound, about.StatusCode);
var settings = await server.Client.GetStringAsync("/admin/pages/settings.js");
Assert.Contains(@"id=""about-title""", settings);
// The page draws before the dashboard aggregate answers; these two rows fill in afterwards.
Assert.Contains(@"id=""about-database""", settings);
Assert.Contains(@"id=""about-uptime""", settings);
}
/// <summary>The menu's page groups as app.js lists them: the top pages, then the ones docked at the foot.</summary>