-
Notifications
You must be signed in to change notification settings - Fork 59
feat: add mobile bottom navigation bar #771
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -250,44 +250,69 @@ const Sidebar = () => { | |
| ] | ||
|
|
||
| return ( | ||
| <div | ||
| className={clsx( | ||
| 'h-screen flex flex-col pt-[64px] transition-all duration-300', | ||
| collapsed ? 'w-20' : 'w-72' | ||
| )} | ||
| > | ||
| <nav className="flex flex-col divide-y divide-neutral-300 dark:divide-neutral-800 items-start justify-between h-full bg-neutral-100/70 dark:bg-neutral-800/20 text-black dark:text-white"> | ||
| {/* Main navigation area */} | ||
| <div className="gap-4 p-4 grid grid-cols-1 w-full"> | ||
| <OrgsMenu /> | ||
| <> | ||
| {/* Desktop/tablet sidebar */} | ||
| <div | ||
| className={clsx( | ||
| 'h-screen hidden md:flex flex-col pt-[64px] transition-all duration-300', | ||
| collapsed ? 'w-20' : 'w-72' | ||
| )} | ||
| > | ||
| <nav className="flex flex-col divide-y divide-neutral-300 dark:divide-neutral-800 items-start justify-between h-full bg-neutral-100/70 dark:bg-neutral-800/20 text-black dark:text-white"> | ||
| {/* Main navigation area */} | ||
| <div className="gap-4 p-4 grid grid-cols-1 w-full"> | ||
| <OrgsMenu /> | ||
| {links.map((link) => ( | ||
| <SidebarLink | ||
| key={link.name} | ||
| name={link.name} | ||
| href={link.href} | ||
| icon={link.icon} | ||
| active={link.active} | ||
| collapsed={collapsed} | ||
| /> | ||
| ))} | ||
| </div> | ||
|
|
||
| {/* Bottom section with collapse/expand button */} | ||
| <div className="p-4 w-full"> | ||
| <button | ||
| onClick={() => setUserPreference(collapsed ? 'expanded' : 'collapsed')} | ||
| className="flex items-center justify-center p-3 w-full text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 rounded-lg" | ||
| title={collapsed ? 'Expand sidebar' : 'Collapse sidebar'} | ||
| > | ||
| {collapsed ? ( | ||
| <FaAngleDoubleRight className="text-xl" /> | ||
| ) : ( | ||
| <FaAngleDoubleLeft className="text-xl" /> | ||
| )} | ||
| </button> | ||
| </div> | ||
| </nav> | ||
| </div> | ||
|
|
||
| {/* Mobile bottom navigation */} | ||
| <nav className="fixed bottom-0 left-0 right-0 z-50 md:hidden border-t border-neutral-300 dark:border-neutral-800 bg-neutral-100 dark:bg-neutral-900"> | ||
| <div className="flex items-center justify-around h-14"> | ||
| {links.map((link) => ( | ||
| <SidebarLink | ||
| <Link | ||
| key={link.name} | ||
| name={link.name} | ||
| href={link.href} | ||
| icon={link.icon} | ||
| active={link.active} | ||
| collapsed={collapsed} | ||
| /> | ||
| title={link.name} | ||
| aria-label={link.name} | ||
| className={clsx( | ||
| 'flex items-center justify-center flex-1 h-full text-xl transition-colors', | ||
| link.active | ||
| ? 'text-zinc-900 dark:text-zinc-100' | ||
| : 'text-zinc-500 dark:text-zinc-400' | ||
| )} | ||
| > | ||
| {link.icon} | ||
| </Link> | ||
|
cursor[bot] marked this conversation as resolved.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. No organization switching capability on mobileHigh Severity The mobile bottom navigation displays only the five main navigation links but omits the |
||
| ))} | ||
| </div> | ||
|
|
||
| {/* Bottom section with collapse/expand button */} | ||
| <div className="p-4 w-full"> | ||
| <button | ||
| onClick={() => setUserPreference(collapsed ? 'expanded' : 'collapsed')} | ||
| className="flex items-center justify-center p-3 w-full text-zinc-600 dark:text-zinc-400 hover:text-zinc-900 dark:hover:text-zinc-100 rounded-lg" | ||
| title={collapsed ? 'Expand sidebar' : 'Collapse sidebar'} | ||
| > | ||
| {collapsed ? ( | ||
| <FaAngleDoubleRight className="text-xl" /> | ||
| ) : ( | ||
| <FaAngleDoubleLeft className="text-xl" /> | ||
| )} | ||
| </button> | ||
| </div> | ||
| </nav> | ||
| </div> | ||
| </> | ||
| ) | ||
| } | ||
|
|
||
|
|
||


There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Mobile nav z-index renders above modal dialogs
Medium Severity
The new mobile bottom nav has
z-50, butUnlockKeyringDialog(and likely other HeadlessUI dialogs) usez-10. Since the grid container creates no intermediate stacking context and HeadlessUI'sDialogrenders via a Portal todocument.body, these z-indices are compared at the root level. The bottom nav bar will visually appear on top of the dialog overlay and backdrop on mobile, breaking the modal experience and potentially allowing users to tap nav links through the modal.