Better Environment Variable workflow #77
Replies: 10 comments 15 replies
-
Not sure if I’m grasping the scenarios. is this for subflow import? With regards to #1, “downside is you lose some of the protection of the node's edit dialog…”. That seems paramount. If we wanted to design a particular node’s property to be env variable enabled; couldn’t we have chosen such behavior from the start? I see that we can design nodes specifically with that intent or to keep it fixed to a narrow set of data types and/or abilities. Perhaps that idea here is to introduce a new selector, an env variable with data type enforcement; as opposed to just an arbitrary env var? A boolean’s simplicity, or a checkbox is straightforward. If the intent here is to make it an env var enabled one too; perhaps a new, subtle difference in the control’s appearance could be created. Like a thin drop down arrow to the right hand side of the checkbox that reveals a hidden field specifically for an env var entry input. |
Beta Was this translation helpful? Give feedback.
-
For "Importing a flow with environment variables"; that may be an ideal time to show a list of areas to be addressed; leveraging: #79 (comment) "part of the url...fragment ends with /edit, [node's] edit dialog will be opened..." |
Beta Was this translation helpful? Give feedback.
-
I'm not sure that opening up to modifying a nodes parameters directly in the JSON flow is a great idea, it feels like overstepping into the choices of the node-developer, we should be encouraging and making it easier for developers to use typed inputs (with env vars) in their nodes as best practice though. |
Beta Was this translation helpful? Give feedback.
-
Considering a large-scale flow, it seems to be difficult for developers to change node properties directly. Following features may be useful for that purpose:
|
Beta Was this translation helpful? Give feedback.
-
We already have several tools around Node-RED that may be relevant like NRlint or more probably the Flow Inspector (on the flows site)... While not directly helpful for exporting - if the concept of the inspector was brought into the core editor (maybe as - About flow ???) - it could trawl the flow and produce a report that included the list of used nodes - non-core nodes - environment variables - subflows - any other potentially useful parameters . (web endpoints ? urls ?) etc |
Beta Was this translation helpful? Give feedback.
-
Hi all, I would like to resurrect this design and move it forward please. I am particularly interested in ability to select a config node in the env var parameters of a subflow as this would greatly enhance the ability to encapsulate functionality (set flows) where nodes have config choices. This becomes especially important in supporting Dashboard type nodes in a subflow. Supporting this capability would open doors to OEMs who create templates (sometimes called widgetize or dynamos in other HMI/SCADA packages) As I see it, there are 2 parts to this:
Part Part
These 2 points align very closely with how I personally see this working.
To make this clean, we might wish to consider introducing the feature via a new Another consideration: Perhaps this is ONLY supported for form elements that are a I intend on "having a play" with this over the coming weeks to see how it feels. I will post ideas / questions / demos here in the hope I can get feedback and resolution. Cheers all. |
Beta Was this translation helpful? Give feedback.
-
As promised, this is the working demo I have regarding support for Configs in a subflow. NR-EnvVar-part1.mp4Comments (good and bad) most welcome. |
Beta Was this translation helpful? Give feedback.
-
And after some play around, a (very rough) visual demo of how we might support simplified choice/selection of Env Vars NOTES:
NR-EnvVar-part2.mp4 |
Beta Was this translation helpful? Give feedback.
-
I don't think that's necessarily a bad thing, as a first pass of this, it certainly isn't a blocker imo
Nor do I think it should, the scope here is about reusable subflows.
Great idea
I agree here, great for demonstration, but an icon of some kind would be preferred I think, but this may open concerns to a wider Node-RED sidebar aesthetics discussion
This being a subflow-only feature as a first pass is plenty |
Beta Was this translation helpful? Give feedback.
-
Progress on the design - I will write up later what that entails but here is a teaser video of how I imagine we can make the override by Env Var much more accessible and RAD for OEMs I would greatly appreciate feedback on the progress (would really like to know I am not wasting my time) - thank yoooo. :) rad-env-vars-in-subflow.mp4 |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
We use environment variables to make a flow more easily portable. However there are some gaps in the workflow that can make it quite awkward:
I think there are things we could do to help here.
Some ideas for discussion:
Creating flows with env vars
Importing a flow with env vars
What else could we do to make env vars easier to work with?
Beta Was this translation helpful? Give feedback.
All reactions