Skip to content

Commit 5971fdb

Browse files
icecrasher321claude
andcommitted
improvement(canvas): paint the running bar as right-leaning uprights
The fill read as a row of horizontal slabs. Each filled slot now paints one narrow upright bar leaning right, so a run fills as `/ / / /`. Geometry, since the two constraints fight: leaning the edge 15° off vertical carries it 4.3px across the bar's 16px height, so the transparent margin has to stay above 15% or the cut clips a corner instead of crossing top to bottom. 38%/62% leaves a 7px bar with room to spare. Height comes from `bg-clip-content` plus symmetric padding, which does not change the slot's own size, so the swell measured around it stays put. `--surface-2` is untouched. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent bcf6013 commit 5971fdb

1 file changed

Lines changed: 19 additions & 14 deletions

File tree

  • apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar

apps/sim/app/workspace/[workspaceId]/w/[workflowId]/components/action-bar/action-bar.tsx

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -45,26 +45,31 @@ const ACTION_BUTTON_STYLES = [
4545
].join(' ')
4646

4747
/**
48-
* The mark a filled sweep slot paints.
48+
* The mark a filled sweep slot paints: a narrow upright bar leaning right, so a
49+
* filling run reads as `/ / / /` rather than a row of slabs.
4950
*
50-
* Spans its slot edge to edge so consecutive marks read as one bar growing,
51-
* with only the row's own `gap-[2px]` between them — a mark inset inside its
52-
* slot leaves a gap on both sides of every join, which is what made the last
53-
* version read as separate chunks rather than a loader. The weight comes off
54-
* vertically instead: `bg-clip-content` with symmetric padding paints a 10px
55-
* band inside the 24px slot without changing the slot's own size, so the swell
56-
* it is measured into does not move.
51+
* A hard-stop gradient rather than a `clip-path`, because the two end slots
52+
* already carry one for the swell silhouette and a second would have to win a
53+
* specificity race with it. Leaning the edge 15° off vertical carries it 4.3px
54+
* across the bar's 16px height, so the transparent margin has to stay above 15%
55+
* or the cut clips a corner instead of crossing cleanly — 38%/62% leaves a 7px
56+
* bar with room to spare. `bg-clip-content` with symmetric padding sets the
57+
* height without touching the slot's own size, so the swell measured around it
58+
* does not move. `--surface-2` is untouched.
5759
*
58-
* `--surface-2` is untouched; only the painted area changes. Each variant is
59-
* spelled out because Tailwind's JIT reads literal class strings.
60+
* Each variant is spelled out: Tailwind's JIT reads literal class strings, so a
61+
* composed `hover-hover:${FILL}` compiles to no CSS at all.
6062
*/
6163
const RUNNING_SWEEP_FILL = [
62-
'!bg-[var(--surface-2)] hover-hover:!bg-[var(--surface-2)]',
63-
'!bg-clip-content !py-[7px] !rounded-none',
64+
'!bg-[linear-gradient(105deg,transparent_38%,var(--surface-2)_38%,var(--surface-2)_62%,transparent_62%)]',
65+
'hover-hover:!bg-[linear-gradient(105deg,transparent_38%,var(--surface-2)_38%,var(--surface-2)_62%,transparent_62%)]',
66+
'!bg-clip-content !py-[4px] !rounded-none',
6467
].join(' ')
6568

66-
const RUNNING_SWEEP_FILL_STATIC =
67-
'motion-reduce:!bg-[var(--surface-2)] motion-reduce:!bg-clip-content motion-reduce:!py-[7px] motion-reduce:!rounded-none'
69+
const RUNNING_SWEEP_FILL_STATIC = [
70+
'motion-reduce:!bg-[linear-gradient(105deg,transparent_38%,var(--surface-2)_38%,var(--surface-2)_62%,transparent_62%)]',
71+
'motion-reduce:!bg-clip-content motion-reduce:!py-[4px] motion-reduce:!rounded-none',
72+
].join(' ')
6873

6974
const ICON_SIZE = 'size-[14px]'
7075

0 commit comments

Comments
 (0)