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

[Website][Docs] index page shows wrong warning bar at top when 15.0 is selected #39737

Closed
mcrumiller opened this issue Jan 22, 2024 · 14 comments · Fixed by #39762
Closed

[Website][Docs] index page shows wrong warning bar at top when 15.0 is selected #39737

mcrumiller opened this issue Jan 22, 2024 · 14 comments · Fixed by #39762

Comments

@mcrumiller
Copy link

mcrumiller commented Jan 22, 2024

When version 15.0 is selected, a warning at the top says that the selected version is 0.14.0, and prompts to switch.

https://arrow.apache.org/docs/index.html

image

Component(s)

Documentation

@AlenkaF
Copy link
Member

AlenkaF commented Jan 22, 2024

Thanks for opening the issue! Don't know why this is happening. The versions file looks correct https://arrow.apache.org/docs/_static/versions.json.

One thing I am noticing is that the 15.0.0 version docs were built with PyData Sphinx Theme 0.14.0 and not 0.14.1. @raulcd I am looking at https://github.com/apache/arrow/tree/main/dev/release but am not sure where the package requirements are defined?

@mcrumiller
Copy link
Author

Being wary of the decimal placement (15.0 versus 0.14.0) it looks like it's referencing version numbers for completely different packages.

@AlenkaF
Copy link
Member

AlenkaF commented Jan 22, 2024

Yes, of the PyData Sphinx Theme package. It is a bug upstream fixed with 0.14.1 version. See #39658 (review)

@raulcd
Copy link
Member

raulcd commented Jan 22, 2024

It seems the fix for the PyData sphinx package was not added to the 15.0.0 release. We probably should manually fix it on the published docs. The bug fix is tagged as 15.0.1 so I'll add it if we do a patch release.

@AlenkaF
Copy link
Member

AlenkaF commented Jan 22, 2024

Not sure but I think the whole script tag here: https://github.com/apache/arrow-site/blob/asf-site/docs/index.html#L339 should be removed for all .html files of the version 15.0.0 in the asf-site/docs

@kou kou changed the title docs: index page shows wrong warning bar at top when 15.0 is selected [Website][Docs] index page shows wrong warning bar at top when 15.0 is selected Jan 22, 2024
@jorisvandenbossche
Copy link
Member

I think the easiest short term fix is to repeat apache/arrow-site#431 (comment) (simple search/replace to set the version banner to false in the doc sources), like I did apache/arrow-site#426 for the 14.0.0 docs

@AlenkaF
Copy link
Member

AlenkaF commented Jan 23, 2024

Cool thanks! Will do.

I am also looking at the 14.0.0 docs which should have a warning bar plus there is and issue in the version switcher. If 14.0.0 is selected the 15.0.0 is still displayed in the drop-down menu. I think we need to change the link to the versions.json here

"json_url": "/docs/_static/versions.json",

to use full url, not relative path:

The JSON file needs to be at a stable, persistent, fully-resolved URL (i.e., not specified as a path relative to the sphinx root of the current doc build).

see https://pydata-sphinx-theme.readthedocs.io/en/stable/user_guide/version-dropdown.html#configure-switcher-json-url

@jorisvandenbossche
Copy link
Member

I am also looking at the 14.0.0 docs which should have a warning bar plus there

The reason it doesn't have the warning banner, is because we turned it off (with the same fix as I am suggesting above for 15.0.0). So indeed, once this is not the latest version anymore, we can do a similar patch to revert the banner change.

to use full url, not relative path:

