fix(profile): let user center and public profile span the full viewport

This commit is contained in:
2026-09-23 13:36:16 +08:00
parent 10c63e02d5
commit bbd5e97bac
6 changed files with 19 additions and 17 deletions
@@ -453,10 +453,12 @@ test('profile routes load versioned leaf styles and keep dialogs hidden initiall
assert.match(panelFavorites, /aksrt_render_user_home_pagination\(\(int\) \$favorites_query->max_num_pages, \(int\) \$favorites_page\)/);
assert.match(panelFavorites, /array_merge\(\$user_home_render_config, \['wrapper_class' => 'aksrt-user-home__post-list'\]\), \$favorites_query\)/);
assert.doesNotMatch(panelFavorites, /profile-list-item|\$_GET|add_query_arg/);
assert.match(frontendLayoutCss, /\.site-main\.content-shell\.aksrt-profile,[\s\S]*?\.site-main\.content-shell\.aksrt-user-home\s*\{[\s\S]*?max-width:\s*var\(--content-max, var\(--container, 1440px\)\)/);
// User center (two columns) and the public profile fill the viewport; the admin
// content max width stays a single-column reading constraint.
assert.match(frontendLayoutCss, /\.site-main\.content-shell\.aksrt-profile,[\s\S]*?\.site-main\.content-shell\.aksrt-user-home\s*\{[\s\S]*?max-width:\s*100%/);
// The front end enqueues build/public.min.css, not the frontend/ sources, so a
// source-only edit never reaches the page. The bundle must carry the contract.
assert.match(publicBundleCss, /\.site-main\.content-shell\.aksrt-profile,[\s\S]*?\.site-main\.content-shell\.aksrt-user-home\s*\{[\s\S]*?max-width:\s*var\(--content-max, var\(--container, 1440px\)\)/);
assert.match(publicBundleCss, /\.site-main\.content-shell\.aksrt-profile,[\s\S]*?\.site-main\.content-shell\.aksrt-user-home\s*\{[\s\S]*?max-width:\s*100%/);
assert.doesNotMatch(profileLayoutCss, /\.aksrt-profile\.content-shell\s*,[\s\S]*?max-width:\s*var\(--container/);
assert.doesNotMatch(userCenterShellCss, /\.aksrt-user-center \.content-shell\s*,[\s\S]*?max-width:\s*var\(--container/);
assert.match(profileLayoutCss, /\.aksrt-cover-menu__panel\[hidden\]\s*\{\s*display:\s*none\s*!important;\s*\}/);
@@ -682,7 +684,8 @@ test('content max width is one contract from admin option to runtime var', () =>
assert.match(globalSchema.match(/'container_max_width'[^\n]*/)[0], /'min' => 0/);
assert.match(themeSearch, /max\(1200, min\(2200, \$width\)\)/);
assert.match(builder, /'--content-max'\s*=> \$content_width/);
// The unused no-sidebar width token was removed; no runtime var may revive it.
assert.doesNotMatch(builder, /content-no-sidebar-max/);
assert.match(builder, /'--container'\s*=> \$content_width/);
// User pages are full-bleed now, so the aliased width tokens are dead.
assert.doesNotMatch(builder, /--content-max|content-no-sidebar-max/);
assert.doesNotMatch(read('assets/css/core/tokens.css'), /--content-max/);
});