Skip to content

Commit 4e0f3de

Browse files
andresdjassoclaude
authored andcommitted
improvement(tables): redraw the empty-state graphic in the house grayscale
Matches the workflow editor's vignette and the landing feature graphics, which between them use no brand colour at all — every one of them is built from neutral tokens. Two corrections: - The blue edit ring is gone. Nothing in the reference graphics carries a hue, and it was the loudest element on the page. - `--surface-4`/`--surface-5` are near-white in light mode (#f5f5f5/#f3f3f3), so skeleton geometry built on them dissolved on a white card. Bars now mix `--text-secondary` into transparent at graded strengths — a real mid-grey that inverts with the theme, which is the idiom the editor vignette already uses for the one bar it needs you to see. Also drops the full-composition mask. The editor vignette keeps its block fully opaque and fades only the connector strokes leaving the frame; masking everything is what made the miniature read washed rather than deliberate. The card is crisp now and the continuation is drawn the way a real table draws it — an overflow fade at the edge the columns run off. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
1 parent d51a7cc commit 4e0f3de

1 file changed

Lines changed: 81 additions & 41 deletions

File tree

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

apps/sim/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/tables-empty-state.tsx

Lines changed: 81 additions & 41 deletions
Original file line numberDiff line numberDiff line change
@@ -1,61 +1,101 @@
1+
import { cn } from '@sim/emcn'
12
import { EmptyState } from '@/components/empty-state/empty-state'
2-
import {
3-
Bar,
4-
Vignette,
5-
} from '@/app/workspace/[workspaceId]/components/resource/components/resource-empty-state/vignette'
63

7-
/** Cell fill widths per column, row by row — varied so the grid reads as data, not a lattice. */
4+
/**
5+
* Neutral ink at graded strengths.
6+
*
7+
* `--surface-4`/`--surface-5` are near-white in light mode (`#f5f5f5`/`#f3f3f3`),
8+
* so skeleton geometry built on them dissolves on a white card. Mixing
9+
* `--text-secondary` into transparent instead gives a real mid-grey that inverts
10+
* with the theme — the same idiom the workflow editor's empty state uses for the
11+
* one bar it needs you to actually see.
12+
*/
13+
const INK = {
14+
header: 'color-mix(in srgb, var(--text-secondary) 32%, transparent)',
15+
headerType: 'color-mix(in srgb, var(--text-secondary) 26%, transparent)',
16+
cell: 'color-mix(in srgb, var(--text-secondary) 17%, transparent)',
17+
selection: 'color-mix(in srgb, var(--text-secondary) 30%, transparent)',
18+
} as const
19+
20+
const COLUMN_TEMPLATE = '84px 66px 66px 66px'
21+
22+
/** Header label widths, then per-row cell widths — varied so the grid reads as data. */
23+
const HEADER_WIDTHS = [34, 26, 24, 26] as const
24+
825
const CELL_WIDTHS = [
9-
[58, 40, 30, 44],
10-
[48, 34, 36, 38],
11-
[64, 44, 26, 46],
12-
[42, 30, 34, 36],
26+
[52, 34, 26, 38],
27+
[44, 30, 32, 30],
28+
[58, 38, 22, 40],
29+
[38, 26, 30, 32],
1330
] as const
1431

