Skip to content

r634b05f3a5070fef98 breaks SQLAlchemy's search page, emits dozens of unnecessary HTTP requests #9456

@zzzeek

Description

@zzzeek

Describe the bug

upgrading to the 4.1 series, SQLAlchemy's search page now has a bunch of tags that look like <p class="context"> throughout them with ellipses inside with no functionality and it looks like these all emit indivudal HTTP requests that seem to do nothing, slowing down our search page.

the change is exactly that made in 634b05f. If i edit this directly in searchtools.js, the old behavior is restored. the change appears to now ignore an option that was in place before which explicitly states that the contextual files for this feature are not available. I have also tried setting html_copy_source to True, hoping to at least see the contextual stuff that I see in other doc pages, but it doesn't work for my site anyway.

i think it's a bad idea to emit an unecessary ajax / network request that has no chance of being useful. Can the old behavior please be restored? this change forces unnecessary network overhead for a feature that's not in use and also breaks our layout (which I can work around wtih CSS, but the 95 extra network calls makes this a non -starter).

How to Reproduce

$ git clone https://github.com/sqlalchemy/sqlalchemy
$ cd sqlalchemy/docs/build
$ pip install -r requirements.txt
$ make html
$ cd output/html
$ python -m http.server  # view docs on webserver
$ # navigate to http://localhost:8000

Expected behavior

No response

Your project

https://docs.sqlalchemy.org/

Screenshots

good:

good

bad:

bad

OS

linux

Python version

3.9

Sphinx version

4.1.1

Sphinx extensions

No response

Extra tools

No response

Additional context

No response

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions