Releases: panel-extensions/panel-reactflow
Releases · panel-extensions/panel-reactflow
Version 0.3.0
This release focuses on core graph-model capabilities, callback ergonomics,
rendering/styling improvements, and major documentation expansion.
Highlights
- Parameterized
Node/Edgeinstances as first-class graph elements —
ReactFlownow 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
ReactFlowinstance 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 nodeviewis 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
NodeSpecview support — added aviewparameter toNodeSpecand
fixedadd_nodebehavior so embedded views are preserved when adding nodes
programmatically.- Safer embedded view handling — fixed an
AttributeErrorwhen node views
are PanelViewerobjects or other arbitrary view-like objects. EdgeSpechandle targeting — addedsourceHandleandtargetHandle
fields to support explicit edge-to-port connections.- Spec auto-serialization — added automatic serialization for
NodeSpec
andEdgeSpecobjects 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-labelCSS class on node
labels for easier targeted styling. - Docs and onboarding updates — quickstart and index docs now explicitly
document the requiredpn.extension("jsoneditor")setup; additional how-to
docs were updated for new handle and serialization behavior. - Packaging reliability — ensured the frontend
distassets are included
in distributions.
Version 0.1.0
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
NodeTypeandEdgeTypedataclasses to declare typed nodes and edges with optional JSON Schema for theirdatapayloads. - 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
Viewableas a node'sviewto 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, andright_panelslots for surrounding the canvas with arbitrary Panel components. - Helper dataclasses —
NodeSpecandEdgeSpecfor validated node/edge construction; convenience methodsadd_node,remove_node,add_edge,remove_edge, andpatch_node_data/patch_edge_datafor live graph manipulation.