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

Prefer ENV["HORO_BADGE_VERSION"] version in banner #270

Merged

Conversation

jonathanhefner
Copy link
Member

Prior to this commit, the banner at the top of each page would display the value of ENV["HORO_PROJECT_VERSION"]. For Rails, this would either be a bare number, e.g. "7.0.0" without a "v" prefix, or a commit reference, e.g. main@1234567.

In contrast, the value of ENV["HORO_BADGE_VERSION"] is intended to be more user friendly. For Rails, it would be e.g. "v7.0.0" or "edge".

This commit changes the banner to display ENV["HORO_BADGE_VERSION"] if it is set, and otherwise fall back to ENV["HORO_PROJECT_VERSION"]. However, since it may still be valuable for maintainers to know the exact commit that the documentation was generated from, this commit also adds a tooltip to show the abbreviated SHA1 of the commit when hovering over the version.

Before After
before1 after1a
after1b
before2 after2a
after2b

Prior to this commit, the banner at the top of each page would display
the value of `ENV["HORO_PROJECT_VERSION"]`.  For Rails, this would
either be a bare number, e.g. "7.0.0" without a "v" prefix, or a commit
reference, e.g. `main@1234567`.

In contrast, the value of `ENV["HORO_BADGE_VERSION"]` is intended to be
more user friendly.  For Rails, it would be e.g. "v7.0.0" or "edge".

This commit changes the banner to display `ENV["HORO_BADGE_VERSION"]`
if it is set, and otherwise fall back to `ENV["HORO_PROJECT_VERSION"]`.
However, since it may still be valuable for maintainers to know the
exact commit that the documentation was generated from, this commit also
adds a tooltip to show the abbreviated SHA1 of the commit when hovering
over the version.
@jonathanhefner jonathanhefner merged commit ab67c57 into rails:main Aug 5, 2023
10 checks passed
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.

1 participant