Skip to content

fix: version picker wrong version display and unclear stable label#14891

Draft
skjnldsv wants to merge 3 commits into
masterfrom
fix/version-picker
Draft

fix: version picker wrong version display and unclear stable label#14891
skjnldsv wants to merge 3 commits into
masterfrom
fix/version-picker

Conversation

@skjnldsv
Copy link
Copy Markdown
Member

@skjnldsv skjnldsv commented May 19, 2026

☑️ 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 to version which is hardcoded 'latest'. Changed to use release, which reflects the actual built version (set via DOCS_RELEASE env var, e.g. 33 for stable builds).

Also converted int version slugs to str in generateVersionsDocs — without this, current_version == slug comparisons were always False for numeric versions ('33' != 33), so the current version was never highlighted in the dropdown.

2. stable entry showed no version number (all three _templates/versions.html)
Added version_stable to html_context. Templates now render stable (33) so users can see which release stable maps to without needing to check the URL.

Out of scope:

  • Problem 2 (extend version history) — maintainer confirmed keep version_start=32
  • Problem 4 (version switch page redirect) — cannot guarantee older version pages exist at the same path; left for a future PR

🖼️ Screenshots

image

✅ Checklist

  • I have built the documentation locally and reviewed the output
  • Screenshots are included for visual changes
  • I have not moved or renamed pages (or added a redirect if I did)
  • I have run codespell or similar and addressed any spelling issues

@skjnldsv skjnldsv force-pushed the fix/version-picker branch from d2263e2 to 9cadfcf Compare May 19, 2026 10:02
@skjnldsv skjnldsv changed the title fix: version picker wrong version display, page redirect, and stable label fix: version picker wrong version display and unclear stable label May 19, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions Bot commented May 19, 2026

📖 Documentation Preview

🔍 Open preview →

No RST documentation pages changed in this PR.

Last updated: Tue, 19 May 2026 13:25:05 GMT

@skjnldsv skjnldsv force-pushed the fix/version-picker branch from 9cadfcf to 18da545 Compare May 19, 2026 10:12
skjnldsv and others added 2 commits May 19, 2026 14:05
- 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>
@skjnldsv skjnldsv force-pushed the fix/version-picker branch 2 times, most recently from 5b4c878 to d9f06ae Compare May 19, 2026 12:11
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>
@skjnldsv skjnldsv force-pushed the fix/version-picker branch from d9f06ae to 949d78b Compare May 19, 2026 12:12
@skjnldsv skjnldsv marked this pull request as draft May 20, 2026 07:32
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.

Version Picker Issues on Dev Manual

1 participant