-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
Use PyData Sphinx theme version switcher #46936
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.
wow so cool, i'll wait a bit for the readsthedoc to build but this is looking great
in the screen shot though, some versions (releases/2.33.0) are duplicated, are they intended? |
@can-anyscale good eyes. def not intended. will get a fix up |
Signed-off-by: cristianjd <[email protected]>
Signed-off-by: cristianjd <[email protected]>
2c80e26
to
72ae47e
Compare
Signed-off-by: cristianjd <[email protected]>
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.
looks so great! Thank you!!!!
|
||
/* Prevent the the PyData theme Version Switcher from getting too large */ | ||
.version-switcher__menu { | ||
max-height: 496px; |
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.
Might want to use a relative unit here so it scales with the user's font size.
@@ -1261,6 +1261,7 @@ def pregenerate_example_rsts( | |||
repo_url = "https://github.com/ray-project/ray.git" | |||
static_dir_name = "_static" | |||
version_json_filename = "versions.json" | |||
dereference_suffix = "^{}" |
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 missed this change before - do we need these to be defined at the module level and not in the function that uses them? We really don't want to pollute the module namespace if we can avoid it, and as far as I can tell these are only being used in generate_versions_json
.
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.
Will raise a follow up PR to address this since this one got merged. Thanks!
## 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? 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? 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? 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? 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?
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.
versions.json
and the selected version to theversion
set by read the docsRelated issue number
Closes #46382
Closes #46189
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.