Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Sphinx search summary disappeared from 1.5 website #29073

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

Closed
lesteve opened this issue May 21, 2024 · 11 comments Β· Fixed by #29090
Closed

Sphinx search summary disappeared from 1.5 website #29073

lesteve opened this issue May 21, 2024 · 11 comments Β· Fixed by #29090

Comments

@lesteve
Copy link
Member

lesteve commented May 21, 2024

Looks like the sphinx search summary has gone from 1.5 website. Not crucial, but showing the context of the match is handy to decide which link is more likely to have the information we want when we use the doc search bar.

Maybe due to pydata-sphinx-theme switch, maybe something else ...

More context: #27797

Screenshot for 1.4 https://scikit-learn.org/1.4/search.html?q=ridge
image

Screenshot for 1.5 https://scikit-learn.org/1.5/search.html?q=ridge
image

@github-actions github-actions bot added the Needs Triage Issue requires triage label May 21, 2024
@lesteve lesteve added Documentation and removed Needs Triage Issue requires triage labels May 22, 2024
@ogrisel
Copy link
Member

ogrisel commented May 22, 2024

+1 for re-enabling the sphinx search result previews with the new theme if possible while waiting for a possible revival of the Algolia alternative discussed at #28478.

/cc @Charlie-XIAO.

@Charlie-XIAO
Copy link
Contributor

This I believe is some upstream bug but I can't remember clearly. Let me try to find it out.

@Charlie-XIAO
Copy link
Contributor

Charlie-XIAO commented May 22, 2024

It seems to be because pydata-sphinx-theme removes role="main" which sphinx search relies on for fetching the search summary. It is restored in 0.15.3rc1 but I'm not sure when 0.15.3 will be finally released (it seems to be blocked by some issue, according to pydata/pydata-sphinx-theme#1797). Should we somehow force the doc build to use pydata-sphinx-theme==0.15.3rc1?

@glemaitre
Copy link
Member

I think that we can temporary await for the final release since it should be coming soon. Also, I'll start to look again at the Algolia search engine.

@glemaitre
Copy link
Member

glemaitre commented May 23, 2024

I'm wondering if this is not a problem of configuration because I see that Jupyter has the right output with the latest release 0.15.2:

image

@Charlie-XIAO
Copy link
Contributor

Let me try sphinx==7.2.6 with pydata-sphinx-theme==0.15.2. We are currently using sphinx==7.3.7; perhaps sphinx has changed their way of generating search summary.

@Charlie-XIAO
Copy link
Contributor

I have actually tried sphinx==7.3.7 with pydata-sphinx-theme==0.15.3rc1 and at least on my local machine this combination works.

@glemaitre
Copy link
Member

OK so let's just wait.

@Charlie-XIAO
Copy link
Contributor

So strange 🀣

Working Link sphinx pydata-sphinx-theme
πŸ‘Ž numpy 7.2.6 0.15.2
πŸ‘Ž scipy 7.3.7 0.15.2
πŸ‘Ž polars 7.2.4 0.14.1
πŸ‘ pandas 7.3.7 0.14.4
πŸ‘ jupyter 7.2.6 0.15.2

But I found a very simple fix: we can overwrite searchtools.js by vendoring from sphinx and changing every occurrence of [role="main"] to #main-content. After pydata-sphinx-theme==0.15.3 is release we can simply deleted this file.

@Charlie-XIAO
Copy link
Contributor

#29090

@glemaitre
Copy link
Member

The version 0.15.3 is available ;)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants