Skip to content

Commit f48b40a

Browse files
committed
fix(web): refine disabled panel shortcuts and glass rendering
1 parent 1fb78dd commit f48b40a

4 files changed

Lines changed: 12 additions & 7 deletions

File tree

‎apps/web/src/components/DiffPanelShell.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ function getDiffPanelHeaderRowClassName(mode: DiffPanelMode) {
1313
"flex items-center justify-between gap-2",
1414
mode === "embedded" ? "px-2" : "px-4",
1515
shouldUseDragRegion
16-
? "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)]"
16+
? "drag-region h-[var(--workspace-topbar-height)] border-b border-border wco:h-[env(titlebar-area-height)] wco:pr-[calc(100vw-env(titlebar-area-width)-env(titlebar-area-x)+1em)]"
1717
: "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",
1818
);
1919
}

‎apps/web/src/components/RightPanelTabs.tsx‎

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -568,13 +568,12 @@ function RightPanelEmptyState(props: {
568568
trigger={
569569
<div
570570
tabIndex={0}
571+
aria-disabled="true"
571572
className="flex h-8 w-full cursor-default items-center gap-2.5 rounded-[var(--control-radius)] px-2.5 text-left text-sm opacity-50"
572573
>
573574
{actionIcon(action, "size-4")}
574-
<span className="shrink-0">{action.label}</span>
575-
<span className="ml-auto min-w-0 truncate text-muted-foreground text-xs">
576-
{action.disabledReason}
577-
</span>
575+
<span className="min-w-0 flex-1 truncate">{action.label}</span>
576+
<Kbd>{action.shortcut}</Kbd>
578577
</div>
579578
}
580579
/>

‎apps/web/src/components/ui/toast.tsx‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -560,7 +560,7 @@ function Toasts({ position }: { position: ToastPosition }) {
560560
<Toast.Portal data-slot="toast-portal">
561561
<Toast.Viewport
562562
className={cn(
563-
"fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:52px] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]",
563+
"fixed z-100 mx-auto flex w-[calc(100%-var(--toast-inset)*2)] max-w-90 [--toast-header-offset:var(--workspace-topbar-height)] [--toast-inset:--spacing(4)] sm:[--toast-inset:--spacing(8)]",
564564
// Vertical positioning
565565
"data-[position*=top]:top-[calc(var(--toast-inset)+var(--toast-header-offset))]",
566566
"data-[position*=bottom]:bottom-(--toast-inset)",

‎apps/web/src/routes/__root.tsx‎

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -243,7 +243,13 @@ function GlassAppearanceSync() {
243243
const glassOpacity = useClientSettings((settings) => settings.glassOpacity);
244244

245245
useEffect(() => {
246-
document.documentElement.style.setProperty("--glass-opacity", `${glassOpacity}%`);
246+
const style = document.documentElement.style;
247+
style.setProperty("--glass-opacity", `${glassOpacity}%`);
248+
if (glassOpacity === 100) {
249+
style.setProperty("--glass-blur", "0px");
250+
} else {
251+
style.removeProperty("--glass-blur");
252+
}
247253
}, [glassOpacity]);
248254

249255
return null;

0 commit comments

Comments
 (0)