Improve HK sidebar and restore nested content scrolling
CI / check (push) Successful in 1m30s
CI / deploy (push) Successful in 1m22s
CI / e2e (push) Successful in 21s

This commit is contained in:
Simo committed 2026-09-05 12:50:52 +02:00
1 parent bf126fd825
commit 2578bf6a09
27 files changed
+184 -20

No files matched your search

+10 -5
View File
@@ -42,11 +42,11 @@ export function AdminMobileWrapper({
return (
<AdminMobileContext.Provider value={mobile}>
{/* Wider than public max-w-7xl (80rem), capped so it never goes full-bleed. */}
<div className="min-h-screen bg-[var(--admin-canvas)]">
<div className="mx-auto flex min-h-screen w-full max-w-full min-w-0 flex-col lg:max-w-[96rem] lg:flex-row lg:border-x lg:shadow-xl border-[var(--admin-border)]">
<div className="h-dvh overflow-hidden bg-[var(--admin-canvas)]">
<div className="mx-auto flex h-full min-h-0 w-full max-w-full min-w-0 flex-col lg:max-w-[96rem] lg:flex-row lg:border-x lg:shadow-xl border-[var(--admin-border)]">
{/* Mobile header */}
<div
className={`lg:hidden sticky top-0 flex items-center gap-3 px-4 py-3 border-b ${
className={`lg:hidden shrink-0 flex items-center gap-3 px-4 py-3 border-b ${
open ? "z-30" : "z-50"
}`}
style={{
@@ -84,7 +84,7 @@ export function AdminMobileWrapper({
{/* Sidebar */}
<div
className={`fixed inset-y-0 left-0 z-50 flex h-full w-[260px] flex-col overflow-hidden lg:!relative lg:!min-h-screen lg:!translate-x-0 ${
className={`fixed inset-y-0 left-0 z-50 flex h-full w-[260px] flex-col overflow-hidden lg:!relative lg:shrink-0 lg:!translate-x-0 ${
open ? "translate-x-0" : "-translate-x-full"
}`}
style={{ transition: "transform 300ms ease-in-out" }}
@@ -93,7 +93,12 @@ export function AdminMobileWrapper({
</div>
{/* Content */}
<div className="flex flex-col flex-1 min-w-0">{children}</div>
<div
data-admin-content
className="min-h-0 min-w-0 flex-1 overflow-auto overscroll-contain"
>
{children}
</div>
</div>
</div>
</AdminMobileContext.Provider>