-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
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
r634b05f3a5070fef98 breaks SQLAlchemy's search page, emits dozens of unnecessary HTTP requests #9456
Comments
This seems to have been a mistake with #4022 the ajax call functions correctly without the source files being included in the build (they are never used). I have tested this out on several themes and now everything works correctly with `html_copy_source = False`
edited above, note that this bug causes the search page to emit dozens of unnecessary network requests as well. |
this is to work around sphinx-doc/sphinx#9456 which is emitting dozens of unused network calls on search
Sorry for the inconvenience. There are a related change and a bug:
I think the former one is an intended change. But it has also brought incompatible change. That's not intended. So it should be reverted during 4.1.x at least. I'm still debating this change will be applied again since 4.2 or 5.0. Another one is a bug. Therefore, it should be fixed. cc: @Blendify |
thanks for the reply!! I think regardless of how you want to approach this, a configuration option to turn off the ajax-request-per-result thing altogether should be available, at the very least to support sites that don't have this text. (why doesn't my site have the text, is it because my custom theme isn't doing something it's supposed to?) |
Perfectly agreed. I'll add a configuration to disable showing summary texts on re-merge #9129.
Before the upgrading Sphinx (< 4.1), it was disabled via sphinx/sphinx/themes/basic/layout.html Lines 178 to 181 in 07598f0
|
Fix #9456: html search: html_copy_source can't control the search summaries
I would rather us add a new option rather than revert that commit, even if this means breaking compatibility. The reason I made the commit in the first place is to avoid having to copy and upload all the source files on my orgs build system, saving drive IOPS and network bandwidth. |
thanks for looking into this! I will try to see if i can update my templates to work with this feature at some point. |
I determined to revert the change from 4.1.x series and add a new option in 4.2.0. |
Fix #9456: html search: abbreation marks are inserted to the search
This is no longer needed now that we link to a only copy of the sources. In previous versions of sphinx this was still needed to control search summeries but that is no longer needed after the recent update. Note however sphinx 4.1.2 reverted this which breaks search summaries. sphinx 4.2 should fix this so we will be skipping the rest of 4.1.x versions. See: sphinx-doc/sphinx#9456 git-svn-id: https://svn.blender.org/svnroot/bf-manual/trunk/blender_docs@8334 c4de1f47-6596-e411-a384-0024e86c2797
Any update here? This is preventing my project from updating to a newer version of sphinx |
I reverted the commit that causes the original issue at #9494 and released as v4.1.2. So I think there are no troubles with the latest release. So there is no blocker to upgrade dependency on the sqlalchemy project. The remaining task is reimplementing #9494 by another implementation (with an option switch for it). |
Close #9456: html search: Add a config variable; html_show_search_summary
Finally, I added |
…search_summary refs: sphinx-doc#9494
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
Expected behavior
No response
Your project
https://docs.sqlalchemy.org/
Screenshots
good:
bad:
OS
linux
Python version
3.9
Sphinx version
4.1.1
Sphinx extensions
No response
Extra tools
No response
Additional context
No response
The text was updated successfully, but these errors were encountered: