-
-
Notifications
You must be signed in to change notification settings - Fork 3.6k
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
Proposal for sphinxcontrib-jquery #9665
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this is simple enough and it's a good start. I would reduce the scope a little bit and and remove one of the method proposed to avoid handling Sphinx<6
since it's not the target of this extension.
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
…ocs.org into sphinxcontrib-jquery
I've been directed to this discussion by Ben. As opposed to the method, why not suggest A |
That's interesting, I haven't considered that at all. However, one thing that would require an extra configuration value then would be Maybe having config values is a better approach. It could ultimately mean that someone who wants to load jQuery by themselves (from their own CDN etc) is free to do so. |
Dear Ben, I am not sure I understand the rationale for the A |
We introduce sphinxcontrib-jquery for other themes and extensions to be able to provide jQuery through the extension. The general case is clear: Themes and extensions should have an easy way to continue using jQuery. However, do we want an additional layer of control for themes, extensions and projects to specify exactly when they want jQuery loaded? That's the ultimate question. I think that the proposal might have chosen a wrong mechanism for that.
|
Dear Ben, Thank you for your explanation; perhaps my understanding was too simple. I had envisioned the extension as providing a way to pretend Sphinx had never removed jQuery, such that the jQuery library would be included as if it was provided by core Sphinx. This would mean that extensions providing jQuery themselves would deal with the duplication similar to how they have in the past. I do see some value in a global disable flag set somehow. A |
That's also the main objective. That should be the default behavior. I think we should throw other scenarios over board as long as no one is weighing in on them... or just do a design that can accommodate for them later. So it's all just pure speculation with potential for over-engineering. @humitos what do you think about using config values instead of the I'd like to change the proposal to use config values and then I think it's starting to look good 👍 |
I'm 👍🏼 on that. However, I'd use only one config value. Just |
I noticed that you already released a 1.0.0, great work. I noticed the Python requirement set to 3.7, and I wanted to add that we aim to have this package perhaps work for 3.6.. I can't tell what is out there building "in the wild", nor how much we are willing to break with an update of sphinx-rtd-theme. At this stage, when there is nothing technically in the way of supporting older Python and Sphinx releases, I think we shouldn't impose minimal version requirements until we know exactly what the aim is. I don't know exactly what Sphinx and Python versions that we'll remove from sphinx-rtd-theme 2.0. I can imagine that we will remove Python 2.7 and Sphinx<4. |
Dear Ben, Sphinx 6 -- no earlier than December, though probably before Christmas. Why support Python 2.7? It has been end of life for nearly 3 years (April 2020). Are you proposing to also support Python 3.5 & 3.6 (EOL 2020, or 3.2 onwards (2.7's original EOL date) Thanks, |
Hi AA-Turner I see our comments have crossed each other. Your question should be answered already in the former comment. Thanks for clarifying the release! We need to do this if we want "zero downtime" for users that upgrade to Sphinx 6:
|
I should add that I think we are in good shape time-wise if Sphinx is coming out in December and sphinxcontrib-jquery is already in the pipeline! |
…try to be more precise if possible
Dear Ben, It is too painful to test on pre-3.7 (I tried for around 2 hours to get it to work), but I have declared suppport for 2.7 and later in v2.0.0. Thanks, |
I have invited Ben and Manuel to the Thanks, |
AA-Turner, thanks for adding us.
I think that the pain of the developer is considerable and that we should not spend too much time on old stacks. My suggestion was to get rid of it if it comes for free.. but when it doesn't, then get rid of it 😄 👍 |
Dear AA-Turner, Since you are already starting to implement and release stuff, do you mind if we do work to have the full proposal implemented and would you release that or grant access for us to release updates? Thanks, |
Dear Ben, Sounds good, hopefully I'll have time to review PRs etc. A |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The proposal looks good to me. Considering that the repository and code is already done and the package already released, we need to make some adjustments here in the docs. Also, we need to update the code to reflect this document.
I'll approve these changes and ping @ericholscher and @agjohnson who were the other folks discussing this to do a final review, but I think we are good moving forward here.
docs/dev/design/sphinx-jquery.rst
Outdated
The most recently bundled jQuery version was v3.5.1 and only two releases have happened since: 3.6.0 and 3.6.1. | ||
The 3.6.0 release had a very small backwards incompatibility which illustrates how harmless these upgrades are for the general purpose Sphinx package. | ||
|
||
Therefore, we propose to start 1.0.0 at 3.5.1 (the currently shipped version) and subsequently release 3.6.1 as the first update of jQuery as 1.1.0. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This also makes references to 1.x, but it should be updated.
Co-authored-by: Manuel Kaufmann <humitos@gmail.com>
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
👍 This all seems reasonable, it's still pretty close to what we discussed previously.
…hinxcontrib-jquery
…ocs.org into sphinxcontrib-jquery
Co-authored-by: Anthony <aj@ohess.org>
Co-authored-by: Anthony <aj@ohess.org>
@agjohnson yes definitely - the intention was to move an internal effort into a public scope here. Hopefully everything from the previous discussions got reflected and duplicated 😄 |
…ing jQuery in other ways
…ocs.org into sphinxcontrib-jquery
Thanks for all the comments! I'd suggest to keep the PR open for any further commenting, but that we move forwards with implementing the remaining part of the proposal. I'll open issues in https://github.com/sphinx-contrib/jquery |
@AA-Turner I'm slightly "under the weather", but I'll try to get to the freshly added issues in the repo and create tests where meaningful. If anyone wants to jump in, please feel free to self-assign the issue 👍 |
I think we can just merge this PR as-is since it already worked as a canonical place to discuss the proposal implementation and the work is already happening. If anything, you can just add a small paragraph mentioning the repository where this work is happening and then merge it. |
Yes, I think we are also out of time for processing more feedback 👍 |
This is a proposal for a new Sphinx extension, as elaborated in the proposal itself.
Direct comments and suggestions are welcome through GitHub's code review.
A more general discussion or questions are welcome as comments to the Pull Request
Rendered version: https://dev--9665.org.readthedocs.build/en/9665/design/sphinx-jquery.html
Discussions about jQuery removal in Sphinx and extensions:
📚 Documentation previews 📚
docs
): https://docs--9665.org.readthedocs.build/en/9665/dev
): https://dev--9665.org.readthedocs.build/en/9665/