-
Notifications
You must be signed in to change notification settings - Fork 296
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
search functionality missing #752
Comments
I should add that our html_sidebars = {
'index': ['search-field.html', 'sidebar-quicklinks.html'],
} and, in fact, now the entire sidebar is missing from our
followed by a note later, saying
So it's not clear what the default is. The docs also say:
...which we're already doing (at least for |
result of $ git bisect bad
bbc855b6d7bf402c9b5195d832128e564a4e6cb6 is the first bad commit
commit bbc855b6d7bf402c9b5195d832128e564a4e6cb6
Author: Chris Holdgraf <choldgraf@berkeley.edu>
Date: Thu Jun 23 11:47:30 2022 +0200
ENH: Make search field an overlay with button click (#744)
docs/conf.py | 4 +-
docs/user_guide/configuring.rst | 26 +++++--
noxfile.py | 2 +-
src/pydata_sphinx_theme/assets/scripts/index.js | 7 +-
.../assets/styles/base/_base.scss | 5 +-
.../assets/styles/components/_icon-links.scss | 2 +
.../assets/styles/components/_search.scss | 91 +++++++++++++++++++++-
.../assets/styles/components/_switcher-theme.scss | 1 -
.../assets/styles/pages/_search.scss | 70 +++++++++--------
.../assets/styles/sections/_header.scss | 31 +++++---
.../assets/styles/variables/_color.scss | 12 ++-
.../components/search-button.html | 48 ++++++++++++
.../components/search-field.html | 2 +
.../theme/pydata_sphinx_theme/search.html | 45 +++++++++++
.../sections/sidebar-primary.html | 11 ++-
.../theme/pydata_sphinx_theme/theme.conf | 4 +-
.../components/sidebar-nav-bs.html | 6 ++
.../_templates_single_sidebar/sidebar-nav-bs.html | 6 --
tests/test_build.py | 52 ++++++-------
tests/test_build/sidebar_ix.html | 15 +---
20 files changed, 320 insertions(+), 120 deletions(-)
create mode 100644 src/pydata_sphinx_theme/theme/pydata_sphinx_theme/components/search-button.html
create mode 100644 src/pydata_sphinx_theme/theme/pydata_sphinx_theme/search.html
create mode 100644 tests/sites/sidebars/_templates_single_sidebar/components/sidebar-nav-bs.html
delete mode 100644 tests/sites/sidebars/_templates_single_sidebar/sidebar-nav-bs.html |
It sounds like you've uncovered a bug, so indeed this would be good to fix before a release. Let's add it to the milestone. |
I have a suspicion of what's going on. If you look at our sidebar code here: pydata-sphinx-theme/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/sections/sidebar-primary.html Line 11 in e1d4009
We use an
This means that if Basically the behavior that we want is:
Then hide the sidebar entirely |
thanks for the hint! I'll take a look |
so if I'm understanding the desired logic, I think it's just a matter of changing |
Actually, my feeling is that we can just remove the so basically remove all of this: pydata-sphinx-theme/src/pydata_sphinx_theme/theme/pydata_sphinx_theme/sections/sidebar-primary.html Lines 4 to 10 in e1d4009
as well as |
Building docs against current main leads to a total loss of search functionality for our site: no magnifying glass, no Ctrl+k support, and no (old-school) search box. As mentioned here: #744 (comment)
It seems like this didn't happen. It's not a crisis (for MNE-Python at least) since now we pin to specific commits and update only periodically --- I was "just" testing against 26554f2 locally. But for any site that customizes their topbar / sidebar (I assume that's the relevant customization but haven't yet verified), it might be (or become) a problem if they (1) build from current main, or (2) build from latest release (assuming this isn't fixed before next release).
Not to beat a dead horse, but this is another example of the kind of breaking change that I've complained about before, e.g., in #532. Site search functionality is important, and it's now silently gone from some downstream sites with no warnings/errors in the build process.
Perhaps the TL;DR here is that #744 should have supported the old-style approach, included a test that the old-style approach still worked (e.g., one page in the docs where search is different), and made the new-style searching opt-in.
The text was updated successfully, but these errors were encountered: