Skip to content

feat(frontend): mobile bottom navigation bar (with org switcher + modal z-index fix)#944

Open
sundaram2021 wants to merge 1 commit into
phasehq:mainfrom
sundaram2021:feat/mobile-bottom-nav
Open

feat(frontend): mobile bottom navigation bar (with org switcher + modal z-index fix)#944
sundaram2021 wants to merge 1 commit into
phasehq:mainfrom
sundaram2021:feat/mobile-bottom-nav

Conversation

@sundaram2021

Copy link
Copy Markdown

Summary

On narrow screens (<768px) the left Sidebar is hidden and replaced with a fixed
bottom navigation bar — similar to Twitter/X — linking to the same team routes.
The layout grid/dividers become md:-only so content is full-width on mobile, and
the content area gets mobile-only bottom padding so nothing hides behind the bar.

This continues/rebases #771 by @nimish-ks, resolves its merge conflicts with main,
and closes the two open Cursor Bugbot findings on that PR.

What's included

  • Mobile bottom nav (md:hidden, fixed bottom-0) with all current team routes:
    Home, Apps, Integrations, Access Control, Audit Logs, Settings — equal-width tap
    targets and active-state highlighting.
  • Org switching on mobile — new compact MobileOrgSwitcher that reuses the same
    organisations/permissions logic as the desktop OrgsMenu, shown only when the user
    belongs to more than one org, opening upward from the bar. (Fixes Bugbot: "No
    organization switching capability on mobile".)
  • Modal z-index fix — the bar is z-10 (matching the top NavBar) instead of
    z-50, so HeadlessUI dialogs (z-10, portaled to <body>) correctly render above
    it rather than the bar covering the modal/backdrop. (Fixes Bugbot: "Mobile nav
    z-index renders above modal dialogs".)
  • Accessibility — each icon link keeps title/aria-label and gains
    aria-current="page" when active.
  • iOS safe areapb-[env(safe-area-inset-bottom)] keeps icons clear of the
    home indicator.

Changed files

  • frontend/app/[team]/layout.tsx — responsive grid (md:divide-x md:grid-cols-…) + pb-14 md:pb-0
  • frontend/components/layout/Sidebar.tsx — split desktop (hidden md:flex) vs. fixed mobile bar; add MobileOrgSwitcher

Notes for reviewers

  • The original branch was ~336 commits behind main; this is rebased onto current
    main, which had already reduced the top navbar to 48px — those values are preserved.
  • Verified locally: tsc --noEmit (0 errors), next lint (clean), next build
    (compiled successfully).

Screenshots

Mobile Desktop (≥768px)
Before sidebar squeezed on mobile unchanged
After bottom nav + org switcher unchanged

Test plan

  • Resize below 768px → sidebar disappears, bottom nav appears
  • All bottom-nav links navigate correctly; active state highlights the right icon
  • Resize ≥768px → normal sidebar returns, bottom bar hidden, no layout shift
  • Open a dialog (e.g. Unlock Keyring) on mobile → dialog renders above the bar; links are not tappable through the backdrop
  • Multi-org account → org switcher appears and switching works; single-org account → switcher hidden
  • Dark mode parity
  • iOS device → bar clears the home indicator (safe-area)
  • Real device / DevTools device emulation

…x, add mobile org switcher

- Rebuild PR phasehq#771 changes on top of current main (branch was 336 commits behind)
- layout.tsx: keep main's 48px navbar (mt-12), add pb-14 md:pb-0, make grid md-responsive
- Sidebar.tsx: split desktop (hidden md:flex) and fixed mobile bottom nav
- Fix Bugbot medium: mobile nav z-50 -> z-10 so HeadlessUI dialogs (z-10, portaled) render above it
- Fix Bugbot high: add compact MobileOrgSwitcher (shown when >1 org), reusing OrgsMenu logic
- Preserve aria-label/title a11y fix; add aria-current; add iOS safe-area padding
@sundaram2021 sundaram2021 changed the base branch from feat/mobile-bottom-nav to main July 13, 2026 09:01
@nimish-ks

Copy link
Copy Markdown
Member

Great! @sundaram2021 Could you please include one or two screenshots?

@sundaram2021

Copy link
Copy Markdown
Author

Demo screenshots for the mobile bottom navigation changes:

Mobile bottom nav

Mobile bottom nav

Mobile org switcher

Mobile org switcher

Modal layering above bottom nav

Modal layering above bottom nav

Desktop sidebar unchanged

Desktop sidebar unchanged

Note: These screenshots were captured by AI on my behalf since I'm not currently at my desk.

@nimish-ks

Copy link
Copy Markdown
Member

Demo screenshots for the mobile bottom navigation changes:

Mobile bottom nav

Mobile bottom nav

Mobile org switcher

Mobile org switcher

Modal layering above bottom nav

Modal layering above bottom nav

Desktop sidebar unchanged

Desktop sidebar unchanged

Note: These screenshots were captured by AI on my behalf since I'm not currently at my desk.

Umm. what is this?

@sundaram2021

Copy link
Copy Markdown
Author

I'm in marriage ceremony, So asked codex to paste the screenshot of the changes that has been done in this PR using remote sessions (I should have taken the screenshot earlier while fixing , my bad will take from next time).
I guess , it did not do as expected .

Can you once run the changes locally and let me know the if any changes needed or if its good to go !!
I'll be back to my home setup by tomorrow most probably.

cc: @nimish-ks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants