fix: version picker wrong version display and unclear stable label#14891
Draft
skjnldsv wants to merge 3 commits into
Draft
fix: version picker wrong version display and unclear stable label#14891skjnldsv wants to merge 3 commits into
skjnldsv wants to merge 3 commits into
Conversation
d2263e2 to
9cadfcf
Compare
Contributor
📖 Documentation PreviewNo RST documentation pages changed in this PR. Last updated: Tue, 19 May 2026 13:25:05 GMT |
9cadfcf to
18da545
Compare
- Use `release` instead of `version` for `current_version` so the picker button reflects the actual built version (e.g. 33) instead of always showing 'latest' - Stringify int version slugs in generateVersionsDocs so that current_version == slug comparisons work correctly - Expose `version_stable` in html_context; templates now render 'stable (33)' so users know which version stable maps to Fixes #13821 Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
version_stable was included in the numeric range AND appended as 'stable', causing e.g. '33' and 'stable (33)' to both appear. Exclude version_stable from the numeric loop — it is already shown via the explicit stable entry. Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
5b4c878 to
d9f06ae
Compare
Use brackets instead of parentheses and italic for version numbers. latest shows stable+1, stable shows stable version number. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: skjnldsv <skjnldsv@protonmail.com>
d9f06ae to
949d78b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
☑️ Resolves
What changed and why
Fixes two of the four issues reported in #13821:
1. Picker button always showed
latest(conf.py)html_context['current_version']was set toversionwhich is hardcoded'latest'. Changed to userelease, which reflects the actual built version (set viaDOCS_RELEASEenv var, e.g.33for stable builds).Also converted int version slugs to
stringenerateVersionsDocs— without this,current_version == slugcomparisons were alwaysFalsefor numeric versions ('33' != 33), so the current version was never highlighted in the dropdown.2.
stableentry showed no version number (all three_templates/versions.html)Added
version_stabletohtml_context. Templates now renderstable (33)so users can see which releasestablemaps to without needing to check the URL.Out of scope:
version_start=32🖼️ Screenshots
✅ Checklist
codespellor similar and addressed any spelling issues