Skip to content

Releases: panel-extensions/panel-reactflow

Version 0.3.0

13 Mar 13:53

Choose a tag to compare

This release focuses on core graph-model capabilities, callback ergonomics,
rendering/styling improvements, and major documentation expansion.

Highlights

  • Parameterized Node/Edge instances as first-class graph elements
    ReactFlow now supports instance-based graph authoring with richer Python
    object workflows, including improved serialization/sync behavior and expanded
    API/core test coverage.
  • Event callback improvements.on(...) callbacks can now accept the
    ReactFlow instance as a second argument and support async callbacks, making
    app-level event handling significantly more flexible.
  • Rendering fixes for embedded views — improved scaling and interaction
    behavior when rendering figures inside nodes, including better handling of
    drag/pan/scroll conflicts within embedded content.
  • Editor rendering robustness — fixed node and edge editor rendering paths
    so editors can render reliably even when no node view is defined.
  • Color mode and default node styling support — added color-mode-aware
    styling capabilities and refined baseline node CSS for better defaults out of
    the box.
  • Expanded how-to documentation — substantial updates to guides for
    declaring types, defining nodes/edges, editors, embedding views, reacting to
    events, and styling, with refreshed screenshots across the docs.
  • Examples overhaul in docs — added an examples gallery with grid cards and
    dedicated pages/screenshots for each example app, plus docs navigation
    updates for easier discovery.

Version 0.2.0

13 Mar 13:53

Choose a tag to compare

This release focuses on stronger typed graph specs, better node-view handling,
and improved docs and packaging.

Highlights

  • NodeSpec view support — added a view parameter to NodeSpec and
    fixed add_node behavior so embedded views are preserved when adding nodes
    programmatically.
  • Safer embedded view handling — fixed an AttributeError when node views
    are Panel Viewer objects or other arbitrary view-like objects.
  • EdgeSpec handle targeting — added sourceHandle and targetHandle
    fields to support explicit edge-to-port connections.
  • Spec auto-serialization — added automatic serialization for NodeSpec
    and EdgeSpec objects to reduce boilerplate when using dataclass-based graph
    definitions.
  • Handle rendering fix — corrected empty handle list behavior so [] is
    treated distinctly from missing/undefined handles.
  • Styling hook for labels — added the rf-node-label CSS class on node
    labels for easier targeted styling.
  • Docs and onboarding updates — quickstart and index docs now explicitly
    document the required pn.extension("jsoneditor") setup; additional how-to
    docs were updated for new handle and serialization behavior.
  • Packaging reliability — ensured the frontend dist assets are included
    in distributions.

Version 0.1.0

06 Feb 13:37

Choose a tag to compare

Panel-ReactFlow brings the power of React Flow to the Panel ecosystem, giving Python developers a fully interactive node-based graph editor with minimal boilerplate.

Highlights

  • ReactFlow component — a Panel component that renders an interactive React Flow canvas with drag, select, connect, and delete support.
  • Python-first graph state — define nodes and edges as plain Python dictionaries; all changes sync bidirectionally between the frontend and Python.
  • Node & edge types — use NodeType and EdgeType dataclasses to declare typed nodes and edges with optional JSON Schema for their data payloads.
  • Schema-driven editors — auto-generate editing forms from JSON Schema (via SchemaEditor) or fall back to a raw JSON tree view (JsonEditor). Custom editors can be any Python callable or class.
  • Editor display modes — show editors inline inside nodes (editor_mode="node"), in a toolbar popover ("toolbar"), or in a side panel ("side").
  • Embedded views — pass any Panel Viewable as a node's view to render rich content (charts, indicators, widgets) directly inside graph nodes.
  • Event system — subscribe to granular events (node_added, edge_deleted, selection_changed, …) or use "*" to listen to everything.
  • Custom handles — configure named input and output ports per node type.
  • Stylesheets — apply CSS stylesheets targeting .react-flow__node-{type} and .react-flow__edge-{type} classes for full visual control.
  • Panel integrationtop_panel, bottom_panel, left_panel, and right_panel slots for surrounding the canvas with arbitrary Panel components.
  • Helper dataclassesNodeSpec and EdgeSpec for validated node/edge construction; convenience methods add_node, remove_node, add_edge, remove_edge, and patch_node_data / patch_edge_data for live graph manipulation.