Skip to content

Sphinx search summary disappeared from 1.5 website #29073

Closed

Description

@lesteve

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

Activity

  1. added
    Needs Triage
    on May 21, 2024
  2. added and removed
    Needs Triage
    on May 22, 2024
  3. ogrisel commented on May 22, 2024

    @ogrisel
    Member

    +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.

  4. Charlie-XIAO commented on May 22, 2024

    @Charlie-XIAO
    Contributor

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

  5. Charlie-XIAO commented on May 22, 2024

    @Charlie-XIAO
    Contributor

    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?

  6. glemaitre commented on May 22, 2024

    @glemaitre
    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.

  7. glemaitre commented on May 23, 2024

    @glemaitre
    Member

    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
  8. Charlie-XIAO commented on May 23, 2024

    @Charlie-XIAO
    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.

  9. Charlie-XIAO commented on May 23, 2024

    @Charlie-XIAO
    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.

  10. glemaitre commented on May 23, 2024

    @glemaitre
    Member

    OK so let's just wait.

  11. Charlie-XIAO commented on May 23, 2024

    @Charlie-XIAO
    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.

  12. Charlie-XIAO commented on May 23, 2024

    @Charlie-XIAO
    Contributor
  13. glemaitre commented on May 29, 2024

    @glemaitre
    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

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions