Skip to content

Commit 6d848b7

Browse files
andresdjassoclaude
andcommitted
fix(resource-header): match the chat title bar chrome rhythm
- Fixed 44px bar (was padding-derived) with a unified 16px gutter across the breadcrumb and title-only variants - Sidebar toggle and right-edge actions pull out 9px so their hover pills sit 7px from the panel edge, equal to the pill's vertical clearance - Action/create buttons standardized to the 30px rounded-lg pill with surface-active hover, matching every other title-bar control Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
1 parent 79ed4ae commit 6d848b7

1 file changed

Lines changed: 9 additions & 12 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-header

apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-header/resource-header.tsx

Lines changed: 9 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -112,14 +112,13 @@ export const ResourceHeader = memo(function ResourceHeader({
112112
return (
113113
<div
114114
ref={headerRef}
115-
className={cn(
116-
'border-[var(--border)] border-b',
117-
hasBreadcrumbs ? 'px-4 py-[8.5px]' : 'px-6 py-2.5'
118-
)}
115+
className='flex h-[44px] items-center border-[var(--border)] border-b px-4'
119116
>
120-
<div className='flex min-w-0 items-center justify-between gap-3'>
117+
<div className='flex min-w-0 flex-1 items-center justify-between gap-3'>
121118
<div className='flex min-w-0 flex-1 items-center gap-2 overflow-hidden'>
122-
<SidebarToggle />
119+
{/* Edge controls pull out by 9px so their 30px hover pills sit 7px
120+
from the panel edge — same rhythm as the chat title bar. */}
121+
<SidebarToggle className='-ml-[9px]' />
123122
<ChatSwitcher />
124123
{hasBreadcrumbs ? (
125124
breadcrumbs.map((crumb, i) => {
@@ -169,7 +168,7 @@ export const ResourceHeader = memo(function ResourceHeader({
169168
</>
170169
)}
171170
</div>
172-
<div className='flex shrink-0 items-center gap-1.5'>
171+
<div className='-mr-[9px] flex shrink-0 items-center gap-1.5'>
173172
{leadingActions}
174173
{actions?.map((action) => {
175174
const ActionIcon = action.icon
@@ -180,11 +179,9 @@ export const ResourceHeader = memo(function ResourceHeader({
180179
disabled={action.disabled}
181180
variant='subtle'
182181
className={cn(
183-
'whitespace-nowrap px-2 py-1 text-caption',
184-
action.active !== undefined && 'rounded-lg',
182+
'h-[30px] whitespace-nowrap rounded-lg bg-transparent px-2 text-caption hover-hover:bg-[var(--surface-active)]',
185183
action.active === true &&
186-
'bg-[var(--surface-active)] hover-hover:bg-[var(--surface-active)]',
187-
action.active === false && 'hover-hover:bg-[var(--surface-hover)]'
184+
'bg-[var(--surface-active)] hover-hover:bg-[var(--surface-active)]'
188185
)}
189186
>
190187
{ActionIcon && (
@@ -203,7 +200,7 @@ export const ResourceHeader = memo(function ResourceHeader({
203200
onClick={create.onClick}
204201
disabled={create.disabled}
205202
variant='subtle'
206-
className='whitespace-nowrap px-2 py-1 text-caption'
203+
className='h-[30px] whitespace-nowrap rounded-lg bg-transparent px-2 text-caption hover-hover:bg-[var(--surface-active)]'
207204
>
208205
{HEADER_PLUS_ICON}
209206
{create.label}

0 commit comments

Comments
 (0)