From 8e16651232f4c606f9e14b2223703416ef16ba7b Mon Sep 17 00:00:00 2001 From: "bert.hausmans" Date: Thu, 21 May 2026 00:15:34 +0200 Subject: [PATCH] style(layout): sidebar brand-square symmetry + WorkspaceSwitcher trigger polish MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Plan 2.5 P6 follow-up. Closes two desktop shell-parity gaps from P6 manual smoke against crewli-starter SoT: - Sidebar logo decoupled from the collapse toggle. Expanded layout is now justify-between (brand group left, collapse chevron right) and collapsed layout is justify-center with the logo alone. The expand affordance becomes a small absolute-positioned circular button at the rail's right edge — solid background + border so the slight overlap with the centred logo reads as a tucked-in chip rather than a collision. Toggling collapsed no longer shifts the logo. - Brand square (SidebarHeader logo) and workspace avatar (WorkspaceSwitcher trigger) unified to the same rounded square (h-8 w-8 rounded-xl). Existing sizes were already consistent at 32px — radius bumped from rounded-lg (8px) / var(--p-border-radius) (~6px) to rounded-xl (12px) per the design direction. Collapsed rail now reads as a vertical mirror: brand square at the top, avatar square at the bottom, bracketing the nav icons. - WorkspaceSwitcher trigger restyled: rounded-xl (was the sharper var-radius), p-2 (was px-[10px] py-[8px]), hover background. The collapsed-variant gating of name + chevron is unchanged from P5. Edge-mounted overhang past the rail edge was not possible: the aside carries `overflow-hidden` (intentional, for the w-64 ⇄ w-16 width transition) which clips anything past the rail edge. The tucked-chip pattern (24px circle at end-0, solid bg) is the visual compromise — the affordance stays inside the rail, discoverable, and visually decoupled from the logo. Desktop only. Mobile drawer chrome (logo placement, drawer X button, missing switcher) tracked separately as MOBILE-SHELL-PARITY. Tests: - +2 WorkspaceSwitcher.spec.ts: trigger uses rounded-xl; collapsed trigger renders avatar only (hides .meta). - +1 SidebarHeader.spec.ts: collapsed row hides the .brand-name wordmark and toggles to justify-center (logo-stays-centred lock). Suite delta: 558 → 561 (+3). vue-tsc clean. Scoped ESLint clean (0 errors, pre-existing warnings only). Manual smoke pending Bert: collapse the rail, verify logo stays put and the expand chip appears at the right edge; verify the trigger shows rounded corners + hover bg; verify the collapsed avatar mirrors the brand square size/radius. Co-Authored-By: Claude Opus 4.7 (1M context) --- .../components-v2/layout/SidebarHeader.vue | 112 +++++++++++------- .../layout/WorkspaceSwitcher.vue | 18 ++- .../layout/__tests__/SidebarHeader.spec.ts | 22 ++++ .../__tests__/WorkspaceSwitcher.spec.ts | 21 +++- 4 files changed, 120 insertions(+), 53 deletions(-) diff --git a/apps/app/src/components-v2/layout/SidebarHeader.vue b/apps/app/src/components-v2/layout/SidebarHeader.vue index 1ffeaec5..df6a0420 100644 --- a/apps/app/src/components-v2/layout/SidebarHeader.vue +++ b/apps/app/src/components-v2/layout/SidebarHeader.vue @@ -12,29 +12,24 @@ * - Desktop (>=lg): toggle the persistent sidebar between expanded/collapsed * → call toggleSidebar(). * - * CSS translation (main.css → Tailwind): - * .brand → flex items-center gap-[10px] h-[var(--topbar-h,56px)] - * px-4 border-b border-[var(--p-content-border-color)] - * flex-shrink-0 relative - * .brand.collapsed → justify-center (via :class when sidebarCollapsed) - * .mark → w-8 h-8 flex-shrink-0 rounded-lg - * bg-gradient-to-br from-primary-500 to-primary-700 - * inline-flex items-center justify-center - * text-white font-bold text-sm - * .wordmark → font-bold text-base tracking-[-0.01em] whitespace-nowrap - * .pill → text-[9px] font-semibold bg-primary-50 dark:bg-primary-950 - * text-primary-600 dark:text-primary-400 px-1.5 py-px - * rounded-full uppercase tracking-[0.05em] - * .sidebar-collapse → ms-auto w-7 h-7 border-0 bg-transparent - * text-[var(--p-text-muted-color)] rounded-[var(--p-border-radius)] - * inline-flex items-center justify-center - * transition-[background,color] duration-150 - * hover:bg-[var(--p-content-hover-background)] - * hover:text-[var(--p-text-color)] + * Plan 2.5 P6-followup-styling: the collapse-toggle is decoupled from the + * brand group so the logo stays centered in the collapsed rail. + * - Expanded: justify-between row — [brand group] [collapse chevron]. + * - Collapsed: justify-center row — [logo only], with the expand chevron + * as a small floating circle absolute-positioned at the rail's right + * edge (tucked over the logo's right side with a solid background + * so the visual reads as an intentional chip, not an overlap). The + * aside's `overflow-hidden` (intentional, for the width transition) + * prevents true overhang past the rail edge — the tucked pattern is + * the visual compromise that keeps the affordance discoverable. * - *