Label unreleased version as Beta instead of Legacy#376
Merged
Conversation
The version dropdown's getCategory() branched on version.banner, but useVersions() returns global-data version objects (toGlobalDataVersion) which don't carry the banner config field. The check never matched, so the unreleased 'current' version fell through to 'legacy'. Key on version.name === 'current' instead — the in-development version is the one the config marks banner: 'unreleased'.
moritzhartmeier
approved these changes
Jun 24, 2026
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.
Problem
The SDK version dropdown showed the unreleased 8.5.0 (
current) version tagged as LEGACY, even though #375 added agetCategory()branch intended to tag it as Beta:That check never matched.
useVersions()returns global-data version objects built by Docusaurus'stoGlobalDataVersion(), which only exposename,label,isLast,path,mainDocId,docs,draftIds, andsidebars— there is nobannerfield. (bannerlives on the per-pagePropVersionMetadatafromuseDocsVersion(), not on the global version list.) Soversion.bannerwas alwaysundefinedand the unreleased version fell through tolegacy.Fix
Key on
version.name === 'current'instead. Docusaurus always names the in-development versioncurrent, which is exactly the one the config marksbanner: 'unreleased'. The component already usesversion.namefor its Xamarin filter, so it's the consistent property to branch on.current, unreleased)LegacyisLast)The
.version-tag-betastyling already exists innavbar.scss, so no other changes are needed.