Skip to content

Commit f1c3add

Browse files
icecrasher321claude
andcommitted
improvement(canvas): return the running fill to the squares' rhythm, sheared
Marks are 24px with the row's 2px gap after them again — the geometry the slots carried before any of this — so they land where the squares did. The shear is the only thing that is new. It stays on the single spanning element rather than going back to per-slot backgrounds: one gradient means one phase, which is what lets the 24/2 rhythm hold across the 40px end slots instead of resetting at every boundary. Stops are measured along the 105° axis rather than horizontally, so both carry a `sin(105°)` factor: 24px of mark is 23.18px of stop, and the 26px pitch is 25.11px of period. Writing 24/26 directly renders ~3.5% wide and drifts out of the squares' rhythm across the row. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent dd9eab4 commit f1c3add

1 file changed

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

4747
/**
48-
* The running fill: one solid bar whose leading edge leans right.
48+
* The running fill: the squares' own rhythm, sheared right.
49+
*
50+
* Same geometry the slots used before — a 24px mark with the row's 2px gap after
51+
* it — so the marks land where the squares did. Only the shear is new.
4952
*
5053
* Painted ONCE across the row, not per slot. Each button would start its own
5154
* gradient at its own origin, so the phase reset at every slot — and the end
5255
* slots are 40px against the others' 24px, so the resets were not even uniform.
53-
* One element spanning the row has one paint and therefore one edge.
56+
* One element spanning the row has one gradient and therefore one phase, which
57+
* is what lets the 24/2 rhythm hold all the way along.
5458
*
55-
* The slant lives on the growing edge rather than in a repeating hatch: with the
56-
* gaps closed to nothing, a repeat has no edges left to show. 4px of run across
57-
* the 16px height is the same 15° lean the bars carried.
59+
* Stops are measured along the 105° axis rather than horizontally, so both carry
60+
* a `sin(105°)` factor: 24px of mark is 23.18px of stop, and the 26px pitch is
61+
* 25.11px of period. Writing 24/26 directly would render ~3.5% wide and drift
62+
* out of the squares' rhythm across the row.
5863
*
5964
* `--surface-2` is the same fill the slots used; only where it is painted moved.
6065
*/
61-
const RUNNING_FILL = [
62-
'bg-[var(--surface-2)]',
63-
'[clip-path:polygon(0_0,100%_0,calc(100%_-_4px)_100%,0_100%)]',
64-
].join(' ')
66+
const RUNNING_FILL =
67+
'bg-[repeating-linear-gradient(105deg,var(--surface-2)_0_23.18px,transparent_23.18px_25.11px)]'
6568

6669
/** Left edge of the fill: clears the run/stop button, which stays live mid-run. */
6770
const RUNNING_FILL_INSET_SWELL = 'left-[42px]'

0 commit comments

Comments
 (0)