-
Couldn't load subscription status.
- Fork 3.9k
ARROW-18363: [Docs] Include warning when viewing old docs (redirecting to stable/dev docs) #14839
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
Conversation
docs/source/_templates/layout.html
Outdated
| {# Add version warnings #} | ||
| {% block footer %} | ||
| {{ super() }} | ||
| <script type="text/javascript" src="/docs/versionwarning.js"></script> |
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.
Is this PR missing the file /docs/versionwarning.js?
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.
There is a separate PR that adds the versionwarnings.js file: apache/arrow-site#275 .
It has to be merged first.
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.
Why can't the file be added in docs/source/_static instead?
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.
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.
Why can't the file be added in
docs/source/_staticinstead?
That is something Joris also suggested, but at the end decided it could stay as is. I do not mind changing, if it is preferred. cc @jorisvandenbossche
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.
@kou what would be the goal of that variable? So that you can build the docs locally with a different path (one that would match the local path)?
That still won't help that you can test this locally when building the arrow docs, though, as it the javascript code needs the structure of different versions in subdirectories as we have in that arrow-site branch.
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.
Yes. I wanted to solve "in practice you can't test a change in this repo though, and you always have to test it in arrow-site as well to check the changes".
I thought that we can test almost features (I understand that we can't test all features) with this approach. We don't need to change src=.../versionwaning.js in all .html manually to test locally with this approach.
If this approach doesn't help versionwarning.js developers/maintainers, I'm OK without this approach. (I'm OK that they always need apache/arrow-site.)
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 propose to keep the current path to the JS file (docs/_static) and also the current way of injecting the src link in the html files. This way there will be no further changes needed in the arrow-site repo.
If we decide to move the file to the dev/ folder or use a variable in html (in my short attempt I wasn't able to make Sphinx work with variables) I think it is better to create a follow-up issue.
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.
Sounds good to me!
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'm OK with it too.
|
For the record, this is how this looks in the Python docs: |
docs/source/_templates/layout.html
Outdated
| {# Add version warnings #} | ||
| {% block footer %} | ||
| {{ super() }} | ||
| <script type="text/javascript" src="/docs/versionwarning.js"></script> |
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 like docs/source/_static/ because https://github.com/apache/arrow/blob/master/docs/source/_static/versions.json uses docs/source/_static/.
|
Benchmark runs are scheduled for baseline = 387e95a and contender = 305026f. 305026f is a master commit associated with this PR. Results will be available as each benchmark for each run completes. |
…g to stable/dev docs) (apache#14839) This PR is a complementary work to apache/arrow-site#275. It adds a version warning script tag to the `docs/source/_templates/layout.html` and _versionwarnings.js_ file into `docs/source/_static/`. Authored-by: Alenka Frim <frim.alenka@gmail.com> Signed-off-by: Joris Van den Bossche <jorisvandenbossche@gmail.com>
This PR is a complementary work to apache/arrow-site#275.
It adds a version warning script tag to the
docs/source/_templates/layout.htmland versionwarnings.js file intodocs/source/_static/.