fix(profile): full-bleed the user center only and keep public profile at content width
This commit is contained in:
@@ -453,12 +453,16 @@ 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/);
|
||||
// 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%/);
|
||||
// Only the two-column user center spans the viewport; the single-column public
|
||||
// profile keeps following the admin content max width.
|
||||
assert.match(frontendLayoutCss, /\.site-main\.content-shell\.aksrt-profile\s*\{[\s\S]*?max-width:\s*100%/);
|
||||
assert.match(frontendLayoutCss, /\.site-main\.content-shell\.aksrt-user-home\s*\{[\s\S]*?max-width:\s*var\(--container, 1440px\)/);
|
||||
// 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*100%/);
|
||||
assert.match(publicBundleCss, /\.site-main\.content-shell\.aksrt-profile\s*\{[\s\S]*?max-width:\s*100%/);
|
||||
assert.match(publicBundleCss, /\.site-main\.content-shell\.aksrt-user-home\s*\{[\s\S]*?max-width:\s*var\(--container, 1440px\)/);
|
||||
// .aksrt-profile on <main> is the user center only; other routes must not carry it.
|
||||
assert.equal(read('templates/pages/page-user-home.php').includes('aksrt-profile"'), false);
|
||||
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*\}/);
|
||||
|
||||
Reference in New Issue
Block a user