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.
- 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
- Same story for outputs
- 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