Skip to content

Commit 8b657d2

Browse files
committed
fix(web): match header icon sizes and action spacing
1 parent da32249 commit 8b657d2

2 files changed

Lines changed: 8 additions & 3 deletions

File tree

‎apps/web/src/components/chat/ChatHeader.tsx‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -487,7 +487,9 @@ export const ChatHeader = memo(function ChatHeader({
487487
data-chat-header-actions
488488
className={cn(
489489
"flex shrink-0 items-center justify-end gap-2 @3xl/header-actions:gap-3",
490-
rightPanelOpen ? "pr-0" : "pr-20 sm:pr-16",
490+
// Reserve two panel toggles plus their 4px gaps and 1px edge inset.
491+
// The page header adds 8px more right padding at sm.
492+
rightPanelOpen ? "pr-0" : "pr-[calc(--spacing(18)+1px)] sm:pr-[calc(--spacing(14)+1px)]",
491493
"[[data-panel-animations=true]_&]:motion-safe:transition-[padding-right] [[data-panel-animations=true]_&]:motion-safe:[transition-duration:var(--panel-animation-duration)] [[data-panel-animations=true]_&]:motion-safe:ease-out",
492494
)}
493495
>

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

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -158,7 +158,10 @@ function SidebarProvider({
158158
<SidebarContext value={contextValue}>
159159
<div
160160
// Inset layouts opt into bg-sidebar through className.
161-
className={cn("group/sidebar-wrapper flex min-h-svh w-full", className)}
161+
className={cn(
162+
"group/sidebar-wrapper flex min-h-svh w-full max-sm:[--workspace-titlebar-control-size:--spacing(8)]",
163+
className,
164+
)}
162165
data-sidebar-state={state}
163166
data-slot="sidebar-wrapper"
164167
style={
@@ -340,7 +343,7 @@ function SidebarTrigger({ className, onClick, ...props }: React.ComponentProps<t
340343
variant="ghost"
341344
{...props}
342345
>
343-
{isOpen ? <PanelLeftCloseIcon /> : <PanelLeftIcon />}
346+
{isOpen ? <PanelLeftCloseIcon className="size-4" /> : <PanelLeftIcon className="size-4" />}
344347
<span className="sr-only">Toggle Sidebar</span>
345348
</Button>
346349
);

0 commit comments

Comments
 (0)