keep mobile landscape in the compact nav layout #120

Closed
nayan9617 wants to merge 2 commits from nayan9617/flotilla:fix/landscape-compact-nav into dev
Contributor

Summary

This PR fixes the landscape mobile layout issue where phone-sized devices were switching into the desktop-style side navigation layout and compressing the main content area.

Addresses #117

Problem

In landscape, some touch devices have enough width to satisfy desktop breakpoints, but not enough usable height/space for the desktop multi-column shell.
That caused a cramped UI with side rails taking too much room from the content area.

What changed

-Updated primary navigation layout behavior in PrimaryNav.svelte.
-Updated secondary navigation visibility behavior in SecondaryNav.svelte
-Added compact-landscape media rules in app.css for touch/coarse-pointer, short-height landscape screens so the app stays in compact/mobile nav mode.

Why this approach

This keeps desktop navigation for real desktop/tablet contexts while preventing accidental desktop-layout activation on phone landscape.
It targets the specific class of devices shown in the issue screenshot without changing core navigation logic.

## Summary This PR fixes the landscape mobile layout issue where phone-sized devices were switching into the desktop-style side navigation layout and compressing the main content area. Addresses #117 ## Problem In landscape, some touch devices have enough width to satisfy desktop breakpoints, but not enough usable height/space for the desktop multi-column shell. That caused a cramped UI with side rails taking too much room from the content area. ## What changed -Updated primary navigation layout behavior in PrimaryNav.svelte. -Updated secondary navigation visibility behavior in SecondaryNav.svelte -Added compact-landscape media rules in app.css for touch/coarse-pointer, short-height landscape screens so the app stays in compact/mobile nav mode. ## Why this approach This keeps desktop navigation for real desktop/tablet contexts while preventing accidental desktop-layout activation on phone landscape. It targets the specific class of devices shown in the issue screenshot without changing core navigation logic.
nayan9617 added 1 commit 2026-04-02 18:48:37 +00:00
Author
Contributor

@hodlbod could you please now check using your pixel/device and let me know the same!

@hodlbod could you please now check using your pixel/device and let me know the same!
Owner

This results in the attached images. I think the solution is probably going to be a lot simpler; there should be a fair amount of left padding/margin on page content at a mobile breakpoint. Although, I'm not certain because this works ok on web but not on android.

This results in the attached images. I think the solution is probably going to be a lot simpler; there should be a fair amount of left padding/margin on page content at a mobile breakpoint. Although, I'm not certain because this works ok on web but not on android.
Author
Contributor

Thanks for letting me know! Let me give another try.

Thanks for letting me know! Let me give another try.
nayan9617 added 1 commit 2026-04-03 17:16:30 +00:00
Author
Contributor

@hodlbod actually the root cause were:
-On Android landscape, md: breakpoints are active due viewport width.
-That makes fixed page utility classes (cw, cw-full, cb, and md:mb-0 on Page) behave like desktop.

and that's what leads to content gets shifted/shrunk with large left offset and bottom overlap, exactly like your images.

@hodlbod actually the root cause were: -On Android landscape, md: breakpoints are active due viewport width. -That makes fixed page utility classes (cw, cw-full, cb, and md:mb-0 on Page) behave like desktop. and that's what leads to content gets shifted/shrunk with large left offset and bottom overlap, exactly like your images.
Owner

This does basically work, but it feels ad hoc to me. I wouldn't mind keeping the nav visible, but I can't get the page content sized correctly by fiddling with breakpoints. In the browser the breakpoints work as I would expect, but not on android which is confusing.

Would you mind opening another PR that attempts this fix but keeping the secondary nav visible?

This does basically work, but it feels ad hoc to me. I wouldn't mind keeping the nav visible, but I can't get the page content sized correctly by fiddling with breakpoints. In the browser the breakpoints work as I would expect, but not on android which is confusing. Would you mind opening another PR that attempts this fix but keeping the secondary nav visible?
Author
Contributor

Thanks, that makes sense. I agree the breakpoint approach feels too ad hoc here.

Sure, I’ll open a separate PR that keeps the secondary nav visible and focuses on fixing the page/content sizing itself on Android, rather than hiding nav with breakpoint overrides.

Thanks, that makes sense. I agree the breakpoint approach feels too ad hoc here. Sure, I’ll open a separate PR that keeps the secondary nav visible and focuses on fixing the page/content sizing itself on Android, rather than hiding nav with breakpoint overrides.
hodlbod closed this pull request 2026-04-07 17:45:44 +00:00

Pull request closed

Sign in to join this conversation.