fix(oc-docs): center collapsed search overlay within the docs area - #133
Merged
bijin-bruno merged 1 commit intoJul 21, 2026
Conversation
Below desktop the search collapses to an icon that opens an overlay. Its positioning was gated on viewport media queries, but the responsive mode is derived from the docs-area width — so when the inline playground shrinks the docs column on a wide window, the overlay fell back to the desktop rule and hung off the left edge of the screen. Drive the collapsed treatment off the shell's docs-area mode via a `collapsed` prop / `data-collapsed` attribute instead of viewport media queries. When collapsed, the field wrapper spans the full reveal row so the absolute panel centers within the docs area rather than on a left-aligned field. Includes token/consistency cleanups in the search + topbar styles (z-index token, scroll region derived from the panel cap, --topbar-height). Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
sachin-bruno
approved these changes
Jul 21, 2026
arpit-bruno
approved these changes
Jul 21, 2026
bijin-bruno
approved these changes
Jul 21, 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.
What & why
Below desktop, the endpoint search collapses to an icon that opens an overlay panel. Its positioning was gated on viewport
@mediaqueries — but the topbar/sidebar responsive mode is derived from the docs-area width (so the inline playground can shrink the docs chrome while the window stays wide).When the inline playground shrinks the docs column under 1024px on a wide screen, the JS switches to the collapsed icon layout, but none of the viewport media queries fire. The overlay then fell back to the desktop rule and centered on the narrow, left-aligned field — hanging off the left edge of the screen.
Fix
collapsedprop onSearchBar→ adata-collapsedattribute, instead of viewport media queries.position: absolutepanel centers within the docs area..appshell-bodyisoverflow: hidden+ a container, so the panel stays inside the docs column and never leaks into the playground pane.position: fixedis dropped entirely.AppShellpassescollapsed={!isDesktop}, soSearchBaralways agrees with the container theTopbarrenders (both derive from the same docs-area mode).--z-popovertoken (the overlay no longer risks rendering under other layers), the results scroll region derived from the panel cap so the two can't desync, and a--topbar-heighttoken.Screenshots
Collapsed search opened while the inline playground shrinks the docs area on a wide window.
Before — panel hangs off the left edge (placeholder/chips clipped):
After — panel centers within the docs area:
Testing
npm run lint— clean on the touched filesnpm run test:run— 902/902 unit tests passnpm run test:e2e -- search/search.spec.ts— 18/18 pass (incl. tablet/mobile viewport cases)🤖 Generated with Claude Code