Skip to content

Commit a84e69f

Browse files
committed
improvement(workflow): sit the running hatch in the slot's own box
The hatch was inset 4px into a 24px row, so it stood 16px tall inside a swell whose slots are 24px — it read as a shorter bar floating inside the row rather than as the slots themselves filling, and its right end stopped short of where a hovered slot's fill ends. Span the row instead. The row already sits inside the container's 2px/3.2px inset, so occupying it outright puts the hatch in exactly the box a slot's hover fill occupies: same height, same padding in from the swell on every side. The end taper has to move with it, since its two numbers were read off the slot's diagonal at the old overlay's top and bottom (y=4 and y=20). Continuing that same edge — slope 20/24 — across the full row gives 20px in at the top and flush at the bottom, so the hatch still ends on the slot's own diagonal.
1 parent 17a0b9e commit a84e69f

1 file changed

Lines changed: 12 additions & 5 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 & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -98,12 +98,15 @@ const RUNNING_FILL_INSET_PLAIN = 'left-[26px]'
9898
* inside it at the bottom — the fill visibly ran off the block. The per-slot
9999
* version never did, because each button's own clip contained it.
100100
*
101-
* Same taper, read off that path: the edge sits 16.67px in from the row's right
102-
* at the overlay's top (y=4) and 3.33px at its bottom (y=20), a slope of 20/24.
103-
* Changing the end silhouette means changing these two numbers with it.
101+
* Same taper, read off that path. Its straight run — (22.4, 2.88) to
102+
* (36.59, 19.9) in the slot's own 40×24 box — has a slope of 20/24, so across
103+
* the full row it moves from 20px in at the top to flush at the bottom. The
104+
* overlay spans the row, so those are its two numbers; they are the slot's own
105+
* edge continued, which is what puts the hatch's end exactly where a hovered
106+
* slot's fill ends. Changing the end silhouette means changing them with it.
104107
*/
105108
const RUNNING_FILL_END_TAPER =
106-
'[clip-path:polygon(0_0,calc(100%_-_16.67px)_0,calc(100%_-_3.33px)_100%,0_100%)]'
109+
'[clip-path:polygon(0_0,calc(100%_-_20px)_0,100%_100%,0_100%)]'
107110

108111
const ICON_SIZE = 'size-[14px]'
109112

@@ -429,7 +432,11 @@ export const ActionBar = memo(
429432
<span
430433
aria-hidden='true'
431434
className={cn(
432-
'pointer-events-none absolute inset-y-[4px] right-0 overflow-hidden',
435+
/* Spans the row, so the hatch occupies exactly the box a slot's
436+
hover fill does — same height, and the same padding in from
437+
the swell on every side, since the row already sits inside
438+
the container's own inset. */
439+
'pointer-events-none absolute inset-y-0 right-0 overflow-hidden',
433440
isSwell ? RUNNING_FILL_INSET_SWELL : RUNNING_FILL_INSET_PLAIN,
434441
isSwell && RUNNING_FILL_END_TAPER
435442
)}

0 commit comments

Comments
 (0)