Skip to content

v0.3.0 - Definition/State Architecture

Choose a tag to compare

@iwatakeshi iwatakeshi released this 09 Jan 21:28
· 226 commits to master since this release

🎉 FlowGraph v0.3.0

Breaking Changes

This release introduces a major architectural refactor: Definition/State separation for Node and Edge.

  • Node.Id and Edge.Id are now read-only (immutable)
  • Node and Edge now use composition: Definition (immutable record) + State (mutable observable)
  • CommunityToolkit.Mvvm removed from FlowGraph.Core - Core is now framework-agnostic with zero external dependencies

Migration Guide

Before (v0.2.x):

var node = new Node { Id = "n1", Type = "test", Position = new Point(100, 200) };

After (v0.3.0):

var node = new Node(
    new NodeDefinition { Id = "n1", Type = "test" },
    new NodeState { X = 100, Y = 200 }
);
// Or use pass-through properties (backward compatible):
node.Type = "test";
node.Position = new Point(100, 200);

New Files

  • FlowGraph.Core/Models/ObservableBase.cs - Pure .NET INPC base class
  • FlowGraph.Core/Models/NodeDefinition.cs - Immutable node identity
  • FlowGraph.Core/Models/EdgeDefinition.cs - Immutable edge identity
  • FlowGraph.Core/Models/PortDefinition.cs - Immutable port definition
  • FlowGraph.Core/Models/INodeState.cs / IEdgeState.cs - State interfaces
  • FlowGraph.Core/Models/NodeState.cs / EdgeState.cs - Default implementations

Benefits

✅ Clean undo/redo via definition snapshots
✅ Framework-agnostic Core (pure .NET BCL)
✅ Better serialization (exclude transient UI state)
✅ Improved testability

Stats

  • 360 tests passing
  • Build: 0 warnings, 0 errors