Skip to content
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

[Docs] Version warning about viewing old docs doesn't work for versions >= 10 #34023

Closed
jorisvandenbossche opened this issue Feb 3, 2023 · 2 comments · Fixed by #34178
Closed

Comments

@jorisvandenbossche
Copy link
Member

Currently, if viewing older docs (eg https://arrow.apache.org/docs/9.0/python/index.html), you get a warning about that you are not viewing the latest docs. However, now that the newest "old" docs (those that are stored in a version/ subdirectory) is 10.0, that doesn't seem to work for this version (eg https://arrow.apache.org/docs/10.0/python/index.html doesn't show the warning)

My first guess is that it's caused by a bump in number of characters in the major version number (7, 8, 9 etc -> 10), and that this if check no longer works as expected because of that:

} else if (versionPath.match(/^\d/)) {
// older versions (with numbered version in the URL)

@AlenkaF
Copy link
Member

AlenkaF commented Feb 13, 2023

I have created a PR to correct the current state of the documentation apache/arrow-site#312

Note from that PR:

Also, additional copying of the versionwarning.js file seems to happen with the release. Currently there are three versions of the same document:

  • docs/_static/versionwarning.js
  • docs/dev/_static/versionwarning.js
  • docs/10.0/_static/versionwarning.js

Second and third should be redundant and are removed with this PR. I will create a separate issue on the apache/arrow repo to research and correct how the versionwarning.js file is being copied.

I plan to create a separate PR to correct the versionwarning.js file in the apache/arrow repo after the PR on apache/arrow-site is merged and the warnings are working well.

@AlenkaF
Copy link
Member

AlenkaF commented Feb 13, 2023

The issue about multiple copies of versionwarning.js in apache/arrow-site: #34160

jorisvandenbossche pushed a commit to apache/arrow-site that referenced this issue Feb 14, 2023
…digit (#312)

This PR corrects the check for version number of the documentation when
adding version warnings to the html files.
See: apache/arrow#34023

Also, additional copying of the versionwarning.js file seems to happen
with the release. Currently there are three versions of the same file:

- docs/_static/versionwarning.js
- docs/dev/_static/versionwarning.js
- docs/10.0/_static/versionwarning.js

Second and third should be redundant and are removed with this PR. I
will create a separate issue on the apache/arrow repo to research and
correct how the versionwarning.js file is being copied.

---------

Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
raulcd pushed a commit that referenced this issue Feb 14, 2023
…for versions >= 10 (#34178)

### Rationale for this change
Due to a bump in number of characters in the major version number (7, 8, 9 etc -> 10) the check for versions in `versionwarning.js` no longer works as expected.

### What changes are included in this PR?
Update of the checks in `versionwarning.js` file.

### Are these changes tested?
Yes, on the apache/arrow-site PR:

- apache/arrow-site#312
- https://arrow.apache.org/docs/10.0/index.html

### Are there any user-facing changes?
No.
* Closes: #34023

Authored-by: Alenka Frim <frim.alenka@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
gringasalpastor pushed a commit to gringasalpastor/arrow that referenced this issue Feb 17, 2023
… work for versions >= 10 (apache#34178)

### Rationale for this change
Due to a bump in number of characters in the major version number (7, 8, 9 etc -> 10) the check for versions in `versionwarning.js` no longer works as expected.

### What changes are included in this PR?
Update of the checks in `versionwarning.js` file.

### Are these changes tested?
Yes, on the apache/arrow-site PR:

- apache/arrow-site#312
- https://arrow.apache.org/docs/10.0/index.html

### Are there any user-facing changes?
No.
* Closes: apache#34023

Authored-by: Alenka Frim <frim.alenka@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
fatemehp pushed a commit to fatemehp/arrow that referenced this issue Feb 24, 2023
… work for versions >= 10 (apache#34178)

### Rationale for this change
Due to a bump in number of characters in the major version number (7, 8, 9 etc -> 10) the check for versions in `versionwarning.js` no longer works as expected.

### What changes are included in this PR?
Update of the checks in `versionwarning.js` file.

### Are these changes tested?
Yes, on the apache/arrow-site PR:

- apache/arrow-site#312
- https://arrow.apache.org/docs/10.0/index.html

### Are there any user-facing changes?
No.
* Closes: apache#34023

Authored-by: Alenka Frim <frim.alenka@gmail.com>
Signed-off-by: Raúl Cumplido <raulcumplido@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants