You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Update "Workflow Editor" article for Bonsai 2.9 (#147)
* Add explorer panel section
* Update location of visualizer layout file
* Add breadcrumb text to workflow panel section
* Add find all references to operator search section
* Add watch mode to workflow panel section
* Add workflow navigation and layout section
* Update existing editor screenshots
* Add new screenshots for dock panels, explorer and properties
Copy file name to clipboardExpand all lines: articles/editor.md
+46-3Lines changed: 46 additions & 3 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,7 +4,7 @@ uid: editor
4
4
5
5
# Workflow Editor
6
6
7
-
When Bonsai starts you will be taken directly to the workflow editor. This is where you can create, configure, and run Bonsai workflows. The editor is composed of three main panels: the [`Toolbox`](#toolbox), the [`Workflow`](#workflow), and [`Properties`](#properties). These are described in more detail below.
7
+
When Bonsai starts you will be taken directly to the workflow editor. This is where you can create, configure, and run Bonsai workflows. The editor is composed of four main panels: [`Toolbox`](#toolbox), [`Workflow`](#workflow),[`Explorer`](#explorer) and [`Properties`](#properties). These are described in more detail below.
@@ -32,7 +32,7 @@ Another way to quickly find operators is to use the `Search` textbox. Any text i
32
32
> [!Tip]
33
33
> You can directly type and search for operator names when the `Workflow` panel has the input focus. This allows you to simply start typing an operator name and directly select which operator you want with the up/down arrow keys. Once you have the right operator, press the <kbd>Enter</kbd> key to place it. You can repeat the process multiple times to very quickly chain a sequence of operators.
34
34
35
-
Another useful function of the `Search` textbox is to find existing instances of the selected toolbox operator in the workflow. Once you select an operator in the toolbox, you can use the `Find Next` or `Find Previous` commands to jump into the next instance of the operator, subject, or workflow extension, starting from the current cursor position.
35
+
Another useful function of the `Search` textbox is to find existing instances of the selected toolbox operator in the workflow. Once you select an operator in the toolbox, you can use the `Find Next` or `Find Previous` commands to jump into the next instance of the operator, subject, or workflow extension, starting from the current cursor position. You can also right-click on an operator in the toolbox and select `Find All References` to list all instances of the operator in the workflow.
36
36
37
37
> [!Tip]
38
38
> You can browse through the reference documentation to learn more about each operator in the `Toolbox` by pressing <kbd>F1</kbd> or selecting `View Help` from the context menu.
@@ -73,7 +73,7 @@ For example, image streams can be displayed on the screen using the default imag
73
73
74
74
#### Visualizer layout settings
75
75
76
-
If you leave one or more visualizers open when you stop the workflow, the editor will memorize the position and size of each active window. When you run the workflow again, the same visualizer windows will be opened following the memorized layout. These settings are stored in a `.layout` file which is saved side by side with the workflow so they will persist between editor sessions.
76
+
If you leave one or more visualizers open when you stop the workflow, the editor will memorize the position and size of each active window. When you run the workflow again, the same visualizer windows will be opened following the memorized layout. These settings are stored in a `.layout` file within the `.bonsai` settings folder, allowing them to persist between editor sessions.
77
77
78
78
> [!Tip]
79
79
> Many visualizers allow you to access more detailed information or advanced configuration parameters by right-clicking on the visualizer window.
@@ -92,8 +92,51 @@ All included workflow extensions are read-only, meaning that you cannot change t
92
92
> [!Warning]
93
93
> When you change the structure of an included workflow and save it over the original file, all references to that workflow extension will be automatically reloaded and updated. This ensures that all references to the same extension remain consistent throughout.
94
94
95
+
### Watch Mode
96
+
97
+
To assist with debugging workflows, you can enable watch mode on individual nodes by selecting an operator and clicking on `Toggle Watch` in the toolbar. The watch mode provides runtime feedback on whether the operator has an active subscription from a downstream operator, is emitting values, or whether its subscriptions have terminated. Each status is visually annotated with a symbol displayed adjacent to the operator.
| Ready |{width=40} | No subscriptions have yet been made |
102
+
| Active |{width=40} | At least one active subscription but no values have been emitted yet |
103
+
| Notifying |{width=40} | At least one active subscription and emitted at least one value in the last period |
104
+
| Completed |{width=40} | No active subscriptions and at least one subscription terminated successfully |
105
+
| Error |{width=40} | No active subscriptions and at least one subscription terminated exceptionally |
106
+
| Canceled |{width=40} | No active subscriptions and at least one subscription was canceled without termination |
107
+
108
+
> [!WARNING]
109
+
> The watch mode refreshes at a maximum rate of 10 Hz and should not be relied upon to evaluate aspects of workflow behaviour that rely on precise timing.
110
+
111
+
> [!WARNING]
112
+
> As the watch mode does not currently track individual subscriptions, care must be taken when interpreting multiple parallel subscriptions, as the true state of each one may be obscured.
113
+
114
+
### Navigation and Layout
115
+
116
+
You can take advantage of tabs, windows, breadcrumbs and docked panels to navigate complex nested workflows and organize your workspace.
117
+
118
+

119
+
120
+
Right-clicking on a nested node such as a [`GroupWorkflow`](xref:Bonsai.Expressions.GroupWorkflowBuilder) will bring up the context menu, where you can select the `Open in New Tab` or `Open in New Window` commands. You can also access these commands by right-clicking on the tab header or window title bar.
121
+
122
+
Each tab or window displays a breadcrumb trail at the top, indicating the location of the current view within the nested workflows. Clicking a breadcrumb switches the view to the corresponding workflow, allowing you to navigate between levels.
123
+
124
+
You can further organize tabs and windows by rearranging them into docked panels. To do this, click and drag a tab header or window title bar towards the center of the screen. A docking guide overlay will appear, allowing you to position the panel in different regions of the workspace. Once the panel has been placed, you can reposition the borders of the panel, as well as create new tabs.
125
+
126
+
## Explorer
127
+
128
+
{width=300}
129
+
130
+
The `Explorer` panel also supports workflow navigation by providing a hierarchical tree view, similar to a file browser. Each level in the tree corresponds to a nested node. Selecting a node will update the `Workflow` panel view to display the corresponding nested workflow. You can also navigate the tree by using the keyboard arrow keys and pressing <kbd>Enter</kbd> to update the view. To open the node in a new tab or window, right-click on the node label and select one of the options. To expand or collapse the tree view at any level, click on the `+` or `-` icon to the left of the node label, or double-click the label itself. Icons adjacent to each label indicate the status of the corresponding workflow:
Each operator exposes a set of configuration properties that parameterize the operator's behaviour (e.g., the [`Timer`](xref:Bonsai.Reactive.Timer) operator exposes the period between generated values, whereas an image [`Threshold`](xref:Bonsai.Vision.Threshold) exposes the brightness cutoff value applied to individual pixels).
98
141
99
142
The `Properties` panel will display all the configuration properties which are available for the currently selected operator. A summary description of the currently selected property can be found in the textbox at the bottom of the panel. Similarly, a description of the behaviour of the currently selected operator itself is shown at the top of the panel.
0 commit comments