fix(sidebar): collapse empty sidebar column on every scene #29

Merged
kate522 merged 1 commits from worktree/sidebar-empty-collapse into main 2026-09-05 07:40:58 +00:00
Owner

Sidebar visibility had two disconnected decisions: the body site-layout-*
class (via aksrt_is_show_sidebar_filter) only checked widget activity for
singles, while the homepage aside renderer skipped the column and
sidebar.php rendered an empty one. With the toggle on and no widgets, the
homepage kept a reserved gutter and squeezed the main content aside.

  • collapse every scene to no-sidebar when the sidebar widget stack is empty
  • resolve home_sidebar before the page branch so a static front page is
    checked against the zones the homepage renders
  • guard the homepage aside with aksrt_is_show_sidebar() alone and drop the
    duplicate aksrt_homepage_has_sidebar gate
  • early-return sidebar.php instead of rendering an empty column
  • drop dead code: archive helper $preferred param, wp_is_mobile fallback,
    container--no-sidebar class, unreachable front-page fallback
  • update post-visual-contract to pin the single visibility decision

Verification: php -l on all changed files; node --test
tests/widget-system/*.test.cjs 242/243 (the toast-contract failure is
pre-existing and unrelated).

Sidebar visibility had two disconnected decisions: the body site-layout-* class (via aksrt_is_show_sidebar_filter) only checked widget activity for singles, while the homepage aside renderer skipped the column and sidebar.php rendered an empty one. With the toggle on and no widgets, the homepage kept a reserved gutter and squeezed the main content aside. - collapse every scene to no-sidebar when the sidebar widget stack is empty - resolve home_sidebar before the page branch so a static front page is checked against the zones the homepage renders - guard the homepage aside with aksrt_is_show_sidebar() alone and drop the duplicate aksrt_homepage_has_sidebar gate - early-return sidebar.php instead of rendering an empty column - drop dead code: archive helper $preferred param, wp_is_mobile fallback, container--no-sidebar class, unreachable front-page fallback - update post-visual-contract to pin the single visibility decision Verification: php -l on all changed files; node --test tests/widget-system/*.test.cjs 242/243 (the toast-contract failure is pre-existing and unrelated).
kate522 added 1 commit 2026-09-05 07:40:50 +00:00
Sidebar visibility had two disconnected decisions: the body site-layout-*
class (via aksrt_is_show_sidebar_filter) only checked widget activity for
singles, while the homepage aside renderer skipped the column and
sidebar.php rendered an empty one. With the toggle on and no widgets, the
homepage kept a reserved gutter and squeezed the main content aside.

- collapse every scene to no-sidebar when the sidebar widget stack is empty
- resolve home_sidebar before the page branch so a static front page is
  checked against the zones the homepage renders
- guard the homepage aside with aksrt_is_show_sidebar() alone and drop the
  duplicate aksrt_homepage_has_sidebar gate
- early-return sidebar.php instead of rendering an empty column
- drop dead code: archive helper $preferred param, wp_is_mobile fallback,
  container--no-sidebar class, unreachable front-page fallback
- update post-visual-contract to pin the single visibility decision

Verification: php -l on all changed files; node --test
tests/widget-system/*.test.cjs 242/243 (the toast-contract failure is
pre-existing and unrelated).
kate522 merged commit 620a625a72 into main 2026-09-05 07:40:58 +00:00
kate522 deleted branch worktree/sidebar-empty-collapse 2026-09-05 07:40:58 +00:00
Sign in to join this conversation.
No Reviewers
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: kate522/wordpress-theme-aksrt#29