Skip to content

Commit 4c6ce13

Browse files
icecrasher321claude
andcommitted
fix(canvas): trim the running fill to the swell's tapered end
The fill ran off the block. The row is a rectangle but the swell is not — its last slot cuts a diagonal so the shape narrows toward the top, and a rectangular overlay therefore painted past the gray edge up there while still sitting inside it at the bottom. The per-slot version never showed this because each button's own clip contained its fill; moving the paint onto one spanning element took that containment away with it. The overlay now carries the same taper, read off that slot's own path: 16.67px in from the row's right at the overlay's top, 3.33px at its bottom, a slope of 20/24. Only applied to the swell variant, which is the shape that tapers. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
1 parent f1c3add commit 4c6ce13

1 file changed

Lines changed: 18 additions & 1 deletion

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: 18 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,22 @@ const RUNNING_FILL =
7070
const RUNNING_FILL_INSET_SWELL = 'left-[42px]'
7171
const RUNNING_FILL_INSET_PLAIN = 'left-[26px]'
7272

73+
/**
74+
* Trims the fill to the swell's tapered end.
75+
*
76+
* The row is a rectangle but the swell is not: its last slot cuts a diagonal
77+
* (`M16.25 0 … L36.59 19.9 …`) so the shape narrows toward the top. A rectangular
78+
* overlay therefore paints past the gray edge at the top while still sitting
79+
* inside it at the bottom — the fill visibly ran off the block. The per-slot
80+
* version never did, because each button's own clip contained it.
81+
*
82+
* Same taper, read off that path: the edge sits 16.67px in from the row's right
83+
* at the overlay's top (y=4) and 3.33px at its bottom (y=20), a slope of 20/24.
84+
* Changing the end silhouette means changing these two numbers with it.
85+
*/
86+
const RUNNING_FILL_END_TAPER =
87+
'[clip-path:polygon(0_0,calc(100%_-_16.67px)_0,calc(100%_-_3.33px)_100%,0_100%)]'
88+
7389
const ICON_SIZE = 'size-[14px]'
7490

7591
type ActionId = 'run' | 'enabled' | 'lock' | 'duplicate' | 'remove' | 'delete' | 'color'
@@ -391,7 +407,8 @@ export const ActionBar = memo(
391407
aria-hidden='true'
392408
className={cn(
393409
'pointer-events-none absolute inset-y-[4px] right-0 overflow-hidden',
394-
isSwell ? RUNNING_FILL_INSET_SWELL : RUNNING_FILL_INSET_PLAIN
410+
isSwell ? RUNNING_FILL_INSET_SWELL : RUNNING_FILL_INSET_PLAIN,
411+
isSwell && RUNNING_FILL_END_TAPER
395412
)}
396413
>
397414
<span

0 commit comments

Comments
 (0)