From 5dc24975d66b1eeea73dd1eb54c2b8b8fe4e2775 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Nov 2026 09:40:27 +0000 Subject: [PATCH 1/2] Remove update_navbar_defaults workaround now that PST 0.23.0 is out pydata-sphinx-theme 0.23.0 respects theme.conf overrides, so the empty navbar_persistent from theme.conf is honoured without forcing it at builder-inited. Follow-up to #987, closes #1006. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LQGTZApsK5oZks3B8fdbEy --- src/sphinx_book_theme/__init__.py | 12 ------------ 1 file changed, 12 deletions(-) diff --git a/src/sphinx_book_theme/__init__.py b/src/sphinx_book_theme/__init__.py index 130959db8..4c583c977 100644 --- a/src/sphinx_book_theme/__init__.py +++ b/src/sphinx_book_theme/__init__.py @@ -166,15 +166,6 @@ def update_mode_thebe_config(app): app.env.config.thebe_config = thebe_config -def update_navbar_defaults(app): - """Keep the top navbar empty unless the user asks for something in it. - - Without this, the pydata theme adds a search button to the navbar. - """ - theme_options = get_theme_options_dict(app) - theme_options.setdefault("navbar_persistent", []) - - def check_deprecation_keys(app): """Warns about the deprecated keys.""" @@ -227,9 +218,6 @@ def setup(app: Sphinx): app.add_message_catalog(MESSAGE_CATALOG_NAME, locale_dir) # Events - app.connect( - "builder-inited", update_navbar_defaults, priority=400 - ) # before pydata theme app.connect("builder-inited", update_mode_thebe_config) app.connect("builder-inited", check_deprecation_keys) app.connect("builder-inited", update_sourcename) From 0a2216972db6a8eb01576b9aed6123c5b20c97f8 Mon Sep 17 00:00:00 2001 From: Claude Date: Fri, 13 Nov 2026 13:44:35 +0000 Subject: [PATCH 2/2] Remove dead primary-sidebar checkbox CSS pydata-sphinx-theme 0.23.0 no longer renders #pst-primary-sidebar-checkbox; wide-screen collapse is handled by the .pst-sidebar-hidden class instead. Co-Authored-By: Claude Opus 5.5 Claude-Session: https://claude.ai/code/session_01LQGTZApsK5oZks3B8fdbEy --- .../assets/styles/sections/_sidebar-primary.scss | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/src/sphinx_book_theme/assets/styles/sections/_sidebar-primary.scss b/src/sphinx_book_theme/assets/styles/sections/_sidebar-primary.scss index ba026a3ce..4fdf90b84 100644 --- a/src/sphinx_book_theme/assets/styles/sections/_sidebar-primary.scss +++ b/src/sphinx_book_theme/assets/styles/sections/_sidebar-primary.scss @@ -49,16 +49,3 @@ flex-basis: variables.$sidebar-primary-width-widescreen; } } - -// Default visibility for left sidebar is the reverse of what it is on mobile. -// It is shown by default, and hidden with a click. -// Mobile behavior is defined in the pydata sphinx theme -@media (min-width: variables.$breakpoint-lg) { - input#pst-primary-sidebar-checkbox:checked - ~ .bd-container - .bd-sidebar-primary { - margin-left: -(variables.$sidebar-primary-width-widescreen); - visibility: hidden; - opacity: 0; - } -}