Just coming from an existing tooling background, and was wondering if there's any way to structure the flows in the "Info > Flows" section, using "folders".
Something like this (excuse the copy&paste job):
I've seen all the documentation around adding multiple flows under a single flow - which is nice, but not what I'm looking for.
Will continue searching plugins - even happy to have a crack at writing my own.
You cannot group your Tabs as suggested in your screenshot.
The Outline is just a tree-like representation of your editor workspace. IMO, the term "flow" is a bit misleading for new users, because in the editor "Tabs" are named flows, too. In general, a flow is a bunch of nodes connected by wires.
You can, however, use the Groups feature to group nodes together. Groups are represented in the outline by an additional tree node under your Tab node, and help a lot for the usability of the outline view. Otherwise nodes are just listed in one level under the Tab, which can be quite large.
You can also name your groups for better readability in the Outline.
Hi @kuema ,
Thanks for the response. Groups is really great for readability in the Outline view - that's exactly the navigation I wanted. (this is my second day using node-red, so thanks for introducing me to Groups ).
However, as you suggested, I'm ideally wanting to structure/group Tabs under the Outline Flows.
I'm currently using a pseudo naming standard to replicate folders. e.g.
The reasoning behind having structured/grouped Tabs, was to:
- Reduce team member commit conflicts (e.g. I assume Tabs handled as separate files on the backend... ?)
- Improve the readability of complex Tabs (by de-composing them into smaller units)
- Improve readability in the Outline
I'll continue looking around (still early days for me)...
bad assumption - currently there is only ONE flow file... made up of multiple tabs etc.
Hi @dceejay , indeed. Just checked a vanilla project with two Tabs = there's only one
Looks like there's no logical grouping (/ordering?) by Tab within the
flows_*.json file either, which I imagine would make it very difficult to sort out merge conflicts (specifically for GIT Projects)?
More investigation required (by me) - thanks for the input.
It's hard to have people working concurrently in one Node-RED instance to start with. It's even harder with larger projects. Though it has some safeguards to prevent overwriting changes of others (the "merge" popup), it wasn't (initially) designed for multiple users at the same time.
To best option is sticking to a set of tabs for each user. Or you could setup different instances for parts of your project.
That's what we did at work, we split our logical features over multiple instances. It also benefits reusablility for other projects.
However, for improved textual change-tracking, I suggest you enable the
flowFilePretty setting in your settings.js. That way the flow isn't stored as one line, but in a more GIT friendly way.
Thanks @kuema - I'll use
If you run this script in your .node-red folder it well create a version of the flows file with function nodes formatted as they appear in the editor (more or less). If you also keep that in your git repo then you can get diffs showing changes within function nodes. It adds .formatted to the flows file name.
# generates formatted versions of node red flow files matching flow*.json
# in files flow*.json.formatted
# NOTE must have flowFilePretty: true in settings.js
for f in flow*.json; do
sed -r 's/\\n/\n/g' "$f" > "$f.formatted"
# remove any cred files converted
This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.