feat(site): add pre-release docs banner on main.videojs.org#1575
feat(site): add pre-release docs banner on main.videojs.org#1575R-Delfino95 wants to merge 5 commits into
Conversation
Render a dismissable top banner on the main.videojs.org branch deploy that warns users they're viewing pre-release docs and links back to the stable site at videojs.org. The banner is gated by isPrereleaseSite() at build time, so no markup ships to production or deploy previews. Split the shared banner-dismissed CSS variant and localStorage key in two (legacy-banner-dismissed, prerelease-banner-dismissed) so each banner can be dismissed independently. Also rename the pre-release host from next.videojs.org to main.videojs.org in astro.config.mjs, the README, and the Sentry comment to match the chosen subdomain. Closes videojs#1306
👷 Deploy request for vjs10-site pending review.Visit the deploys page to approve it
|
|
@R-Delfino95 is attempting to deploy a commit to the Mux Team on Vercel. A member of the Team first needs to authorize it. |
|
Hi @decepulis! Quick question. Right now the pre-release banner stacks on top of the existing legacy banner ("Using Video.js v8 or earlier?") on main.videojs.org. Do you think that's fine as-is, or would you prefer to hide the legacy banner on main.videojs.org so only the pre-release one shows there? I went with the stacked option for now since the issue didn't ask to touch the legacy banner. |
|
Yeah stacked is fine! Maybe some minor visual distinction with a border or background color if you haven't already done that |
|
This is looking really good. One more change requested. Let's make this banner non-dismissible. |
Remove the dismiss button, localStorage key, and CSS variant from the pre-release banner. The banner must always remain visible on main.videojs.org so users are never left unaware they're on pre-release docs.
There was a problem hiding this comment.
Cursor Bugbot has reviewed your changes and found 1 potential issue.
❌ Bugbot Autofix is OFF. To automatically fix reported issues with cloud agents, enable autofix in the Cursor dashboard.
Reviewed by Cursor Bugbot for commit c76e779. Configure here.
…ption Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Done! |


Summary
Adds a top banner to the
main.videojs.orgbranch deploy so users who land on pre-release docs (via search engines, shared links, etc.) know they're not on the stable site. The banner links back tovideojs.organd is intentionally non-dismissible. Follows the standard pattern used by React, Vue, and Svelte.Closes #1306.
Changes
PrereleaseBanner.astrocomponent — renders only whenisPrereleaseSite(Astro.site)returnstrue, so no markup is shipped onvideojs.orgor deploy previews. Non-dismissible by design.consts.ts— AddedPRERELEASE_URLand theisPrereleaseSite()helper.astro.config.mjs— Now importsPRODUCTION_URLandPRERELEASE_URLfromsrc/consts.tsinstead of hardcoded strings, so there is a single source of truth for both hostnames.Base.astro— Imports and renders<PrereleaseBanner />above<LegacyBanner />.astro.config.mjs,README.md,CLAUDE.md, andsentry.server.config.tsfromnext.videojs.orgtomain.videojs.orgto match the chosen subdomain.Accessibility
role="region"witharia-label="Pre-release documentation notice".Notes for reviewers
main.videojs.org. Both serve different audiences so I left them both visible — happy to hide the legacy one on the pre-release host if preferred.PRERELEASE_URLinsrc/consts.ts. If the pre-release subdomain moves, that's the only place to update (the config imports from there directly).Test plan
pnpm astro check— 0 errors, 0 warningspnpm test— 397/397 passingBRANCH=main pnpm dev— banner appears, links tovideojs.orgpnpm dev(default) — banner does NOT appearCONTEXT=production pnpm dev— banner does NOT appear