Skip to content

Commit 8a96d50

Browse files
committed
fix(workflow): feather both hatch edges, not just one
The trailing ramp straddled the period boundary. Anchored at 0, the mark's leaving edge ramped 24.735 → 25.485, but a repeating gradient truncates at its own wrap, so it was cut at 25.11: half the feather, and its 50%-coverage line pulled 0.19px inward. That edge stayed sharper than the other and the gap rendered 1.75px instead of 1.93px. Run the period centre-of-mark to centre-of-mark instead, so both ramps sit strictly inside it. The stop list still tiles backwards from its first stop, so the marks land where anchoring at 0 put them — measured pitch is unchanged at 26px and both edges now carry the full 0.75px.
1 parent a84e69f commit 8a96d50

1 file changed

Lines changed: 17 additions & 12 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: 17 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -67,23 +67,29 @@ const ACTION_BUTTON_STYLES = [
6767
* out of the squares' rhythm across the row.
6868
*
6969
* Each edge ramps over 0.75px rather than switching colour at a single offset,
70-
* which is why the stops come in pairs 0.375px either side of 23.18 and 25.11.
71-
* A gradient is sampled once per pixel with no coverage term, so a hard stop on
72-
* a 15°-off-vertical edge can only ever land wholly on one side or the other —
73-
* the marks came out visibly stepped, which is the one thing a shape this thin
74-
* cannot hide. Ramping across roughly a device pixel gives the rasterizer the
75-
* intermediate values antialiasing would have produced, and measured edge
76-
* deviation drops from 0.28 device px (pure quantization) to 0.05.
70+
* which is why the stops come in pairs 0.375px either side of the mark's two
71+
* edges. A gradient is sampled once per pixel with no coverage term, so a hard
72+
* stop on a 15°-off-vertical edge can only ever land wholly on one side or the
73+
* other — the marks came out visibly stepped, which is the one thing a shape
74+
* this thin cannot hide. Ramping across roughly a device pixel gives the
75+
* rasterizer the intermediate values antialiasing would have produced, and
76+
* measured edge deviation drops from 0.28 device px (pure quantization) to 0.05.
77+
*
78+
* The period runs centre-of-mark to centre-of-mark (11.59 → 36.7) rather than
79+
* starting at an edge, because a repeating gradient truncates at its own wrap:
80+
* anchored at 0, the ramp leaving the mark would have run 24.735 → 25.485 and
81+
* been cut at 25.11, so that edge got half the feather and the gap came out
82+
* 1.93 → 1.75px. Both ramps have to sit strictly inside the period. The list
83+
* still tiles backwards from its first stop, so the marks land exactly where
84+
* anchoring at 0 put them — same 26px pitch, same phase against the squares.
7785
*
78-
* The ramps are centred on the old offsets, so the 50%-coverage line — the edge
79-
* the eye actually locates — has not moved and the 24/2 rhythm is untouched.
8086
* Widening the feather further would keep smoothing, but the gap is only 1.93px
8187
* of stop, so it comes straight out of the mark's dark core.
8288
*
8389
* `--surface-2` is the same fill the slots used; only where it is painted moved.
8490
*/
8591
const RUNNING_FILL =
86-
'bg-[repeating-linear-gradient(75deg,var(--surface-2)_0_22.805px,transparent_23.555px_24.735px,var(--surface-2)_25.11px)]'
92+
'bg-[repeating-linear-gradient(75deg,var(--surface-2)_11.59px_22.805px,transparent_23.555px_24.735px,var(--surface-2)_25.485px_36.7px)]'
8793

8894
/** Left edge of the fill: clears the run/stop button, which stays live mid-run. */
8995
const RUNNING_FILL_INSET_SWELL = 'left-[42px]'
@@ -105,8 +111,7 @@ const RUNNING_FILL_INSET_PLAIN = 'left-[26px]'
105111
* edge continued, which is what puts the hatch's end exactly where a hovered
106112
* slot's fill ends. Changing the end silhouette means changing them with it.
107113
*/
108-
const RUNNING_FILL_END_TAPER =
109-
'[clip-path:polygon(0_0,calc(100%_-_20px)_0,100%_100%,0_100%)]'
114+
const RUNNING_FILL_END_TAPER = '[clip-path:polygon(0_0,calc(100%_-_20px)_0,100%_100%,0_100%)]'
110115

111116
const ICON_SIZE = 'size-[14px]'
112117

0 commit comments

Comments
 (0)