Skip to content

fix(vscode): use theme colours for canvas edges - #3357

Closed
markscott-ms wants to merge 2 commits into
finos:mainfrom
markscott-ms:fix/3076-themed-arrowheads
Closed

markscott-ms wants to merge 2 commits into
finos:mainfrom
markscott-ms:fix/3076-themed-arrowheads

Conversation

@markscott-ms

@markscott-ms markscott-ms commented Oct 14, 2026 •

Copy link
Copy Markdown
Contributor

Description

Follow-up to #3076 and #3331. Fixes edge colour issues left in the CALM Canvas after #3331.

Issue Fix
Arrowheads stay React Flow's grey #b1b1b7 and do not change on hover Each edge draws its own arrowhead markers in the colour of its line
On hover, the arrowhead can be covered by other edges that end at the same point The hovered edge is drawn again in the edge label layer, which is above all edges and below the nodes
TooltipEdge ignores a stroke in the edge style The order is hover colour, then the edge style stroke, then the theme colour, as before #3331. The unused #94a3b8 strokes are removed
The line while dragging a new edge, and the CSS edge hover fallback, use a fixed #60a5fa (2.5:1 contrast on white) Both use --calm-link, the colour of a hovered edge

Technical notes:

  • A color on React Flow's markers does not work with theme variables. React Flow puts the colour in the marker id, and a var(..., #888888) value breaks the url('#…') reference. A shared marker also cannot follow the hover state of one edge.
  • The width and height in the markerEnd objects no longer have an effect. The arrowhead size is fixed at 15 in ArrowMarker, which is the value that all call sites use.
  • Labels now have zIndex: 1, so a hovered line goes under them.

Type of Change

  • 🐛 Bug fix (non-breaking change which fixes an issue)
  • ✨ New feature (non-breaking change which adds functionality)
  • 💥 Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • 📚 Documentation update
  • 🎨 Code style/formatting changes
  • ♻️ Refactoring (no functional changes)
  • ⚡ Performance improvements
  • ✅ Test additions or updates
  • 🔧 Chore (maintenance, dependencies, CI, etc.)

Affected Components

  • CLI (cli/)
  • Schema (calm/)
  • CALM AI (calm-ai/)
  • CALM Hub (calm-hub/)
  • CALM Hub UI (calm-hub-ui/)
  • CALM Server (calm-server/)
  • CALM Widgets (calm-widgets/)
  • Documentation (docs/)
  • Shared (shared/)
  • VS Code Extension (calm-plugins/vscode/)
  • Dependencies
  • CI/CD

Commit Message Format ✅

Testing

  • I have tested my changes locally
  • I have added/updated unit tests
  • All existing tests pass

Unit tests cover the marker ids, the marker colour and the stroke order. The hover overlay needs a running canvas, so I checked it visually in the webview, with several edges ending at one point.

Checklist

  • My commits follow the conventional commit format
  • I have updated documentation if necessary
  • I have added tests for my changes (if applicable)
  • My changes follow the project's coding standards

Each edge draws its own arrowheads in the colour of its line, so they
follow the VS Code theme and turn the link colour on hover. A hovered
edge is drawn again in the edge label layer, so edges that end at the
same point no longer cover its arrowhead.

TooltipEdge again keeps a stroke set in the edge style, and the unused
#94a3b8 strokes are removed.
@markscott-ms
markscott-ms requested a review from a team as a code owner October 14, 2026 21:37
@markscott-ms
markscott-ms marked this pull request as draft October 14, 2026 21:49
@markscott-ms
markscott-ms marked this pull request as ready for review October 14, 2026 21:49
… canvas

The connection line while dragging a new edge and the CSS edge hover
fallback used a fixed #60a5fa, which has low contrast in light themes.
They now use --calm-link, the colour of a hovered edge.
@markscott-ms markscott-ms changed the title fix(vscode): theme canvas arrowheads and keep hovered edges on top fix(vscode): use theme colours for canvas edges Oct 14, 2026
@markscott-ms

Copy link
Copy Markdown
Contributor Author

Replaced by #3359, opened from a branch on finos so that the stacked PRs retarget automatically.

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.

1 participant