Skip to content

Commit 9efbe36

Browse files
authored
fix(ui): tighten resource header action spacing (#7172)
1 parent b478c8a commit 9efbe36

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
import { describe, expect, it } from 'vitest'
2+
import { RESOURCE_HEADER_CLASSES } from '@/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tab-controls'
3+
4+
describe('resource header geometry', () => {
5+
it('moves the action cluster beside the collapse target without moving the toggle', () => {
6+
expect(RESOURCE_HEADER_CLASSES.layout).toContain('[--resource-header-end-inset:16px]')
7+
expect(RESOURCE_HEADER_CLASSES.layout).toContain('[--resource-header-fixed-reserve:52px]')
8+
expect(RESOURCE_HEADER_CLASSES.layout).toContain('[--resource-header-toggle-hit-size:40px]')
9+
expect(RESOURCE_HEADER_CLASSES.layout).toContain('[--resource-header-toggle-size:30px]')
10+
expect(RESOURCE_HEADER_CLASSES.endPosition).toBe('right-[var(--resource-header-end-inset)]')
11+
})
12+
})

apps/sim/app/workspace/[workspaceId]/home/components/mothership-view/components/resource-tabs/resource-tab-controls.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ export const RESOURCE_TAB_ICON_CLASS = 'size-[16px] text-[var(--text-icon)]'
1010
/** Shared geometry for the resource header and controls positioned over it. */
1111
export const RESOURCE_HEADER_CLASSES = {
1212
layout:
13-
'[--resource-header-controls-height:40px] [--resource-header-end-inset:16px] [--resource-header-fixed-reserve:64px] [--resource-header-toggle-hit-size:40px] [--resource-header-toggle-size:30px]',
13+
'[--resource-header-controls-height:40px] [--resource-header-end-inset:16px] [--resource-header-fixed-reserve:52px] [--resource-header-toggle-hit-size:40px] [--resource-header-toggle-size:30px]',
1414
/**
1515
* Drives the tab strip from this header's own tokens rather than restating the
1616
* strip's defaults, so the height the overlaid controls below are positioned

0 commit comments

Comments
 (0)