Skip to content

Commit f7cbb98

Browse files
authored
fix: sidebar layout polish — aligned header, compact selectors, settings tabs (#74)
- Sidebar logo row now uses h-14 to match main content header height, aligning the separator with the header's border-b - Collapsed logo shows "Vf" instead of just "V" - Team and environment selectors made compact and consistent (both h-8, full-width, matching text-xs style) - Settings tab separators use bg-muted-foreground/25 for better visibility against the muted tabs background
1 parent deb670b commit f7cbb98

4 files changed

Lines changed: 25 additions & 28 deletions

File tree

src/app/(dashboard)/settings/page.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3400,12 +3400,12 @@ export default function SettingsPage() {
34003400
)}
34013401
{isSuperAdmin && (
34023402
<>
3403-
{isTeamAdmin && <Separator orientation="vertical" className="h-5" />}
3403+
{isTeamAdmin && <Separator orientation="vertical" className="h-5 bg-muted-foreground/25" />}
34043404
<TabsTrigger value="auth">
34053405
<Shield className="mr-2 h-4 w-4" />
34063406
Auth
34073407
</TabsTrigger>
3408-
<Separator orientation="vertical" className="h-5" />
3408+
<Separator orientation="vertical" className="h-5 bg-muted-foreground/25" />
34093409
<TabsTrigger value="users">
34103410
<Users className="mr-2 h-4 w-4" />
34113411
Users
@@ -3414,7 +3414,7 @@ export default function SettingsPage() {
34143414
<Layers className="mr-2 h-4 w-4" />
34153415
Teams
34163416
</TabsTrigger>
3417-
<Separator orientation="vertical" className="h-5" />
3417+
<Separator orientation="vertical" className="h-5 bg-muted-foreground/25" />
34183418
<TabsTrigger value="fleet">
34193419
<Server className="mr-2 h-4 w-4" />
34203420
Fleet

src/components/app-sidebar.tsx

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -85,20 +85,23 @@ export function AppSidebar() {
8585

8686
return (
8787
<Sidebar collapsible="icon">
88-
<SidebarHeader className="px-4 pt-3 pb-0 group-data-[collapsible=icon]:px-2">
89-
<Link href="/" className="flex items-center gap-2 py-1">
90-
<span className="text-xl tracking-tight group-data-[collapsible=icon]:hidden">
91-
<span className="font-bold">Vector</span>
92-
<span className="font-light">Flow</span>
93-
</span>
94-
<span className="hidden text-xl font-bold group-data-[collapsible=icon]:block">V</span>
95-
</Link>
96-
<Separator className="my-2 group-data-[collapsible=icon]:hidden" />
97-
<div className="px-3 pb-3 space-y-2 group-data-[collapsible=icon]:hidden">
88+
<SidebarHeader className="p-0 group-data-[collapsible=icon]:p-0">
89+
{/* Logo row — matches the h-14 main content header for border alignment */}
90+
<div className="flex h-14 items-center px-4 group-data-[collapsible=icon]:justify-center group-data-[collapsible=icon]:px-2">
91+
<Link href="/" className="flex items-center gap-2">
92+
<span className="text-xl tracking-tight group-data-[collapsible=icon]:hidden">
93+
<span className="font-bold">Vector</span>
94+
<span className="font-light">Flow</span>
95+
</span>
96+
<span className="hidden text-xl group-data-[collapsible=icon]:block"><span className="font-bold">V</span><span className="font-light">f</span></span>
97+
</Link>
98+
</div>
99+
<Separator />
100+
{/* Context selectors */}
101+
<div className="space-y-1.5 p-3 group-data-[collapsible=icon]:hidden">
98102
<TeamSelector />
99103
<EnvironmentSelector />
100104
</div>
101-
<Separator className="group-data-[collapsible=icon]:hidden" />
102105
{/* Collapsed mode: icon buttons with popovers */}
103106
<div className="hidden group-data-[collapsible=icon]:flex flex-col items-center gap-1 py-2">
104107
<Popover>

src/components/environment-selector.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ export function EnvironmentSelector() {
7575
}, [selectedEnvironmentId, systemEnvironment, setIsSystemEnvironment]);
7676

7777
if (envsQuery.isLoading) {
78-
return <Skeleton className="h-9 w-[180px]" />;
78+
return <Skeleton className="h-8 w-full" />;
7979
}
8080

8181
if (environments.length === 0 && !systemEnvironment) {
@@ -94,7 +94,7 @@ export function EnvironmentSelector() {
9494
value={selectedEnvironmentId ?? ""}
9595
onValueChange={handleEnvironmentChange}
9696
>
97-
<SelectTrigger className="h-8 w-[180px] text-xs">
97+
<SelectTrigger className="h-8 w-full text-xs">
9898
<Layers className="mr-1.5 h-3.5 w-3.5 text-muted-foreground" />
9999
<SelectValue placeholder="Select environment" />
100100
</SelectTrigger>

src/components/team-selector.tsx

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -40,24 +40,18 @@ export function TeamSelector() {
4040
// Single team — show name only, no dropdown
4141
if (teams.length === 1) {
4242
return (
43-
<div className="flex items-center gap-2 rounded-md border bg-card px-3 py-2">
44-
<div className="flex h-6 w-6 items-center justify-center rounded bg-primary/10 text-primary">
45-
<Users className="h-3.5 w-3.5" />
46-
</div>
47-
<span className="text-sm font-medium truncate">{teams[0].name}</span>
43+
<div className="flex items-center gap-2 rounded-md px-2 py-1.5 text-sm">
44+
<Users className="h-3.5 w-3.5 shrink-0 text-muted-foreground" />
45+
<span className="font-medium truncate">{teams[0].name}</span>
4846
</div>
4947
);
5048
}
5149

5250
return (
5351
<Select value={selectedTeamId ?? undefined} onValueChange={setSelectedTeamId}>
54-
<SelectTrigger className="w-full h-auto border-sidebar-border bg-sidebar px-3 py-2 text-sm">
55-
<div className="flex items-center gap-2">
56-
<div className="flex h-6 w-6 shrink-0 items-center justify-center rounded bg-primary/10 text-primary">
57-
<Users className="h-3.5 w-3.5" />
58-
</div>
59-
<SelectValue placeholder="Select team" />
60-
</div>
52+
<SelectTrigger className="w-full h-8 text-xs">
53+
<Users className="mr-1.5 h-3.5 w-3.5 text-muted-foreground" />
54+
<SelectValue placeholder="Select team" />
6155
</SelectTrigger>
6256
<SelectContent>
6357
{teams.map((team) => (

0 commit comments

Comments
 (0)