15-
const COLUMN_TEMPLATE = '92px 76px 76px 76px'
16-
1732
/**
18-
* A sheet of cells running off the right and bottom edges, with one cell held in
19-
* an edit ring — a table is the only resource whose structure *is* its picture.
33+
* A crisp table card whose columns run past its right edge.
34+
*
35+
* The workflow editor's vignette keeps its block fully opaque and fades only the
36+
* connector strokes leaving the frame; masking the whole composition is what
37+
* makes a miniature look washed rather than deliberate. So the card here stays
38+
* sharp and the continuation is drawn the way a real table draws it — an
39+
* overflow fade at the edge the columns run off.
2040
*/
2141
function TablesGraphic() {
2242
return (
23-
<Vignette>
24-
<div
25-
className='absolute top-[16px] left-[30px] grid w-[320px] overflow-hidden rounded-tl-[8px] border-[var(--border-1)] border-t border-l'
26-
style={{ gridTemplateColumns: COLUMN_TEMPLATE }}
27-
>
28-
{[0, 1, 2, 3].map((column) => (
43+
<div aria-hidden='true' className='relative h-[148px] w-[320px]'>
44+
<div className='absolute top-[16px] left-[34px] h-[116px] w-[252px] overflow-hidden rounded-[8px] border border-[var(--border-1)] bg-[var(--surface-2)]'>
45+
<div
46+
className='grid border-[var(--border-1)] border-b bg-[var(--surface-3)]'
47+
style={{ gridTemplateColumns: COLUMN_TEMPLATE }}
48+
>
49+
{HEADER_WIDTHS.map((width, column) => (
50+
<div
51+
key={`header-${column}`}
52+
className='flex h-[28px] items-center gap-[6px] border-[var(--border-1)] border-r px-2.5'
53+
>
54+
<span
55+
className='size-[7px] shrink-0 rounded-[2px]'
56+
style={{ background: INK.headerType }}
57+
/>
58+
<span
59+
className='block h-[6px] rounded-full'
60+
style={{ width, background: INK.header }}
61+
/>
62+
</div>
63+
))}
64+
</div>
65+
66+
{CELL_WIDTHS.map((row, rowIndex) => (
2967
<div
30-
key={`header-${column}`}
31-
className='flex h-[26px] items-center gap-[6px] border-[var(--border-1)] border-r border-b bg-[var(--surface-3)] px-2.5'
68+
key={`row-${rowIndex}`}
69+
className={cn(
70+
'grid',
71+
rowIndex < CELL_WIDTHS.length - 1 && 'border-[var(--border-1)] border-b'
72+
)}
73+
style={{ gridTemplateColumns: COLUMN_TEMPLATE }}
3274
>
33-
<span className='size-[8px] shrink-0 rounded-[2px] bg-[var(--surface-6)]' />
34-
<Bar
35-
className='h-[7px] bg-[var(--surface-6)]'
36-
style={{ width: column === 0 ? 44 : 32 }}
37-
/>
38-
</div>
39-
))}
40-
41-
{CELL_WIDTHS.map((row, rowIndex) =>
42-
row.map((width, column) => {
43-
const isEditing = rowIndex === 1 && column === 1
44-
return (
75+
{row.map((width, column) => (
4576
<div
4677
key={`cell-${rowIndex}-${column}`}
47-
className='relative flex h-[26px] items-center border-[var(--border-1)] border-r border-b bg-[var(--surface-1)] px-2.5'
78+
className='relative flex h-[22px] items-center border-[var(--border-1)] border-r px-2.5'
4879
>
49-
<Bar className='h-2' style={{ width }} />
50-
{isEditing ? (
51-
<span className='absolute inset-[-1px] rounded-[3px] border-[1.5px] border-[var(--brand-secondary)]' />
80+
<span
81+
className='block h-[6px] rounded-full'
82+
style={{ width, background: INK.cell }}
83+
/>
84+
{rowIndex === 1 && column === 1 ? (
85+
<span
86+
className='absolute inset-[-1px] rounded-[3px] border-[1.5px]'
87+
style={{ borderColor: INK.selection }}
88+
/>
5289
) : null}
5390
</div>
54-
)
55-
})
56-
)}
91+
))}
92+
</div>
93+
))}
94+
95+
<span className='absolute top-0 right-0 h-[28px] w-[30px] bg-gradient-to-l from-[var(--surface-3)] to-transparent' />
96+
<span className='absolute top-[28px] right-0 bottom-0 w-[30px] bg-gradient-to-l from-[var(--surface-2)] to-transparent' />
5797
</div>
58-
</Vignette>
98+
</div>
5999
)
60100
}
61101

0 commit comments

Comments
 (0)