Skip to content

fix(reactivity-ui): fix graph connection arrow and line alignment, fix arrow not inhereting connection dynamic color - #23

Merged
lxsmnsyc merged 3 commits into
solidjs:mainfrom
Xoppyc:fix/graph-arrows-misalign
Oct 20, 2026
Merged

lxsmnsyc merged 3 commits into
solidjs:mainfrom
Xoppyc:fix/graph-arrows-misalign

Conversation

@Xoppyc

@Xoppyc Xoppyc commented Oct 20, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Align edge lines to arrowheads: Previously, edge Bezier curves ended directly at the node's left edge (to.x). Because the curve was still bending over the arrowhead's length, the incoming line visually drifted and entered the back of the horizontal arrow off-center. Edges now stop ARROW_SIZE (8px) before the node, connecting straight into the base of the arrowhead.
  • Inherit edge colors on markers: Changed <marker> path fill from currentColor to context-stroke so arrowheads actually inherit the edge's dynamic stroke color (signals/effects/selection) instead of falling back to the SVG container's text color.
  • Preserve active scaling without piercing nodes: Added a dedicated #solid-reactivity-arrow-active marker with an adjusted refX offset so highlighted arrows scale up nicely while remaining pinned to the node boundary.
  • Update unit tests: Updated layout.test.ts to account for ARROW_SIZE in edgePath.

Before

After

After

image

@Xoppyc

Xoppyc commented Oct 20, 2026

Copy link
Copy Markdown
Contributor Author

Grew a bit out of scope from just fixing the misalignment (as you can see from the branch name), but while I was in here I couldn't resist fixing the arrow coloring bug too

@lxsmnsyc lxsmnsyc left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I always forget to fix this so this change is welcome. Approved.

@lxsmnsyc
lxsmnsyc merged commit 32f204b into solidjs:main Oct 20, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants