Skip to content

Avalonia Minimap#21

Merged
carl-andersson-at-westermo merged 4 commits into
mainfrom
feature/return-of-the-minimap
May 12, 2026
Merged

Avalonia Minimap#21
carl-andersson-at-westermo merged 4 commits into
mainfrom
feature/return-of-the-minimap

Conversation

@carl-andersson-at-westermo
Copy link
Copy Markdown
Collaborator

No description provided.

Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Adds an Avalonia “Wayfinder” (minimap) control for ZoomControl, plus supporting geometry helpers, rendering/interaction logic, and tests; also includes several related fixes in graph sizing, edge self-loop layout, and optional drag-triggered edge rerouting.

Changes:

  • Introduce Wayfinder minimap control (VisualBrush-based) with pan/drag + recenter interactions and testable geometry helpers.
  • Fix/improve sizing and layout behaviors affecting minimap/self-loop rendering (GraphArea sizing, self-loop edge bounds/geometry, optional edge reroute on vertex drag).
  • Add headless Skia snapshot render tests (Verify.Avalonia) and functional tests for minimap and drag reroute behavior.

Reviewed changes

Copilot reviewed 19 out of 22 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
Westermo.GraphX.Controls.Avalonia/Controls/ZoomControl/WayfinderGeometry.cs Pure math helpers for minimap scale/bounds/viewport mapping and drag clamping.
Westermo.GraphX.Controls.Avalonia/Controls/ZoomControl/Wayfinder.cs New minimap control: rendering via VisualBrush, pointer interactions, subscriptions, geometry recomputation.
Westermo.GraphX.Controls.Avalonia/Controls/VertexControl.cs Add optional edge-route recomputation during/after drag when enabled.
Westermo.GraphX.Controls.Avalonia/Controls/GraphAreaBase.cs Change GraphArea desired size to report actual ContentSize.Size (impacts layout/rendering).
Westermo.GraphX.Controls.Avalonia/Controls/EdgeControlBase.cs Fix self-loop edge bounds/DesiredSize, localize self-loop geometry/label midpoint, improve measurement for self-loops.
Westermo.GraphX.Controls.Avalonia.Tests/Westermo.GraphX.Controls.Avalonia.Tests.csproj Add Skia + Verify.Avalonia/ImageMagick packages for render snapshot tests.
Westermo.GraphX.Controls.Avalonia.Tests/WayfinderTests.cs Functional + pure-math tests for minimap geometry and interaction helpers.
Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.cs End-to-end rasterized snapshot tests for minimap rendering and viewport edge reach.
Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.Renders_ContentGlyphs_AcrossWayfinder.verified.txt Verified snapshot output for minimap render test.
Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.Viewport_ReachesLeftmostEdge_WhenPannedFully.verified.txt Verified snapshot output for minimap viewport-left test.
Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.Viewport_ReachesRightmostEdge_WhenPannedFully.verified.txt Verified snapshot output for minimap viewport-right test.
Westermo.GraphX.Controls.Avalonia.Tests/ModuleInit.cs Initialize Verify.Avalonia + ImageMagick comparer threshold for stable image diffs.
Westermo.GraphX.Controls.Avalonia.Tests/GlobalSetup.cs Switch headless test rendering to Skia backend configuration.
Westermo.GraphX.Controls.Avalonia.Tests/EdgeGeometryTests.EdgeGeometry_IsEllipse_ForSelfLoop.verified.txt Update verified self-loop ellipse snapshot due to local-space geometry change.
Westermo.GraphX.Controls.Avalonia.Tests/EdgeGeometryTests.cs Add regressions tests for self-loop bounds/anchoring/DesiredSize and midpoint correctness.
Westermo.GraphX.Controls.Avalonia.Tests/DragRerouteTests.cs New tests ensuring edge reroute recompute is triggered only when configured.
Examples/ShowcaseApp.Avalonia/Pages/PerformanceGraph.axaml Add minimap overlay + UI toggle in performance example.
Examples/ShowcaseApp.Avalonia/Pages/GeneralGraph.axaml Add minimap overlay to general graph example.
Directory.Packages.props Add central versions for Avalonia.Skia + Verify.Avalonia/ImageMagick.

Comment thread Westermo.GraphX.Controls.Avalonia/Controls/ZoomControl/Wayfinder.cs
Comment thread Westermo.GraphX.Controls.Avalonia/Controls/ZoomControl/Wayfinder.cs
Comment thread Westermo.GraphX.Controls.Avalonia/Controls/GraphAreaBase.cs
Comment thread Westermo.GraphX.Controls.Avalonia/Controls/GraphAreaBase.cs
Comment thread Examples/ShowcaseApp.Avalonia/Pages/GeneralGraph.axaml
Comment thread Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.cs
Comment thread Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.cs
Comment thread Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.cs
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

Copilot reviewed 58 out of 61 changed files in this pull request and generated 5 comments.

Comment thread Westermo.GraphX.Controls.Avalonia/Controls/ZoomControl/Wayfinder.cs
Comment thread Examples/ShowcaseApp.Avalonia/Pages/GeneralGraph.axaml
Comment thread Examples/ShowcaseApp.Avalonia/Views/MainWindow.axaml
Comment thread Examples/ShowcaseApp.Avalonia/App.axaml
Comment thread Westermo.GraphX.Controls.Avalonia.Tests/WayfinderRenderTests.cs
@carl-andersson-at-westermo carl-andersson-at-westermo merged commit c3d337f into main May 12, 2026
8 checks passed
@carl-andersson-at-westermo carl-andersson-at-westermo deleted the feature/return-of-the-minimap branch May 12, 2026 06:25
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.

3 participants