fix: desktop nav menu scrolling#1597
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Greptile SummaryThis PR fixes desktop nav menu overflow by replacing two per-section
Confidence Score: 4/5Safe to merge; the change is a targeted CSS-only fix that was Playwright-validated and does not touch any logic or data paths. The two changed files only affect Tailwind class strings — no logic, routing, or data-fetching is involved. The dvh unit and overscroll-contain are well-supported on the targeted desktop breakpoint. The one open question is whether the 5rem header-height assumption will stay accurate over time; today it works, but it is not tied to any shared constant. nav-menu.tsx — the 5rem magic number in calc(100dvh-5rem) deserves a second look if the header layout ever changes. Important Files Changed
Flowchart%%{init: {'theme': 'neutral'}}%%
flowchart TD
A[User hovers nav trigger] --> B[NavigationMenuContent renders]
B --> C{xl breakpoint?}
C -- No --> D[Mobile dropdown no height constraint]
C -- Yes --> E[Desktop styles applied max-h calc 100dvh minus 5rem overflow-y auto overscroll contain]
E --> F{Content taller than max-height?}
F -- No --> G[Renders at natural height]
F -- Yes --> H[Dropdown scrolls internally Page scroll not triggered]
%%{init: {'theme': 'base', 'themeVariables': {"darkMode": true, "background": "#0d1117", "primaryColor": "#21262d", "primaryTextColor": "#e6edf3", "primaryBorderColor": "#8b949e", "lineColor": "#8b949e", "textColor": "#e6edf3", "edgeLabelBackground": "#161b22", "actorBkg": "#21262d", "actorBorder": "#8b949e", "actorTextColor": "#e6edf3", "actorLineColor": "#8b949e", "signalColor": "#8b949e", "signalTextColor": "#e6edf3", "noteBkgColor": "#373320", "noteBorderColor": "#d4a72c", "noteTextColor": "#f0e6c0", "labelBoxBkgColor": "#21262d", "labelBoxBorderColor": "#8b949e", "labelTextColor": "#e6edf3", "loopTextColor": "#e6edf3", "activationBkgColor": "#30363d", "activationBorderColor": "#8b949e"}}}%%
flowchart TD
A[User hovers nav trigger] --> B[NavigationMenuContent renders]
B --> C{xl breakpoint?}
C -- No --> D[Mobile dropdown no height constraint]
C -- Yes --> E[Desktop styles applied max-h calc 100dvh minus 5rem overflow-y auto overscroll contain]
E --> F{Content taller than max-height?}
F -- No --> G[Renders at natural height]
F -- Yes --> H[Dropdown scrolls internally Page scroll not triggered]
Reviews (1): Last reviewed commit: "fix: allow desktop nav menus to scroll" | Re-trigger Greptile |
Summary
Verification