Skip to content

Releases: tilladam/slint-node-editor

Slint Node Editor 2.0.0

Choose a tag to compare

@tilladam tilladam released this 29 Oct 20:00

Slint Node Editor 2.0.0

Node groups, undraggable nodes, themeable link colours and a corrected automatic
layout. This is a major release because the generated LinkData gained fields
and two Rust helpers changed; most applications migrate with a
..Default::default().

Highlights

  • Node groups: backing sheets that drag, collapse and refit around their
    members. The live drag preview and the drag commit share one movement rule.
    See the groups example.
  • Undraggable nodes: with BaseNode.draggable off, a user drag moves a node
    only with its group; a drag starting on it draws a marquee instead.
  • Link accents and dimming: colour links from an application palette that
    follows theme changes, and fade the links outside a focus.
  • Automatic layout returns top-left corners, as documented, and can line a
    rank's nodes up on their leading edge.
  • A node stays hovered over its own fields, labels and pins, and
    viewport-resized reports changes to the editor's size.
  • Fixes for marquees started on nodes and sheets in an editor offset within its
    window, and for interaction cancellation across the @nodeeditor module
    boundary.

Thanks to Olivier de Gaalon for the layout corners, rank alignment, link accents
and dimming, node hover, undraggable nodes and the marquee fixes.

Requirements and setup

Requires Slint 1.18.0 or newer and Rust 1.92 or newer.

[dependencies]
slint-node-editor = "2.0.0"

See the integration guide
for the full manifest and a tested application, and the
component reference
for the Slint API and Rust helpers.

Migration from 1.x

  • LinkData literals that name every field: add accent: 0, dimmed: false, or
    end the literal in ..Default::default(). LinkData::new is unchanged.
  • GraphLogic::find_node_by_id accepts any model: drop explicit generic
    arguments such as find_node_by_id::<NodeData, _>.
  • sugiyama_layout positions are top-left corners: remove any half-size
    correction applied to them.

From 2.0, a generated struct may gain a field whose default keeps its behaviour
in a minor release; build them with their constructors or
..Default::default(). See the
changelog
for every change and the
compatibility rules.

Known limitations

One editor per window is supported. Keyboard-only graph editing and structural
accessibility are incomplete. Zoom-dependent detail is application code;
automatic virtualization and large-graph frame-rate guarantees are not provided.
Content a node draws outside its rectangle, such as the outer half of a pin
centred on its edge, does not hover the node. See
supported configurations
for platform coverage.

Slint Node Editor 1.0.1

Choose a tag to compare

@tilladam tilladam released this 17 Sep 12:55

Slint Node Editor 1.0.1

Documentation-only patch for the first stable release. The library API and
Rust/Slint implementation are unchanged from 1.0.0.

  • Fix the demo link in the README published on crates.io and docs.rs.
  • Use versioned screenshot URLs and the verified demo video.
  • Remove pre-publication setup instructions from the packaged documentation.
slint-node-editor = "1.0.1"

Requires Slint 1.18.0 or newer and Rust 1.92 or newer. The setup, migration notes,
and known limitations in the 1.0.0 release
continue to apply.

Slint Node Editor 1.0.0

Choose a tag to compare

@tilladam tilladam released this 17 Sep 10:41

Slint Node Editor 1.0.0

The first stable release of Slint Node Editor, a Rust and Slint component library
for building visual graph editors with custom nodes and interactive links.

Highlights

  • Node dragging, multi-selection, box selection, pan, zoom, grid, and minimap.
  • Custom Slint nodes with embedded controls and application-defined connection
    rules, link styling, and routing.
  • Optional automatic graph layout through the layout feature.
  • Examples covering animated links, pin compatibility, and zoom-dependent detail.
  • Geometry updates after programmatic moves and drag commits, deterministic pin
    picking and layout, and tested downstream integration.
  • Keyboard focus follows presses on editor surfaces while preserving embedded
    text input and application-directed focus changes. Thanks to Olivier de Gaalon
    for the focus fix.

The application owns its graph models, selection, and editing policies. Rust
helpers handle common geometry, drag, and selection wiring.

Requirements and setup

Requires Slint 1.18.0 or newer and Rust 1.92 or newer.

[dependencies]
slint-node-editor = "1.0.0"

Applications also choose their Slint backend and renderer and enable
experimental-module-builds on slint-build to import @nodeeditor.
See the integration guide
for the full manifest and a tested application, and the
component reference
for the Slint API and Rust helpers.

Migration from earlier git snapshots

  • Replace Link.path-commands with Link.geometry: LinkPath; custom routes must
    provide a bounding box as well as path commands.
  • Pass a LinkPath constructor to compute_link_path_callback.
  • Use NodeEditorComputations for computations and NodeEditorEvents for node
    double-clicks. Use the current setup macros and generated global exports.
  • Project selection and final drag positions into the host model synchronously.
  • Windows using wire_node_editor! must expose
    public function focus-editor() { editor.focus(); }. Manual integrations must
    connect NodeEditorInternalCallbacks.take-editor-focus synchronously.

See the changelog
for details. Breaking public API changes after 1.0 require a new major version.

Known limitations

One editor per window is supported. Keyboard-only graph editing and structural
accessibility are incomplete. Zoom-dependent detail is application code;
automatic virtualization and large-graph frame-rate guarantees are not provided.
See supported configurations
for platform coverage.