Avalonia Minimap#21
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
Wayfinderminimap 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. |
AndersPantzarWestermo
approved these changes
May 11, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.