From 23c738efacf02e05b95b3802dd7e5c7aa3f5d8b5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Marc-Andr=C3=A9=20Bombeck?= Date: Wed, 29 Jul 2026 14:36:18 +0200 Subject: [PATCH] fix(01-17): align and pin desktop sidebars - place both sidebars on the heading row with one main scroll owner - bound short-viewport sidebar content without horizontal layout drift --- src/components/admin/admin-shell.tsx | 27 ++++++--- src/components/settings/settings-shell.tsx | 69 +++++++++++++--------- 2 files changed, 62 insertions(+), 34 deletions(-) diff --git a/src/components/admin/admin-shell.tsx b/src/components/admin/admin-shell.tsx index 5fe4ab59c..9ba3cebad 100644 --- a/src/components/admin/admin-shell.tsx +++ b/src/components/admin/admin-shell.tsx @@ -253,9 +253,19 @@ export function AdminShell({ active, children }: AdminShellProps) { ? t("admin.subtitle") : t(`admin.section.${activeSlug}.subtitle`); - const headingBlock = ( + const headingBlock = (mobile = false) => (
-

{headingTitle}

+ {mobile ? ( +
+ {headingTitle} +
+ ) : ( +

{headingTitle}

+ )}

{headingSubtitle}

); @@ -269,7 +279,7 @@ export function AdminShell({ active, children }: AdminShellProps) {
{/* v1.18.6.1 — heading above the chip strip on mobile; on desktop it renders inside the grid (row 1 / content column). */} -
{headingBlock}
+
{headingBlock(true)}
{/* Mobile section strip — horizontal scroll, hidden on md+. `no-scrollbar` (defined in `globals.css`) suppresses the @@ -359,10 +369,13 @@ export function AdminShell({ active, children }: AdminShellProps) { > {/* Heading — desktop only (mobile renders it above the strip). */}
- {headingBlock} + {headingBlock()}
- {/* Desktop sticky sidebar — starts at the cards row (row 2). + {/* Desktop sticky sidebar — starts on the heading row and spans the + two desktop rows. Its top therefore shares the heading's grid + line while the content column keeps the natural heading-to-card + gap in row 2. The sticky lives on the `
); diff --git a/src/components/settings/settings-shell.tsx b/src/components/settings/settings-shell.tsx index 287bcad7b..2c5cafc26 100644 --- a/src/components/settings/settings-shell.tsx +++ b/src/components/settings/settings-shell.tsx @@ -476,29 +476,41 @@ export function SettingsShell({ } : null); - const headingBlock = resolvedHeading ? ( -
- {resolvedHeading.topSlot ?
{resolvedHeading.topSlot}
: null} -
-
-

- {resolvedHeading.title} -

- {resolvedHeading.subtitle ? ( -

- {resolvedHeading.subtitle} -

+ const headingBlock = (mobile = false) => + resolvedHeading ? ( +
+ {resolvedHeading.topSlot ?
{resolvedHeading.topSlot}
: null} +
+
+ {mobile ? ( +
+ {resolvedHeading.title} +
+ ) : ( +

+ {resolvedHeading.title} +

+ )} + {resolvedHeading.subtitle ? ( +

+ {resolvedHeading.subtitle} +

+ ) : null} +
+ {resolvedHeading.headingAccessory ? ( +
{resolvedHeading.headingAccessory}
) : null}
- {resolvedHeading.headingAccessory ? ( -
{resolvedHeading.headingAccessory}
- ) : null}
-
- ) : null; + ) : null; // v1.4.25 W8 — AuthShell wraps the page in `px-4 py-6 md:px-6` // already, so this inner shell only carries the wider max-width. @@ -510,8 +522,8 @@ export function SettingsShell({ {/* v1.18.6.1 — on mobile the heading sits above the chip strip; on desktop it is rendered inside the grid (row 1 / content column) so it does not paint twice. */} - {headingBlock ? ( -
{headingBlock}
+ {resolvedHeading ? ( +
{headingBlock(true)}
) : null} {/* Mobile section strip — horizontal scroll, hidden on md+. @@ -588,13 +600,16 @@ export function SettingsShell({ )} > {/* Heading — desktop only here (mobile renders it above the strip). */} - {headingBlock ? ( + {resolvedHeading ? (
- {headingBlock} + {headingBlock()}
) : null} - {/* Desktop sticky sidebar — starts at the cards row (row 2). + {/* Desktop sticky sidebar — starts on the heading row and spans the + two desktop rows. Its top therefore shares the heading's grid + line while the content column keeps the natural heading-to-card + gap in row 2. The sticky lives on the `
);