From 7d7d152d4e0ecccf7590b58ee6415bec2a690ac7 Mon Sep 17 00:00:00 2001 From: Kacper Date: Fri, 30 Jan 2026 20:36:33 +0100 Subject: [PATCH] fix(ui): Adjust sidebar padding for macOS Electron compatibility Updated the sidebar header and navigation components to increase top padding for macOS Electron users from 10px to 38px, ensuring better layout and avoiding overlap with the traffic light controls. This change enhances the user experience on macOS platforms. --- .../components/layout/sidebar/components/sidebar-header.tsx | 4 ++-- .../layout/sidebar/components/sidebar-navigation.tsx | 6 ++++-- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx b/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx index 7a92aec9..10b656cf 100644 --- a/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx +++ b/apps/ui/src/components/layout/sidebar/components/sidebar-header.tsx @@ -89,7 +89,7 @@ export function SidebarHeader({
@@ -240,7 +240,7 @@ export function SidebarHeader({
{/* Header with logo and project dropdown */} diff --git a/apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx b/apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx index 905448cd..d3e7d5cc 100644 --- a/apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx +++ b/apps/ui/src/components/layout/sidebar/components/sidebar-navigation.tsx @@ -3,7 +3,8 @@ import type { NavigateOptions } from '@tanstack/react-router'; import { ChevronDown, Wrench, Github, Folder } from 'lucide-react'; import * as LucideIcons from 'lucide-react'; import type { LucideIcon } from 'lucide-react'; -import { cn } from '@/lib/utils'; +import { cn, isMac } from '@/lib/utils'; +import { isElectron } from '@/lib/electron'; import { formatShortcut, useAppStore } from '@/store/app-store'; import { getAuthenticatedImageUrl } from '@/lib/api-fetch'; import type { NavSection } from '../types'; @@ -117,7 +118,8 @@ export function SidebarNavigation({ className={cn( 'flex-1 overflow-y-auto scrollbar-hide px-3 pb-2', // Add top padding in discord mode since there's no header - sidebarStyle === 'discord' ? 'pt-3' : 'mt-1' + // Extra padding for macOS Electron to avoid traffic light overlap + sidebarStyle === 'discord' ? (isMac && isElectron() ? 'pt-[38px]' : 'pt-3') : 'mt-1' )} > {/* Project name display for classic/discord mode */}