Skip to content

Release Notes

Version 0.6.1

A performance release for graphs whose nodes render Panel views. Selecting a node, adding nodes and syncing a large graph no longer cost time proportional to the size of the graph, so such graphs stay responsive.

Bug fixes

  • Large graphs with node views stay responsive: views of unchanged nodes are no longer rebuilt or re-processed on every interaction, and the frontend does less work per render when a node is selected (#102).

Version 0.6.0

This release makes the graph model stricter and more robust. Adding nodes and edges now validates ids, endpoints and data up front, a failing callback no longer interrupts event processing, and the frontend no longer drops messages in debounce mode or re-renders every node on each interaction. It also adds group nodes, fit_view(), batch adds, self-loop edges, binary file drops and selection in read-only graphs. Please review the breaking and behavior changes before upgrading.

Breaking changes

  • Stricter graph edits: add_node(), add_nodes(), add_edge() and add_edges() raise a ValueError for an id that is already in use, an edge whose source or target is missing or not a node of the graph, and data that cannot be sent to the browser (arbitrary objects, sets, dataclasses; NumPy values and datetimes are fine). Previously such nodes and edges were added and broke rendering or later lookups. The same data check applies to patch_node_data(), patch_edge_data() and patch_*_props(). Add nodes before the edges that connect them. Graphs passed to the constructor only log a warning for duplicate ids and dangling edges, and direct assignment to nodes/edges is not checked (#90).

  • Validators check browser edges: connection validators registered with add_connection_validator() run again on the final connection when the browser reports a new edge (edge_added), not only while dragging. A rejected edge is not added to flow.edges, no edge_added event fires, and the browser removes the edge it drew (edge_rejected message). The same happens when add_edge() raises for an edge from the browser. A browser edge whose id collides with an existing edge gets a fresh id instead (#90).

  • Callback errors are logged: exceptions raised by event callbacks registered with flow.on() and by Node/Edge hooks are logged on the panel.reactflow logger instead of propagating, and the remaining callbacks still run. Code that relied on a callback exception aborting add_node(), remove_node() and similar calls must check state explicitly (#90).

  • Edge editors are opt-in: selecting an edge no longer opens a raw JSON editor by default. An edge gets an editor only when its Edge subclass overrides editor, edge_editors[type] or default_edge_editor is set, or its type defines a schema with properties, matching how node editors are resolved. Pass default_edge_editor=SchemaEditor to restore the previous behavior (#81).

Highlights

  • Group nodes: nodes can be nested through parentId, with extent, expandParent, hidden and zIndex now fields of NodeSpec and Node that patch_node_props() accepts. A built-in "group" node type draws a frame around its children that collapses into a compact node, re-drawing edges into hidden children to the group's handles. group_nodes(), ungroup(), set_parent(), collapse_group()/expand_group() and absolute_position() manage groups from Python, with nodes_grouped, nodes_ungrouped and group_toggled events. With group_delete="ungroup", deleting a group in the browser or with remove_node() keeps its children and moves them, with their edges and canvas positions, to the group's parent. See Group Nodes (#95, #96).

  • Fit the view from Python: flow.fit_view() pans and zooms the canvas to fit every node, or a subset with flow.fit_view("a", "b", padding=0.2), and accepts React Flow's fitView options such as duration and max_zoom. A fit requested right after replacing nodes, including inside pn.io.hold(), waits for the new nodes to reach the browser. See Fit the graph into view (#80).

  • Self-loop edges: an edge whose source and target are the same node now renders as a loop around the node instead of a flat path hidden behind it. Every built-in edge type and custom edge types get the loop, several loops on one node stack outward, and connection_validation={"cycles": True} still rejects them. See Self-loops (#82).

  • Selection in read-only graphs: editable=False no longer turns off selection, so read-only diagrams can be clicked to select and selection_changed fires. The new selectable parameter (True by default) turns selection off; disabling it at runtime clears the selection (#85).

  • Faster structural updates: adding, removing and assigning nodes and edges no longer re-renders every embedded view and editor, and node and edge editors are built only when shown (toolbar editors on first open, side panel and edge editors on selection). In the browser, dragging a node or zooming no longer re-renders every node: dragging one node 60 times in a 1,500 node graph went from about 91,000 node renders to 62, and an update to one node's embedded view re-renders only that node (#88, #89, #94).

Enhancements

  • Batch graph edits: add_nodes() and add_edges() add many nodes or edges in a single update, validating all of them first, and emit one node_added/edge_added event per item (#89).

  • Refused connections: dropping a dragged connection onto a handle that refuses it emits a connection_refused event with the connection and the reason, so an application can say why nothing was drawn. See Explain a refused drop (#98).

  • Handle positions: an input or output handle dict accepts a top, in px for a number or as a CSS length for a string, to line a handle up with a port drawn by the node's view instead of spreading the handles evenly over the node's height (#92).

  • Binary file drops: binary files dropped onto the canvas, such as images or Parquet, now arrive with bytes content instead of being mangled by a text decode. Any file that decodes as UTF-8 still arrives as a str, whatever MIME type the operating system reports, so text handlers keep working (#88).

  • Drop size limit: the new max_drop_size parameter (10 MB by default, 0 disables it) caps the bytes sent for one drop so a large drop cannot exceed the websocket message limit and disconnect the session. Files over the limit or that cannot be read are listed in the drop event's rejected entries instead of discarding the whole drop (#88).

  • Selecting nodes from Python: a node's selected field set from Python now selects it in the browser, and Python updates sent while a node is being dragged no longer snap it back to its old position (#88).

Behavior changes

  • With editable=False, editors are hidden everywhere (side panel, node toolbar and inline), per-node draggable, connectable and deletable flags are forced off in the browser, and the Delete key does nothing. Previously NodeSpec nodes could still be dragged and node data edited through the toolbar in a read-only graph (#81, #85).

  • The interactivity (lock) button is removed from the canvas controls, since it could re-enable dragging regardless of editable (#85).

  • In read-only graphs, dict nodes without a draggable key now receive pointer events, so their embedded widgets, context menu and handle clicks work (#83).

  • remove_node() also removes the nodes nested in a removed node through parentId, as deleting a parent in the browser already did (#95).

  • Selection changes made in the browser no longer emit node_props_changed/edge_props_changed for Node/Edge instances (nor echo a patch_*_props message back to the browser); selection_changed and on_selection_changed still fire (#89).

  • Cached editors are rebuilt when a node is replaced under the same id, its type changes or the type/editor configuration changes (#89).

Bug fixes

  • Node clicks: node_clicked events and Node.on_click hooks were documented but never sent by the frontend. Clicks are now reported with a screen position that can be passed to show_popup(), except for clicks on a node's embedded view or editor and clicks that end a drag (#83).

  • Lost messages in debounce mode: with sync_mode="debounce" only the last pending message was sent, so deleting a multi-node selection never reached Python and dragging several nodes reported only one move. Messages are now queued and sent in order (#88).

  • Malformed nodes: a null or non-object node no longer blanks the whole component; the error boundary catches it and safe mode drops it (#88).

  • Patches lost to a nodes sync: a patch_node_props() or patch_node_data() sent while an older nodes sync is still on its way to the browser is no longer undone by that sync, and one for a node that reaches the browser in the same update is applied once the node arrives instead of being dropped. For example, selecting the new group right after group_nodes() in an event callback now works (#96, #97).

  • Late views: a node's embedded view that reaches the browser after the node itself is now shown instead of leaving the node empty (#93).

  • Edges detached from moved handles: a handle whose top reads a CSS variable set through the node's style or className moves when that changes, but its edges stayed at the old position because React Flow only re-measures handles when a node resizes. Nodes now re-measure their handles when their style, className, data.inputs or data.outputs changes, batched into one update per frame (#99, #100).

  • Selection on re-mount: mounting a view again, for example when a dynamic tab hides and shows the canvas, no longer clears the selection in Python (#101).

  • Schema editors: forms are built for the schemas generated by param and pydantic ($ref, nullable anyOf, const, enums, minimum/maximum), a property without a dedicated widget is shown as a literal input instead of replacing the whole form, and nullable fields show and accept None. Building an editor no longer switches the global pn.config.design to MaterialDesign; import panel_material_ui first, or set pn.config.design, if your app relies on that. jsonschema is now a dependency, so node and edge data is always validated against its schema, and panel-material-ui is declared through the material extra (#87).

  • Editor refresh: the side panel refreshes when node or edge editors are rebuilt while something is selected, changing an edge's type re-resolves its editor, and toggling editable at runtime re-renders nodes with embedded views (#81).

  • Connection validation: validation requests always get a reply, so a malformed request no longer rejects every handle after a timeout. Validators and event callbacks with extra optional parameters are called with the right arguments, a single handle string in inputs/outputs is no longer split into one handle per character, and unconnectable nodes and handles are skipped. In the browser, connection policies are computed once per graph snapshot instead of for every handle during a drag (#90).

  • from_networkx id collisions: a graph whose node ids collide once stringified (1 and "1") raises a ValueError instead of silently merging the nodes, and parallel edges in a multigraph get unique edge ids (#90).

Version 0.5.1

A small enhancement release that lets the canvas accept files dragged in from the operating system.

Enhancements

  • Drop files onto the canvas: add "Files" to drop_types to accept files dragged in from the operating system. The drop event's data lists each file's name, type, size and text content, so a handler can, for example, load a graph saved as JSON. See React to Events (#79).

Version 0.5.0

This release adds port and edge value inspection, connection checks and canvas drops for interactive graph editing. Node and Edge properties now sync to the browser in place, batches of changes render as a single update, and an error boundary keeps a malformed graph from blanking the canvas.

Highlights

  • Port and edge inspection: handle and edge click events can open a Panel popup with flow.show_popup(content, position). Set popup_trigger="hover" to use hover events instead; use flow.close_popup() to dismiss it. Applications supply the value to display, and examples/port_value_inspection.py shows both interactions (#74).

  • Connection validation: opt-in browser policies reject connections with the wrong direction or handle type, full inputs, duplicate edges, and cycles. Register Python rules with add_connection_validator() to show rejection reasons on candidate handles during a drag. Python validators check interactive drags only; they do not restrict flow.add_edge() or direct changes to flow.edges. See Validate Connections and examples/connection_validation.py (#75).

  • Error recovery: the canvas is now wrapped in an error boundary, controlled by the new error_recovery parameter ("auto" by default, or "manual" / "off"). In "auto" mode a React render error remounts the canvas, then remounts again in a view-only safe mode that repairs or hides elements it cannot render (invalid positions, unknown node/edge types, dangling edges, duplicate or missing ids) without mutating the server-side graph. If retries are exhausted a recovery panel offers Try again, Reload page and Copy details. Every error is logged to the panel.reactflow logger and emitted as a client_error event, so browser-side failures are no longer invisible to the server (#70).

  • Base property sync: the top-level React Flow fields on Node and Edge (label, type, style, className, draggable, connectable, deletable, ...) are now synced to the frontend, so assigning node.label = "Start (running)" patches the browser in place instead of requiring flow.nodes to be replaced. Parameters declared on a subclass continue to sync into data. New patch_node_props() and patch_edge_props() methods do the same for dict-based nodes and edges, where passing None clears a field back to the CSS/theme default, and new on_props_change hooks fire on Node/Edge subclasses when the frontend changes a property. position and selected remain browser-owned during drag and selection and are only pushed via patch_node_props() (#71).

Enhancements

  • Batch removal: remove_node() and remove_edge() now accept several ids, either as separate arguments (flow.remove_node("n1", "n2")) or as a sequence (flow.remove_node(["n1", "n2"])), and remove them in a single update. For any other batch of changes made from Python, wrap them in pn.io.hold() to render them at once (#72).

  • Drop data onto the canvas: drop_types lists MIME types the canvas accepts, and each drop of one of them emits a drop event with the dropped data, its flow position, and the node or handle under the pointer, so a handler can add and wire what was dropped. Draggable panel_material_ui.MenuList items work as a source; see React to Events (#77).

Bug fixes

  • Nodes remounted when node types change: any change to node_types rebuilt the component for every node type, so React remounted every node and detached its embedded view, which could leave Bokeh plots blank. Each type's component is now reused until its own spec or the popup settings change (#77).

  • Progressive re-render when deleting multiple elements: deleting a multi-node selection removed the nodes one at a time, syncing an intermediate graph to the browser per node so the nodes visibly disappeared one by one. Updates triggered by a frontend message are now held and combined into a single patch, and node/edge deletion assigns nodes and edges once (#72).

  • Serialization error when updating node_types: assigning NodeType or EdgeType descriptors with a schema class after construction synced them to the browser before they were converted to JSON descriptors, so the server failed with can't serialize ParameterizedMetaclass. They are now converted before syncing, and updating node_types and edge_types together no longer raises a TypeError (#76).

Version 0.4.1

A small enhancement release adding viewport zoom controls.

Enhancements

  • Zoom limits — new min_zoom (default 0.5) and max_zoom (default 2) parameters constrain how far the canvas can be zoomed out and in, and can be updated at runtime (#69).

Version 0.4.0

This release adds new interaction features, edge routing options, and handle customization capabilities.

Highlights

  • Right-click context menu — nodes and the canvas now support a configurable context menu triggered on right-click, enabling custom actions like delete, duplicate, or copy without toolbar buttons (#65).
  • Smart edge routing — new smart edge types (smartBezier, smartStep, smartStraight) that automatically route around nodes instead of passing through them (#64).
  • Handle connectivity controls — per-type flags (input_connectable, input_connectable_start, input_connectable_end, and their output_* counterparts) let you restrict which handles users can drag edges from or to (#63).
  • Handle tooltips — handles can now carry a label that appears as an instant tooltip on hover, making port purpose discoverable without cluttering the canvas. Pass {"id": "port_name", "label": "Description"} in your inputs/outputs lists (#67).
  • Node.flow and Edge.flow back-references — instance-based nodes and edges now hold a .flow reference to their parent ReactFlow, simplifying imperative graph manipulation from callbacks (#56).
  • Delete key support — selected nodes and edges can now be removed with the Delete key, matching standard graph-editor UX expectations.
  • Bundle cache-busting — the frontend bundle URL now includes a content hash, preventing stale cached bundles after upgrades (#68).

Bug fixes

  • Fixed stale node views not updating and deletion causing flicker (#60).
  • Fixed flow attribute initialization on component creation (#59).
  • Edge/node add/remove events are now emitted exactly once (#58).
  • Fixed removing a node when edges are defined as Edge instances (#57).

Version 0.3.0

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

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

Initial release

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 integration — top_panel, bottom_panel, left_panel, and right_panel slots for surrounding the canvas with arbitrary Panel components.
  • Helper dataclasses — NodeSpec 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.