Skip to content

fix(docs): version-picker shows 'latest' only on /versions/latest/ - #438

Merged
Chris-Wolfgang merged 3 commits into
mainfrom
fix/version-picker-latest-only-on-alias
Jul 25, 2026
Merged

fix(docs): version-picker shows 'latest' only on /versions/latest/#438
Chris-Wolfgang merged 3 commits into
mainfrom
fix/version-picker-latest-only-on-alias

Conversation

@Chris-Wolfgang

Copy link
Copy Markdown
Owner

Feeds back the fix from Chris-Wolfgang/ETL-Abstractions#268 to the canonical template.

Problem

renderPicker defaulted currentVersion to 'latest'. Because the latest alias is skipped unless currentVersion === 'latest', that default surfaced and selected the latest option on the site root and every unversioned page — not just on /versions/latest/ as intended.

Fix

Default currentVersion to null. Only a /versions/<v>/ path (including the literal /versions/latest/) now names a version:

  • /versions/1.2.3/1.2.3 selected, latest hidden (unchanged).
  • /versions/latest/latest surfaced and selected (so the reader can see which version they're viewing).
  • site root / unversioned pageslatest hidden; the browser auto-selects the highest v* entry.

Note: the canonical file was an older baseline than the downstream copies, so this also brings in the /versions/latest/ awareness those copies already had.

Docs-only JS; no behavior change to the build.

The version picker defaulted currentVersion to 'latest', so on the site
root and every unversioned page it surfaced AND selected the 'latest'
option — not just on /versions/latest/. Default to null instead: only a
/versions/<v>/ path (including the literal /versions/latest/) names a
version; elsewhere 'latest' stays hidden and the browser auto-selects the
highest v* entry.

Fed back from Chris-Wolfgang/ETL-Abstractions#268.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Copilot AI review requested due to automatic review settings July 18, 2026 12:19

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Copilot was unable to review this pull request because the user who requested the review has reached their quota limit.

Chris-Wolfgang and others added 2 commits July 24, 2026 16:22
Copilot review on downstream syncs (DbContextBuilder#369, System.Mail-
Extensions#208) flagged the "would show no selected option" claim as
inaccurate — browsers auto-select the first option in a `<select>`.
The real problem is that the auto-selected first concrete-version
entry matches the current URL, so choosing it doesn't fire `change`
and the reader can't navigate to the concrete-version URL.

Fixed in the downstreams already (93780ed, 15f175f); propagating back
to the canonical source so future template-syncs carry the accurate
rationale.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Chris-Wolfgang
Chris-Wolfgang merged commit f3d8f8d into main Jul 25, 2026
8 checks passed
@Chris-Wolfgang
Chris-Wolfgang deleted the fix/version-picker-latest-only-on-alias branch July 25, 2026 18:24
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.

2 participants