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

Enhance UX on TorchAudio pages to improve awareness of doc versioning #3167

Closed

Conversation

carljparker
Copy link
Contributor

  • Boldface the version-selection UX and increase size by three percent.
  • Add text to breadcrumbs to indicate version and stability.
  • New breadcrumbs.html in _templates overrides Sphinx version.

I create a new variable in conf.py, version_stable, which has the version number for the most-recent stable release. I define this variable in the html_context dictionary so that it is visible to the templates.

I use this approach because I was not able to find any other way of discerning the current stable release during the build. Note that the versions.html file--which identifies the current stable release--appears to be available only in the gh-pages branch and so it is not available at build time.

However, this means that someone will need to update conf.py whenever the current stable release changes.

- Boldface the version-selection UX and increase size by three percent.
- Add text to breadcrumbs to indicate version and stability.
- New `breadcrumbs.html` in `_templates` overrides Sphinx version.

I create a new variable in conf.py, `version_stable`, which has the
version number for the most-recent stable release. I define this
variable in the `html_context` dictionary so that it is visible to the
templates.

I use this approach because I was not able to find any other
way of discerning the current stable release during the build. Note that
the versions.html file--which identifies the current stable
release--appears to be available only in the gh-pages branch and so it
is not available at build time.

However, this means that someone will need to update conf.py whenever
the current stable release changes.
@nateanl nateanl requested a review from a team March 14, 2023 19:37
@mthrok
Copy link
Collaborator

mthrok commented Mar 15, 2023

Hi @carljparker

Thanks for the PR. The breadcrumbs looks good.
The version number looks a bit too attention seeking to me.
font-weight:500 or font-size:110% might be better.
It stands out a bit but still subtle.

font-weight:bold
Screenshot 2023-03-15 at 1 54 50 PM

font-weight:500
Screenshot 2023-03-15 at 1 54 38 PM

font-weight:normal, font-size: 110%
Screenshot 2023-03-15 at 1 58 20 PM

@facebook-github-bot
Copy link
Contributor

@carljparker has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@carljparker merged this pull request in 92f2ea8.

@github-actions
Copy link

Hey @carljparker.
You merged this PR, but labels were not properly added. Please add a primary and secondary label (See https://github.com/pytorch/audio/blob/main/.github/process_commit.py)

carljparker added a commit to carljparker/pytorch-audio that referenced this pull request Apr 16, 2023
…pytorch#3167)

Summary:
- Boldface the version-selection UX and increase size by three percent.
- Add text to breadcrumbs to indicate version and stability.
- New `breadcrumbs.html` in `_templates` overrides Sphinx version.

I create a new variable in `conf.py`, **version_stable**, which has the version number for the most-recent stable release. I define this variable in the **html_context** dictionary so that it is visible to the templates.

I use this approach because I was not able to find any other way of discerning the current stable release during the build. Note that the `versions.html` file--which identifies the current stable release--appears to be available only in the **gh-pages** branch and so it is not available at build time.

However, this means that someone will need to update `conf.py` whenever the current stable release changes.

Pull Request resolved: pytorch#3167

Reviewed By: mthrok

Differential Revision: D44112224

Pulled By: carljparker

fbshipit-source-id: e76f5cb6734a784d161342964459577aa9b64cac
mthrok pushed a commit that referenced this pull request Apr 24, 2023
…#3167) (#3267)

Summary:
- Boldface the version-selection UX and increase size by three percent.
- Add text to breadcrumbs to indicate version and stability.
- New `breadcrumbs.html` in `_templates` overrides Sphinx version.

I create a new variable in `conf.py`, **version_stable**, which has the version number for the most-recent stable release. I define this variable in the **html_context** dictionary so that it is visible to the templates.

I use this approach because I was not able to find any other way of discerning the current stable release during the build. Note that the `versions.html` file--which identifies the current stable release--appears to be available only in the **gh-pages** branch and so it is not available at build time.

However, this means that someone will need to update `conf.py` whenever the current stable release changes.

Pull Request resolved: #3167

Reviewed By: mthrok

Differential Revision: D44112224

Pulled By: carljparker

fbshipit-source-id: e76f5cb6734a784d161342964459577aa9b64cac
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants