Skip to content

Commit aa695c8

Browse files
icecrasher321claude
andcommitted
improvement(canvas): pitch the running hatch to the row, not to one bar a slot
One bar per 24px button left the rest of the button empty, so the marks inherited the button grid's rhythm and sat ~19px apart — a row of isolated ticks rather than a loader. The fill repeats now, at a pitch that divides the row's own rhythm: a slot plus its `gap-[2px]` is 26px, so a 13px horizontal pitch puts exactly two bars in every slot and stays in phase across the gaps, including the 40px end slots. Bars land every 13px with a uniform 6px between them, whatever the run's length. Stops are measured along the 105° axis rather than horizontally, so they carry the `sin(105°)` factor: a 7px bar on a 13px pitch is 6.76px on a 12.56px period. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent 5971fdb commit aa695c8

1 file changed

Lines changed: 19 additions & 15 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 & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -45,29 +45,33 @@ const ACTION_BUTTON_STYLES = [
4545
].join(' ')
4646

4747
/**
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.
48+
* The hatch a filled sweep slot paints: narrow uprights leaning right, so a
49+
* filling run reads as one continuous `////` band.
5050
*
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.
51+
* Repeating, not one bar per slot. A single bar left the rest of its 24px button
52+
* empty, so the marks inherited the button grid's rhythm and sat ~19px apart —
53+
* the row read as isolated ticks rather than a loader. The pitch instead divides
54+
* the row's own rhythm: slot + `gap-[2px]` is 26px, so a 13px horizontal pitch
55+
* puts exactly two bars in every slot and stays in phase across the gaps,
56+
* including the 40px end slots. Bars land every 13px with a uniform 6px between
57+
* them, whatever the run's length.
5958
*
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.
59+
* Stops are measured along the 105° axis, not horizontally, so they carry the
60+
* `sin(105°)` factor: a 7px bar on a 13px pitch is 6.76px on a 12.56px period.
61+
* `bg-clip-content` with symmetric padding sets the height without touching the
62+
* slot's size, so the swell measured around it does not move. `--surface-2` is
63+
* untouched.
64+
*
65+
* Each variant is spelled out: Tailwind's JIT reads literal class strings.
6266
*/
6367
const RUNNING_SWEEP_FILL = [
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%)]',
68+
'!bg-[repeating-linear-gradient(105deg,var(--surface-2)_0_6.76px,transparent_6.76px_12.56px)]',
69+
'hover-hover:!bg-[repeating-linear-gradient(105deg,var(--surface-2)_0_6.76px,transparent_6.76px_12.56px)]',
6670
'!bg-clip-content !py-[4px] !rounded-none',
6771
].join(' ')
6872

6973
const RUNNING_SWEEP_FILL_STATIC = [
70-
'motion-reduce:!bg-[linear-gradient(105deg,transparent_38%,var(--surface-2)_38%,var(--surface-2)_62%,transparent_62%)]',
74+
'motion-reduce:!bg-[repeating-linear-gradient(105deg,var(--surface-2)_0_6.76px,transparent_6.76px_12.56px)]',
7175
'motion-reduce:!bg-clip-content motion-reduce:!py-[4px] motion-reduce:!rounded-none',
7276
].join(' ')
7377

0 commit comments

Comments
 (0)