It should be an "absolute" path, AFAIU, because it starts with a "/" (it's relative, but relative to the root of the site, i.e. arrow.apache.org, and so in practice it is absolute)

But, there seems to be something wrong with the theme_switcher_version_match. Also for the 14.0 docs, this is still set to "" (i.e. empty string)

@AlenkaF
Copy link
Member

AlenkaF commented Jan 23, 2024

Yes, I am reverting DOCUMENTATION_OPTIONS.show_version_warning_banner to true for version 14.0.0 while changing DOCUMENTATION_OPTIONS.show_version_warning_banner to false for current 15.0.0.

Not sure how we can automate this for next release though.

As for the version switcher, I can also do a similar fix to change the DOCUMENTATION_OPTIONS.theme_switcher_version_match = ''; to DOCUMENTATION_OPTIONS.theme_switcher_version_match = '14.0/'; for the docs version 14.0.0.

@AlenkaF
Copy link
Member

AlenkaF commented Jan 23, 2024

The proposed fix: apache/arrow-site#468

jorisvandenbossche pushed a commit to apache/arrow-site that referenced this issue Jan 23, 2024
This change tries to fix the errors in the versions warning bar and
versions switcher. See apache/arrow#39737
@AlenkaF
Copy link
Member

AlenkaF commented Jan 23, 2024

The fix in the arrow-site is merged (apache/arrow-site#468) so this issue can be closed.

@jorisvandenbossche
Copy link
Member

We still need to address the issue long term:

Not sure how we can automate this for next release though.

I am going to assume that the banner issue will be fixed upstream for the next release. But the "version_match" (being set to "" for the stable docs) is still a problem, because we just copy the stable docs to a version/ subdir. I assume that probably the easiest is that we update the release procedure for the doc building to include this search/replace to update DOCUMENTATION_OPTIONS.theme_switcher_version_match ?

@AlenkaF
Copy link
Member

AlenkaF commented Jan 23, 2024

And I think the issue with DOCUMENTATION_OPTIONS.show_version_warning_banner will also in part be present with the next release, right? Even if we use new pydata sphinx theme version with the next release, we will have to change the DOCUMENTATION_OPTIONS.show_version_warning_banner for the stable docs when they get copied to a subfolder?

So yes, I would try with updating the post-08-docs.sh) to include changes for both

  • DOCUMENTATION_OPTIONS.theme_switcher_version_match (from "" to "[version]") and
  • DOCUMENTATION_OPTIONS.show_version_warning_banner (from false to true)

@AlenkaF AlenkaF self-assigned this Jan 23, 2024
@jorisvandenbossche
Copy link
Member

Ah, yes, show_version_warning_banner will also still have to be updated, but only once for the next release, and then afterwards (if we don't patch that anymore), it should be fine I think.

@kou kou closed this as completed in #39762 Feb 6, 2024
kou added a commit that referenced this issue Feb 6, 2024
)

This PR updates the `dev/release/post-08-docs.sh` task so that

- `DOCUMENTATION_OPTIONS.theme_switcher_version_match` changes from `""` to `"{previous_version}"` 
- `DOCUMENTATION_OPTIONS.show_version_warning_banner` changes from `false` to `true`

for the documentation that is moved to a subfolder when a new major release is done.
* Closes: #39737

Lead-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
@kou kou added this to the 16.0.0 milestone Feb 6, 2024
@jorisvandenbossche jorisvandenbossche modified the milestones: 16.0.0, 15.0.1 Feb 6, 2024
dgreiss pushed a commit to dgreiss/arrow that referenced this issue Feb 19, 2024
apache#39762)

This PR updates the `dev/release/post-08-docs.sh` task so that

- `DOCUMENTATION_OPTIONS.theme_switcher_version_match` changes from `""` to `"{previous_version}"` 
- `DOCUMENTATION_OPTIONS.show_version_warning_banner` changes from `false` to `true`

for the documentation that is moved to a subfolder when a new major release is done.
* Closes: apache#39737

Lead-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
raulcd added a commit that referenced this issue Feb 20, 2024
)

This PR updates the `dev/release/post-08-docs.sh` task so that

- `DOCUMENTATION_OPTIONS.theme_switcher_version_match` changes from `""` to `"{previous_version}"` 
- `DOCUMENTATION_OPTIONS.show_version_warning_banner` changes from `false` to `true`

for the documentation that is moved to a subfolder when a new major release is done.
* Closes: #39737

Lead-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
zanmato1984 pushed a commit to zanmato1984/arrow that referenced this issue Feb 28, 2024
apache#39762)

This PR updates the `dev/release/post-08-docs.sh` task so that

- `DOCUMENTATION_OPTIONS.theme_switcher_version_match` changes from `""` to `"{previous_version}"` 
- `DOCUMENTATION_OPTIONS.show_version_warning_banner` changes from `false` to `true`

for the documentation that is moved to a subfolder when a new major release is done.
* Closes: apache#39737

Lead-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
thisisnic pushed a commit to thisisnic/arrow that referenced this issue Mar 8, 2024
apache#39762)

This PR updates the `dev/release/post-08-docs.sh` task so that

- `DOCUMENTATION_OPTIONS.theme_switcher_version_match` changes from `""` to `"{previous_version}"` 
- `DOCUMENTATION_OPTIONS.show_version_warning_banner` changes from `false` to `true`

for the documentation that is moved to a subfolder when a new major release is done.
* Closes: apache#39737

Lead-authored-by: AlenkaF <frim.alenka@gmail.com>
Co-authored-by: Alenka Frim <AlenkaF@users.noreply.github.com>
Co-authored-by: Raúl Cumplido <raulcumplido@gmail.com>
Co-authored-by: Sutou Kouhei <kou@cozmixng.org>
Signed-off-by: Sutou Kouhei <kou@clear-code.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

5 participants