Skip to content

Commit 6d1505c

Browse files
fix: Change right panel sheet to be below title bar / action bar (pingdotgg#2224)
Co-authored-by: Julius Marminge <julius0216@outlook.com>
1 parent 306ec4b commit 6d1505c

2 files changed

Lines changed: 4 additions & 3 deletions

File tree

apps/web/src/components/DiffPanelShell.tsx

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,9 +10,9 @@ export type DiffPanelMode = "inline" | "sheet" | "sidebar";
1010
function getDiffPanelHeaderRowClassName(mode: DiffPanelMode) {
1111
const shouldUseDragRegion = isElectron && mode !== "sheet";
1212
return cn(
13-
"flex items-center justify-between gap-2 px-4 wco:pr-[calc(100vw-env(titlebar-area-width)-env(titlebar-area-x)+1em)]",
13+
"flex items-center justify-between gap-2 px-4",
1414
shouldUseDragRegion
15-
? "drag-region h-[52px] border-b border-border wco:h-[env(titlebar-area-height)]"
15+
? "drag-region h-[52px] border-b border-border wco:h-[env(titlebar-area-height)] wco:pr-[calc(100vw-env(titlebar-area-width)-env(titlebar-area-x)+1em)]"
1616
: "h-12 wco:max-h-[env(titlebar-area-height)]",
1717
);
1818
}

apps/web/src/rightPanelLayout.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
export const RIGHT_PANEL_INLINE_LAYOUT_MEDIA_QUERY = "(max-width: 1180px)";
2-
export const RIGHT_PANEL_SHEET_CLASS_NAME = "w-[min(88vw,820px)] max-w-[820px] p-0";
2+
export const RIGHT_PANEL_SHEET_CLASS_NAME =
3+
"w-[min(88vw,820px)] max-w-[820px] p-0 wco:mt-[env(titlebar-area-height)] wco:h-[calc(100%-env(titlebar-area-height))] wco:max-h-[calc(100%-env(titlebar-area-height))]";

0 commit comments

Comments
 (0)