[Docs] Add dynamic topbar banner - #4264
Merged
m-bert merged 3 commits intoJun 17, 2026
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
Adds a rotating top-bar banner to the Gesture Handler docs site and reserves its height early to avoid layout shift.
Changes:
- Wraps the Docusaurus Navbar with a conditional
TopBarBannerthat hides on configured routes. - Introduces a new
TopBarBannercomponent with per-zone caching and rotation behavior. - Injects an inline
<head>reservation script viadocusaurus.config.jsto pre-apply cached banner height/background.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 4 comments.
Show a summary per file
| File | Description |
|---|---|
| packages/docs-gesture-handler/src/theme/Navbar/index.js | Shows/hides the new top banner above the existing Navbar based on route. |
| packages/docs-gesture-handler/src/components/TopBarBanner/shared.ts | Adds shared, SSR-safe helpers and the inline reservation <head> script generator. |
| packages/docs-gesture-handler/src/components/TopBarBanner/index.ts | Re-exports banner config, shared helpers, and the client component. |
| packages/docs-gesture-handler/src/components/TopBarBanner/config.ts | Defines banner zones, rotation interval, and hidden paths. |
| packages/docs-gesture-handler/src/components/TopBarBanner/TopBarBannerClient.tsx | Implements the rotating/multi-zone banner, caching, and DOM measurement logic. |
| packages/docs-gesture-handler/docusaurus.config.js | Injects the reservation script into headTags using the first zone’s IDs. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
p-malecki
force-pushed
the
@p-malecki/add-topbar-banner
branch
from
June 16, 2026 14:16
a6efad0 to
87a4c91
Compare
p-malecki
force-pushed
the
@p-malecki/add-topbar-banner
branch
from
June 17, 2026 11:14
87a4c91 to
d8e217f
Compare
m-bert
reviewed
Jun 17, 2026
m-bert
approved these changes
Jun 17, 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.
Description
Adds a topbar banner to the landing page. Content is served server-side via external service, so banners can be swapped, rotated, or pulled without any repo change or redeploy.
It won’t be displayed on the docs or search pages. The banners are currently hidden across the site.