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

Cristian/cherry pick version switcher 2.31.0 #47028

Merged

Conversation

cristianjd
Copy link
Collaborator

@cristianjd cristianjd commented Aug 8, 2024

Why are these changes needed?

Cherry picks the versions picker commits from master so it shows up in this older release version. Added missing subprocess import

Related issue number

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
    • I've added any new APIs to the API Reference. For example, if I added a
      method in Tune, I've added it in doc/source/tune/api/ under the
      corresponding .rst file.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

## Why are these changes needed?

In order to move away from the "Read the Docs" version switcher and to
the one provided by the PyData theme we must first have a stable JSON of
the available versions as described here:
https://github.com/google/google-java-format/releases/download/google-java-format-1.7/google-java-format-1.7-all-deps.jar

The adds helpers to custom directives in order to get the list of git
tags starting from the first one we display in the switcher then sort in
semver order. "Latest" and "master" are added to the top. This is run in
the setup fn to generate the JSON in the static folder. After this is
deployed we can reference it, add the new picker, and hide the previous
one.

## Related issue number

This is part one of a fix for
#46382 and
#46189. The follow up will
close these out.


Signed-off-by: cristianjd <[email protected]>
## Why are these changes needed?

This switches to using the PyData Sphinx theme version switcher so that
we have more control of it's location and the ordering of the versions.
- added the version switcher to the navbar
- pointed the versions to the recently added `versions.json` and the
selected version to the `version` set by read the docs
- styling to limit the height of the version switcher and allow for
scrolling to see more
- styling to suppress the RTD version switcher

<img width="646" alt="Screenshot 2024-08-02 at 10 46 45 AM"
src="https://github.com/user-attachments/assets/00836b9f-5c2b-40ed-ab70-e0175ade8d0a">


## Related issue number
Closes #46382
Closes #46189


Signed-off-by: cristianjd <[email protected]>
## Why are these changes needed?

A few small follow ups for the version switcher:
- move constants to inside the versions JSON generation function
- updated height of version switcher to be relative so it scales up with
zoom level
- changed `overflow` to `overflow-y` to stop the extra horizontal scroll
from showing up
Before:
![Screenshot 2024-08-08 at 9 56
01 AM](https://github.com/user-attachments/assets/ac94b727-ca20-4c3b-8488-347549d19eca)
After:
![Screenshot 2024-08-08 at 10 02
21 AM](https://github.com/user-attachments/assets/05813997-bee1-480a-bbcb-e4f02ac88a99)

Signed-off-by: cristianjd <[email protected]>
@cristianjd cristianjd requested a review from a team as a code owner August 8, 2024 19:40
@cristianjd cristianjd requested review from peytondmurray and removed request for a team August 8, 2024 19:40
@can-anyscale can-anyscale merged commit c633862 into releases/2.31.0 Aug 8, 2024
5 of 6 checks passed
@can-anyscale can-anyscale deleted the cristian/cherry-pick-version-switcher-2.31.0 branch August 8, 2024 21:54
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants