Repository navigation
API Explorer: label the unreleased version "Next (unreleased)" - #4973
Conversation
The unreleased tree is served at /next, but the version menu still called it main. The menu entry now reads "Next (unreleased)" and the trigger, breadcrumb and page title read "Next". Numbered majors keep their v labels. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
| } | ||
|
|
||
| private static string ShortLabelFor(string moniker) => moniker == "main" ? moniker : $"v{moniker}"; | ||
| private static string ShortLabelFor(string moniker) => moniker == "main" ? "Next" : $"v{moniker}"; |
There was a problem hiding this comment.
Severity: P3 (Low)
The browser title still omits Next on unreleased pages. ApiPageTitle.ReleasedVersionLabel only accepts labels starting with v followed by a digit, so the new short label reaches the breadcrumb but is dropped from the title. Include Next in title generation and cover it with a title assertion.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
There was a problem hiding this comment.
No change in this PR. ReleasedVersionLabel never returned main either, so unreleased page titles were already unlabeled before this change. /next is noindex and out of the search index since #4972, so the title does not reach search. Adding the label to titles and headings is a separate behavior change. I corrected the PR description, which wrongly said the title reads "Next".
There was a problem hiding this comment.
Agreed that this is not a regression introduced by this PR. The PR changes the switcher’s short label for main from main to Next (ApiVersionSwitcher.cs#L47); title generation still deliberately selects only released labels, and its predicate requires v followed by a digit (ApiPageTitle.cs#L30-L43, ApiPageTitle.cs#L73). So adding Next to titles would be a separate behavior change, not a fix for a title regression in this PR.
Generated by Libra. React with 👍 or 👎 to give feedback on this comment.
…iew by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…per review by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…review by @infra-vault-gh-plugin-prod) Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4973/ Sample changed pages: |
The API version menu now calls the unreleased build "Next (unreleased)" instead of
main. The trigger and breadcrumb read "Next". Numbered majors keepv9 (latest)andv8.Affects: API reference
Prompt summary: Implement elastic/docs-eng-team#1216: each API page shows which major it serves, and the version selector keeps the reader on the same page. The numbered labels keep their
vprefix by the author's call.Why
Closes elastic/docs-eng-team#1216
#4971 serves the unreleased build at
/nextand the newest major at the versionless URL. It also already links the newest major to versionless URLs and keeps the reader on the same page when switching. The menu still names the unreleased buildmain, which no longer matches its URL.What
Version labels
The
mainentry reads "Next (unreleased)" in the menu and "Next" in the trigger and breadcrumb. Page titles still omit the unreleased label, as before. Numbered majors are unchanged.Tests and docs
The switcher, breadcrumb and navigation rendering tests assert the new text. The API Explorer page describes the new label.
Verify
Out of scope: The issue asks for
9 (latest)and8. This PR keeps thevprefix. The same-page switch uses the per-version page set built at render time, notlinks.json, and behaves the same.