Feature request: Collapsable Groups in UI for organisation

Hey first off thanks for creating node red, its an amazing piece of software that I really enjoy using.

I use node red for Home automation and one pain point I have is there can be a lot of small steps I need that compose to some higher level action. For example

This is logically turn on and fading some light but its composed of several small steps. I have created a group and given it a name which is nice but there is still the issue that all the implementation detail is lying around cluttering up the overall high level logic, also its completely sequential logic and it either takes a lot of horizontal screen space or I have to create rows which is not ideal.

It would be great if groups could be expanded / collapsed somehow from the UI with just the user provided name left when collapsed. I think with this feature a lot of my flows would be more streamlined and easier to parse quickly and you can dive into the details when you want to

There would be a few challenges to overcome.

  1. There could be multiple nodes in the flow receiving inputs, therefore while collapsed we could either:
    a) Feed them all into a single logical input of the group (but its actually separate nodes under the covers) This may be a somewhat confusing but I think people would understand what is going on once you expand and see where these inputs are going
    b) Create n inputs on the collapsed state for each node that receives input in the group. I think I prefer this solution
  2. Same story for outputs
  3. The bigger issue is that when collapsing the group would take up much less space (yay) but then we would need to reflow the rest of the graph, This could be hard to get right as it might be unclear on where to position the neighbouring nodes in the collapsed and expanded state

Finally Im sure someone will say why not use subflows. I use sub flows for things are reusable and they work ok but there are lot of one off compositional type things that are not reusable and I don't want to have the overhead of a subflow. Additionally I don't want to pollute the global subflow namespace every single time I want a well named composition where in programming I would just write a long descriptive function. Finally with sub flows being quite separate to the flow they are in (by design) its harder to make quick edits from the flow which is common for this composition type use cases.

Would be interested to hear feedback on this proposal and any ideas for problem 3 which I believe to be the biggest

Thanks

You could move these 1 off flows to another "details" flow and use link-call nodes.

You can save a lot of screen real-estate by not showing the labels of your nodes.

I don't use subflows, I think they are horrible. But I do use link nodes into and out of groups of nodes, allowing me to put the group either down at the bottom of the tab or on another tab.

1 Like

I have been doing this with the standard link nodes, and would use link call except for one disadvantage that I describe in a separate feature request.

At the time of design, it was considered & even coded but it didn't quite look right however, with new features in the works, I may have a sensible solution. I won't promise it for v3.1 but I will try.

1 Like