ReviewOS

also looking at this

stacks/analyticshq

fix(ui): bound the mobile menu to the visible viewport

#53
Merged glennmichael123 wants to merge fix/mobile-nav into main
2 files +26 -0
10 days ago

The phone menu lists 20 destinations in a 1070px panel inside an 812px viewport, with no max-height and no overflow, pinned under a sticky nav. Pricing, Compare, Docs, GitHub, Log in and Sign up sat below the fold with no way to scroll to them, and the page behind the open menu kept scrolling instead.

This ports the fix that landed in bughq (bughq/bughq#13): the panel is capped at calc(100dvh - 92px) — the 68px nav, the 12px gap, and 12px of breathing room — scrolls internally with overscroll contained, and the page locks while the menu is open. The nav geometry is identical in both apps, so the offset carries over unchanged.

Measured at 375×812 on the rendered page, before → after:

  • panel height 1070px → 720px; overflow-y visible → auto
  • unreachable links 6 → 0 ("Sign up" lands at y=735–775 after scrolling the panel)
  • body overflow while the menu is open: auto → hidden

tests/unit/mobile-layout.test.ts pins the contract, in the same shape as bughq's.

2 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.