From bb577f0bab66a7e075e3c5117029ca2ca88f83fb Mon Sep 17 00:00:00 2001 From: codex Date: Tue, 20 Oct 2026 01:48:48 +0800 Subject: [PATCH] fix: keep user topbar visible while scrolling --- web/public/cloud/client.css | 2 ++ web/resources/views/venix/layout_assets.tpl | 2 +- web/tests/VirtualizationAssetsTest.php | 6 ++++++ 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/web/public/cloud/client.css b/web/public/cloud/client.css index 39b0c841..75a49f59 100644 --- a/web/public/cloud/client.css +++ b/web/public/cloud/client.css @@ -27,6 +27,8 @@ .panel-sidebar-bottom .sidebar-link:hover { background: #1a3445; color: #d0eeee; } .panel-admin-link { margin-bottom: 2px; } .panel-logout-link:hover { color: #ffc1c8 !important; background: rgba(208, 66, 80, .1) !important; } +.panel-topbar { position: sticky; top: 0; z-index: 25; } +.main-area > .content .template-catalog { isolation: isolate; } .panel-topbar-logout { text-decoration: none; } /* Announcements share the user shell without loading administrator styles. */ .panel-announcements-close.button { flex: 0 0 44px; width: 44px; height: 44px; min-height: 44px; padding: 0; font-size: 22px; } diff --git a/web/resources/views/venix/layout_assets.tpl b/web/resources/views/venix/layout_assets.tpl index 6183e46d..0a4a6711 100644 --- a/web/resources/views/venix/layout_assets.tpl +++ b/web/resources/views/venix/layout_assets.tpl @@ -1,2 +1,2 @@ {* Shared Venix CSS/JS cache key. Increment whenever a shared browser asset changes. *} -{assign var=venix_asset_version value='2026101903' scope='global'} +{assign var=venix_asset_version value='2026102001' scope='global'} diff --git a/web/tests/VirtualizationAssetsTest.php b/web/tests/VirtualizationAssetsTest.php index db1078e9..ee51aba4 100644 --- a/web/tests/VirtualizationAssetsTest.php +++ b/web/tests/VirtualizationAssetsTest.php @@ -87,6 +87,12 @@ $assert(str_contains($cloudShell, "file='user/panel_sidebar.tpl'") && str_contains($userLayout, "file='user/panel_sidebar.tpl'"), 'Cloud and account pages must share one sidebar partial'); $assert(str_contains($cloudShell, "file='user/panel_topbar.tpl'") && str_contains($userLayout, "file='user/panel_topbar.tpl'"), 'Cloud and account pages must share one topbar partial'); +$assert(preg_match('/\.panel-topbar\s*\{(?=[^}]*position:\s*sticky)(?=[^}]*top:\s*0)(?=[^}]*z-index:\s*[1-9][0-9]*)[^}]*\}/s', + $clientStyles) === 1, + 'The shared user topbar must remain visible while the page content scrolls'); +$assert(preg_match('/\.main-area\s*>\s*\.content\s+\.template-catalog\s*\{[^}]*isolation:\s*isolate[^}]*\}/s', + $clientStyles) === 1, + 'Template picker layers must remain below the sticky shared topbar'); $assert(!str_contains($cloudShell, '