fix(dashboard): stop sidebar from overlapping main content at lg+#21065
Open
Grey0202 wants to merge 1 commit into
Open
fix(dashboard): stop sidebar from overlapping main content at lg+#21065Grey0202 wants to merge 1 commit into
Grey0202 wants to merge 1 commit into
Conversation
At viewports >= 1024px (lg breakpoint), the cards in the main content area extend behind the sidebar — the leftmost portion of card content gets clipped by the translucent sidebar background. Easy to reproduce on the default Hermes Teal theme; visible on every built-in theme. The aside uses `lg:sticky lg:top-0` to enter the flex flow at lg+, but in this layout sticky behaves as out-of-flow: - the aside's flex parent has `overflow-hidden`, so there is no scrolling ancestor for the sticky element to attach to - the same element carries `top-0 left-0 z-50` from the mobile `position: fixed` mode and `transform: translateX(0)` from the mobile slide-in animation; the combination makes browsers render the sticky element as if it were still out of flow Switch to `lg:relative` so the aside enters flex flow as an ordinary flex item — `lg:shrink-0 w-64` already gives it an explicit 256px column, which now correctly pushes `flex-1` main content to its right. `top-0 left-0` resolve to a 0px offset under `position: relative`, visually identical. `lg:top-0` was only meaningful for sticky and is removed. Mobile (< lg) behavior is unchanged: the aside stays `position: fixed` with the existing slide-in overlay animation. Locally rebuilt the dashboard and confirmed: - lg+ (>= 1024px): cards no longer clipped by sidebar - < 1024px: sidebar still hidden by default, slide-in overlay works Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
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.
Summary
At viewports ≥ 1024px (lg breakpoint), cards in the main content area extend behind the sidebar — the leftmost portion of card content gets clipped by the translucent sidebar. Reproduces on the default
Hermes Tealtheme; visible on every built-in theme.Root cause
The aside uses
lg:sticky lg:top-0to enter flex flow at lg+, but in this layout sticky behaves as out-of-flow:overflow-hidden(App.tsx#L455), so there's no scrolling ancestor for sticky to attach totop-0 left-0 z-50from the mobileposition: fixedmode andtransform: translateX(0)from the slide-in animation; the combination ends up rendering as if still out of flowSo
flex-1main content takes full width and the sidebar visually overlays it.Fix
Swap
lg:sticky→lg:relative. The aside enters flex flow as an ordinary flex item —lg:shrink-0 w-64already gives it an explicit 256px column, which now correctly pushesflex-1main content to its right.top-0 left-0resolve to 0px offset underposition: relative, visually identical.lg:top-0was only meaningful for sticky and is removed.Mobile (< lg) behavior is unchanged: aside stays
position: fixedwith the existing slide-in overlay.Test plan