Repository navigation
Show a beta banner on every API page - #4832
Merged
Merged
Conversation
The Bump.sh cutover replaces the old API pages with a new site. Readers will notice differences, so a slim banner says the site is new and links to the docs-content issue form with the page URL filled in. Co-Authored-By: Claude Opus 5.5 <[email protected]>
Contributor
Docs preview (local build)Handbook preview: https://docs-v3-preview.elastic.dev/elastic/docs-builder/pull/4832/ |
A move within one API swaps only `#api-content-grid`, so the banner kept the first page's URL. The banner now sits outside `#main-container` and replaces itself out of band on every swap. The middle sentence shows only from 1200px, where the whole message fits on one line. Co-Authored-By: Claude Opus 5.5 <[email protected]>
With `NAVIGATION_PREVIEW` on, a move between docs and API pages swaps `#main-container` without a reload. The out-of-band banner then had no element to replace on the way in and stayed on docs pages on the way out. After each boosted swap the banner is now replaced, inserted or removed to match the new page, in both bundles. Co-Authored-By: Claude Opus 5.5 <[email protected]>
…ocs-builder into feature/api-explorer-show-beta
technige
approved these changes
Nov 16, 2026
technige
left a comment
Contributor
There was a problem hiding this comment.
This looks good to me. We will await @timto-elastic's review of the wording, otherwise it looks ready to go.
`Css_UsesOnlyTheSystemBreakpoints` allows only 760, 860 and 1100 in the design-system CSS, so the 1199 rule failed the build. The full message still fits on one line from 1101px in both layouts. Co-Authored-By: Claude Sonnet 5.5 <[email protected]>
…ocs-builder into feature/api-explorer-show-beta
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.
Every API reference page, including the
/api/catalog, now shows a slim beta banner below the site header. The banner says the site is new and links readers to an issue form with the page URL filled in.Affects: API reference, Site UI
Prompt summary: At the Bump.sh cutover, readers should see that the API reference is new and know where to report problems. The banner must be visible on every API page, one line on desktop and two at most on mobile, and accessible. Closes elastic/docs-eng-team#1196.
Why
The cutover replaces the Bump.sh pages with a refreshed API site. Readers will notice differences, and without a message those differences look like regressions. Today the API pages give readers no obvious way to tell us what they find.
What
One banner, both layouts
The banner renders just before
#main-containerin_Layout.cshtmland_CatalogLayout.cshtml, withNAVIGATION_PREVIEWboth off and on. No boosted swap carries it: a move within an API swaps only#api-content-grid, and the design-system bundle swaps#main-containerbetween docs and API pages. After each boosted navigation,api-beta-banner.tsreplaces, inserts or removes the banner to match the new page, in both bundles. Its feedback link therefore always names the page the reader is on, and the banner never shows on docs pages. It is not dismissible.Wording and size
The text uses the long wording from the issue, with a visible "Beta" label, so colour is not the only signal. The middle sentence shows only above 1100px, the design system's widest breakpoint, where the whole message fits on one line. Below that the short message is one line down to 768px and two lines on a phone.
Feedback link
"let us know" opens the same docs-content issue form as Report an issue on docs pages (
issue-report.yaml, labelsource:web). It addslink=when the build has a canonical base URL. The link opens in the same tab. The URL is one constant inApiBetaBanner.Removal
To remove the banner, delete
ApiBetaBanner,_ApiBetaBanner.cshtml,api-beta-banner.test.tsand the.api-beta-bannerrules inapi-docs.cssandapi-reference.css.Out of scope: the final wording and feedback target still need sign-off from @timto-elastic before merge. Both live in one file each:
_ApiBetaBanner.cshtmlandApiBetaBanner.cs.Verify
Check on the preview
🤖 Generated with Claude Code