Skip to content

fix(vscode): use theme colours for the canvas minimap - #3358

Merged
rocketstack-matt merged 1 commit into
mainfrom
fix/3076-themed-minimap
Oct 15, 2026
Merged

rocketstack-matt merged 1 commit into
mainfrom
fix/3076-themed-minimap

Conversation

@markscott-ms

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

Copy link
Copy Markdown
Contributor

Description

Stacked on #3359: review that PR first. This PR is based on its branch, so the diff shows only the minimap change. Follow-up to #3076.

The canvas minimap used React Flow's light-theme defaults. In dark themes, the area outside the view was a bright grey haze, every node was the same bright grey, and the panel let the canvas show through.

Part Before After
Panel Translucent, the canvas shows through --calm-bg-secondary
Border --vscode-widget-border, which many themes set close to the background 2px, --vscode-contrastBorder in high-contrast themes, otherwise 70% of the theme foreground mixed into the background
Nodes #e2e2e2 --calm-fg-muted at 70%
Containers Solid, over their children Light tint and an outline, so children stay visible
Selected node Not shown --calm-focus
Area outside the view Light grey wash --calm-bg-secondary at 65%, which dims it

Technical notes:

  • The colours are in canvas.css. CSS overrides the fill attributes that React Flow sets, so the selected state and the container class can have their own colours.
  • The container outline uses vector-effect: non-scaling-stroke, so it stays 1px when the minimap scales a large diagram down.
  • The border mix is the lowest that gives about 3:1 contrast in Light+, whose foreground is a mid-grey.

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

A unit test covers the container class. The colours were checked visually in the webview, in light and dark themes.

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

Base automatically changed from fix/3076-themed-arrowheads to main October 15, 2026 11:26
@markscott-ms
markscott-ms dismissed rocketstack-matt’s stale review October 15, 2026 11:26

The merge-base changed after approval.

The minimap used React Flow's light-theme defaults: grey nodes, a light
mask that brightened the area outside the view, and a see-through
panel. It now uses theme colours. Containers show as an outline, so
their children stay visible, and the selected node uses the focus
colour. The border is mixed from the theme foreground, because many
themes set widget.border close to the background.
@rocketstack-matt
rocketstack-matt merged commit 3519156 into main Oct 15, 2026
23 checks passed
@rocketstack-matt
rocketstack-matt deleted the fix/3076-themed-minimap branch October 15, 2026 13:32
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