From 71fbe8e013bfddab0935f65a82732e9820bd4b73 Mon Sep 17 00:00:00 2001 From: maria Date: Sun, 4 Oct 2026 08:56:08 -0300 Subject: [PATCH] fix(desktop): keep titlebar controls inset when zoomed (#15496) --- apps/web/src/components/DiffPanelShell.tsx | 2 +- apps/web/src/components/RightPanelSheet.tsx | 2 +- apps/web/src/index.css | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/apps/web/src/components/DiffPanelShell.tsx b/apps/web/src/components/DiffPanelShell.tsx index 6f7f6e5c8f1f04141eb0dadf1bbbe792c457fef5..456f70516b23b5304242d3d1a0cbfdf74693fe90 100644 --- a/apps/web/src/components/DiffPanelShell.tsx +++ b/apps/web/src/components/DiffPanelShell.tsx @@ -13,7 +13,7 @@ function getDiffPanelHeaderRowClassName(mode: DiffPanelMode) { "flex items-center justify-between gap-2", mode === "embedded" ? "px-2" : "px-4", shouldUseDragRegion - ? "drag-region h-[var(--workspace-topbar-height)] border-b border-border wco:h-[env(titlebar-area-height)] wco:pr-(--workspace-native-controls-inset)" + ? "drag-region h-[var(--workspace-topbar-height)] border-b border-border wco:pr-(--workspace-native-controls-inset)" : "flex h-10 min-h-10 shrink-0 items-center border-b border-border/60 bg-background in-data-[preview-panel-mode=inline]:mb-3 in-data-[preview-panel-mode=inline]:h-7 in-data-[preview-panel-mode=inline]:min-h-7 in-data-[preview-panel-mode=inline]:border-b-transparent", ); } diff --git a/apps/web/src/components/RightPanelSheet.tsx b/apps/web/src/components/RightPanelSheet.tsx index 044369ed0f76624572683ad7958d8ff6a1985fdf..0cad2af5009d8bf5f27bd8eac805409c5c624ae5 100644 --- a/apps/web/src/components/RightPanelSheet.tsx +++ b/apps/web/src/components/RightPanelSheet.tsx @@ -22,7 +22,7 @@ export function RightPanelSheet(props: { side="right" showCloseButton={false} keepMounted - className="w-[min(42vw,28rem)] min-w-80 max-w-[28rem] max-[760px]:w-[min(88vw,24rem)] max-[760px]:min-w-0 wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]" + className="w-[min(42vw,28rem)] min-w-80 max-w-[28rem] max-[760px]:w-[min(88vw,24rem)] max-[760px]:min-w-0 wco:mt-(--workspace-topbar-height) wco:h-[calc(100%-var(--workspace-topbar-height))] wco:max-h-[calc(100%-var(--workspace-topbar-height))]" > {props.children} diff --git a/apps/web/src/index.css b/apps/web/src/index.css index 65e2cef9c5d105bf8c584e61608dc05e70e06a7a..f1c4c3c83cdabd25dc5098f2cb29a4335a8dbcc9 100644 --- a/apps/web/src/index.css +++ b/apps/web/src/index.css @@ -140,7 +140,7 @@ html[data-mobile-composer-route-transition="true"]::view-transition-old(t3-mobil } .wco { - --workspace-topbar-height: env(titlebar-area-height, 52px); + --workspace-topbar-height: max(40px, env(titlebar-area-height, 52px)); --workspace-controls-top: env(titlebar-area-y, 0px); --workspace-controls-left: calc(env(titlebar-area-x, 0px) + 0.75rem); --workspace-controls-right: calc( -- 2.54.0