fix(PageHeader): keep sticky header below drawer overlays#2394
Conversation
…r overlay behavior Updated the z-index for the PageHeader and stickyRow components to 2, allowing top-level drawers to overlay correctly while maintaining the header's visibility during scrolling. This change ensures that the header floats above normal content but below the drawer overlays, improving the overall user experience.
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
🦋 Changeset detectedLatest commit: 8662351 The changes in this PR will be included in the next version bump. This PR includes changesets to release 3 packages
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
🔵 Tier 2 — Low RiskSmall, isolated change with no API route or data model modifications. Why this tier:
Review process: AI review + quick human skim (target: 5–15 min). Reviewer validates AI assessment and checks for domain-specific concerns. Stats
|
Co-authored-by: Cursor <cursoragent@cursor.com>
E2E Test Results✅ All tests passed • 193 passed • 3 skipped • 1306s
Tests ran across 4 shards in parallel. |
Deep ReviewScope: Intent: Stop sticky page chrome from floating above the app's ✅ No critical issues found. The drawer math ( The "header still wins over normal scrolling content" claim holds at This revision directly addresses @brandon-pereira's flagged side-panel-under-fullscreen-tile bug; nothing remains unresolved from prior feedback. Reviewers (7): correctness, testing, maintainability, project-standards, kieran-typescript, julik-frontend-races, previous-comments. |
|
@elizabetdev this works good, thanks. One side note: If you have a search tile, click "Full screen" then click a row, the sidebar opens under the tile.. probably not related though. |
…creen tile above the modal Use the existing `ZIndexContext` pattern (`contextZIndex + 10`) for the modal itself and expose that value via `ZIndexContext.Provider`, so a DBRowSidePanel drawer opened by clicking a row inside the fullscreen search tile lands at `z-index: 20` (above the modal at `10`) instead of `z-index: 10` (hidden behind Mantine's default modal z-index of 200). Co-authored-by: Cursor <cursoragent@cursor.com>
|
@brandon-pereira it was another z-index issue. It was fixed by 8662351. |
## Summary The sticky `PageHeader` (and its `stickyRow`) were pinned at `z-index: 100`, which floated them above app drawers. Drawers in this codebase don't use Mantine's default `modal` elevation (200) — they explicitly opt into a much lower stack via `ZIndexContext` (`contextZIndex + 10`, see `DBRowSidePanel`, `NodeDetailsSidePanel`, `PodDetailsSidePanel`, etc.), so a top-level drawer overlay ends up at `--overlay-z-index: 10`. The header would therefore poke through the drawer overlay and remain interactive while a drawer was open. This drops both `.header` and `.stickyRow` to `z-index: 2` — 8 below the top-level drawer z-index — so: - Drawer overlays (and the drawer body itself) reliably cover the sticky page chrome. - The header still wins against normal scrolling page content, which uses `auto`/no z-index. - Nested drawers (which keep stacking via `ZIndexContext`) continue to layer above their parents unchanged. Comments in the SCSS document the relationship so the next person tweaking these values has the context. ## Test plan - [ ] Open a page that uses `PageHeader` (e.g. Alerts, DB Service Map, Kubernetes Dashboard) and open a side panel / drawer; confirm the drawer overlay fully covers the sticky header and the header is no longer clickable through the overlay. - [ ] Scroll a long page and confirm the sticky header still sits above normal content (charts, tables, lists). - [ ] Open a nested drawer (e.g. row side panel from within another side panel) and confirm stacking still works as before. Made with [Cursor](https://cursor.com)
## Summary The sticky `PageHeader` (and its `stickyRow`) were pinned at `z-index: 100`, which floated them above app drawers. Drawers in this codebase don't use Mantine's default `modal` elevation (200) — they explicitly opt into a much lower stack via `ZIndexContext` (`contextZIndex + 10`, see `DBRowSidePanel`, `NodeDetailsSidePanel`, `PodDetailsSidePanel`, etc.), so a top-level drawer overlay ends up at `--overlay-z-index: 10`. The header would therefore poke through the drawer overlay and remain interactive while a drawer was open. This drops both `.header` and `.stickyRow` to `z-index: 2` — 8 below the top-level drawer z-index — so: - Drawer overlays (and the drawer body itself) reliably cover the sticky page chrome. - The header still wins against normal scrolling page content, which uses `auto`/no z-index. - Nested drawers (which keep stacking via `ZIndexContext`) continue to layer above their parents unchanged. Comments in the SCSS document the relationship so the next person tweaking these values has the context. ## Test plan - [ ] Open a page that uses `PageHeader` (e.g. Alerts, DB Service Map, Kubernetes Dashboard) and open a side panel / drawer; confirm the drawer overlay fully covers the sticky header and the header is no longer clickable through the overlay. - [ ] Scroll a long page and confirm the sticky header still sits above normal content (charts, tables, lists). - [ ] Open a nested drawer (e.g. row side panel from within another side panel) and confirm stacking still works as before. Made with [Cursor](https://cursor.com)
Summary
The sticky
PageHeader(and itsstickyRow) were pinned atz-index: 100, which floated them above app drawers. Drawers in this codebase don't use Mantine's defaultmodalelevation (200) — they explicitly opt into a much lower stack viaZIndexContext(contextZIndex + 10, seeDBRowSidePanel,NodeDetailsSidePanel,PodDetailsSidePanel, etc.), so a top-level drawer overlay ends up at--overlay-z-index: 10. The header would therefore poke through the drawer overlay and remain interactive while a drawer was open.This drops both
.headerand.stickyRowtoz-index: 2— 8 below the top-level drawer z-index — so:auto/no z-index.ZIndexContext) continue to layer above their parents unchanged.Comments in the SCSS document the relationship so the next person tweaking these values has the context.
Test plan
PageHeader(e.g. Alerts, DB Service Map, Kubernetes Dashboard) and open a side panel / drawer; confirm the drawer overlay fully covers the sticky header and the header is no longer clickable through the overlay.Made with Cursor