Improve RAD capabilities
Description
Support for RAD (Rapid Application Development) is something that would make dashboard 2 even more attractive.
Wigitize / Dynamo are familiar methods of RAD in HMI editors and something that is sorely missed in Node-RED dashboarding. These methods permit the user/OEM to make standard groups of elements for fast and familiar layouts. Upon using this "dynamo", they are prompted for placeholder values. A similar construct in Node-RED is subflows.
The benefits of this functionality include:
- one time setup of complex sets of UI element groups
- simple re-use of above mentioned UI groups
- update once, fix all implementations
- faster and more accurate screen development
This epic aims to address part or all of this.
Additionally, it is to raise awareness of these ideals so as to make suitable/compatible choices when introducing new widgets for dashboard.
stories and tasks to follow
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
Thanks for raising Steve. For my own awareness here, how do flows within a subflow get their confifs set? Isn't it still a consistent node-by-node config?
Suspect the biggest challenge here is how we set a group for all nodes contained within a subflow, for example, such that when duplicating that subflow, we can easily set the group for each independently
Suspect the biggest challenge here is how we set a group for all nodes contained within a subflow, for example, such that when duplicating that subflow, we can easily set the group for each independently
That is exactly the biggest challenge. Nail on the head Joe.
As I alluded to in our chat and above, there will be work to do in node-red to better expose how configs are settable from the subflow settings.
For now, it is possible but very awkward. you have to do the following:
- Add a sunflow env var named "myConfigId" or similar
- Add your UI nodes and setup the group. Export the UI nodes from the subflow to an external text/JSON editor
- Replace all instances of
"config": "1234abcd5678"with"config": "${myConfigId}" - Delete original nodes from the subflow
- Import the edited JSON and reconnect wires etc
- Place an instance of the subflow on your editor
- Set the
myConfigIdenv var with a valid config id
Even with all that, the myConfigId is just a text field. The user has to discover the ID of the ui-group and enter it as a text string on the editor instance.
I believe the solution is to update node-red subflow editor to permit choice of available configs (allowing the user, when setting up the subflow, to select a config) then in the widget editor, permitting the user to select an env var where the user would normally select a config this tying it all together.
IMPORTANT NOTE: this can be done in a backwards compatible way (since it is already possible to have configs supplied by node-red to a subflow - it is just that it is currently super awkward to achieve)
Think this has some opportunity to learn heavily from Figma (Surfacing Nested Component Properties) and Blender (Node Groups)
Is there an equivalent Node-RED Epic to capture this subflow feature set requirement?
Not yet Joe. This is the beginning.