From 8fcbe45d360e4335ebe7937663d7254fc6d0920b Mon Sep 17 00:00:00 2001 From: Matt Date: Thu, 21 May 2026 18:31:32 +0200 Subject: [PATCH] =?UTF-8?q?feat(uat-batch-17):=20layout=20polish=20?= =?UTF-8?q?=E2=80=94=20DocumentsHub=20flush-left,=20breadcrumb=20wrap=20fi?= =?UTF-8?q?x,=20viewport-centered=20topbar=20search?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - DocumentsHub root container gains `sm:-mx-6 sm:-mt-3 sm:-mb-6` to escape the AppShell main padding (`px-6 pt-3 pb-6`). The folder column now sits flush against the global app sidebar, reading as an extension of navigation rather than a card-inside-a-page. Mobile layout retains the AppShell padding. - Breadcrumbs: each crumb + its trailing separator now share a single `` instead of being separate `
  • `s. Flex-wrap can no longer strand an orphan separator at end-of-line above a wrapped child crumb. Drops the standalone `` usage from the consumer; the primitive is still exported for backcompat. - Topbar search visually centered against the full viewport via a `translate-x:calc(-var(--width-sidebar)/2)` shift. Grid middle slot bumped from `minmax(360px, 640px)` → `minmax(420px, 800px)` and the search wrapper from `max-w-md` → `max-w-2xl` so reps actually have room to read long results. tsc clean. 1419/1419 vitest pass. Co-Authored-By: Claude Opus 4.7 (1M context) --- src/components/documents/documents-hub.tsx | 7 ++++- src/components/layout/breadcrumbs.tsx | 35 +++++++++++----------- src/components/layout/topbar.tsx | 13 ++++---- 3 files changed, 32 insertions(+), 23 deletions(-) diff --git a/src/components/documents/documents-hub.tsx b/src/components/documents/documents-hub.tsx index 25e1cb61..b1be5495 100644 --- a/src/components/documents/documents-hub.tsx +++ b/src/components/documents/documents-hub.tsx @@ -243,7 +243,12 @@ export function DocumentsHub({ portSlug }: DocumentsHubProps) { ); return ( -
    + // Escape the AppShell's desktop main padding (px-6 pt-3 pb-6) so the + // folder column sits flush against the global app sidebar — reads + // as an extension of navigation rather than a card-inside-a-page. + // Inner content keeps its own padding so the right pane doesn't + // run flush with the viewport edge. +
    {/* Mobile: stacked, with a Sheet drawer for folders. */}
    - {crumbs.map((crumb, _index) => ( - - - {crumb.isLast ? ( - - {crumb.label} - - ) : ( + {crumbs.map((crumb) => ( + // Each crumb + its trailing separator share a single + // inline-flex `
  • ` so flex-wrap can't strand the + // separator at end-of-line above the wrapped child crumb. + + {crumb.isLast ? ( + + {crumb.label} + + ) : ( + <> - )} - - {!crumb.isLast && ( - - - + + )} - + ))} diff --git a/src/components/layout/topbar.tsx b/src/components/layout/topbar.tsx index 9ca5066a..dff2adaa 100644 --- a/src/components/layout/topbar.tsx +++ b/src/components/layout/topbar.tsx @@ -54,7 +54,7 @@ export function Topbar({ ports, user }: TopbarProps) { // Three-column grid: breadcrumbs left, search center, actions right. // The brand logo lives in the sidebar header (per design feedback) so the // topbar center is dedicated to the global search bar. -
    +
    {/* LEFT: optional back button + breadcrumbs / page title */}
    {showBackButton && ( @@ -74,11 +74,14 @@ export function Topbar({ ports, user }: TopbarProps) {
    - {/* CENTER: global search - capped width and horizontally centered - inside its grid slot so it sits visually in the middle of the - topbar regardless of breadcrumb / action-row width. */} + {/* CENTER: global search - capped width and visually centered + against the FULL viewport (not the post-sidebar area) via a + translate-X that shifts left by half the sidebar width. + Without the translate the topbar's grid centers inside the + area-after-the-sidebar, so the search visually drifts right + by half the sidebar width. */}
    -
    +