-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modify/Update UI-widget parameters from external #833
Comments
Hi @joepavitt,
|
We have a considerable backlog of dynamic properties that are needed - I may try and dedicate a day this week you just this. I should be able to cover it, thanks for the offer @bartbutenaers |
Had already started work on dynamic props, with several PRs open following Pattern 1 from the below list. However, @Steve-Mcl has raised very valid concerns on this pattern, and he I are are currently talking through the options we have on architecture here: Pattern 1 -
|
I am swaying towards Pattern 3 - but I'm not sure I have the energy to implement 50+ TypedInputs |
Given not all properties are suitable for a TypedInput style widget, I'd suggest starting with Pattern 2 - as it will be familiar to existing Dashboard users. It won't preclude Pattern 3 in the future if that's deemed a better solution later. The knock-on effect could be mitigated by having a standard of clearing that property before passing the message on - they are single-use properties. |
I was in favour of this also |
Obviously I'm biased - but yes... the reasons we (I) went for pattern 2 (msg.ui_control.***) in dashboard 1 was precisely so it was obvious that it was to do with ui and not just picking up generic properties (like msg.label). And also ... as you pointed out it is an anti pattern to the default Node-RED behaviour where if the author sets a config value then that is honoured first - and can't be overridden. So by using a sub-property I could justify to myself that this was safe enough to avoid users doing it accidentally. The reason I wanted to allow this override "all over the UI" was that for the config I thought that in general you would want to be able to set a default value using the config field - but be able to override it later if necessary - rather then having to leave something blank and then having to send a valid property value with every message - which could make every single data point into a much larger object. IE not have to send min, max, label etc with every point... (The technical debt of this is - as someone else has pointed out recently - that in dashboard 1 we only ever retained the payload value over a refresh - so labels, max, min etc would all reset to default on a refresh (or even on a navigate away to another tab and back) - which meant they have to resend those extra control properties when they spot the fresh happening... which is currently less than ideal) |
For what it's worth, I do already have a workaround for this as I have a server-side It does however get lost on a Node-RED restart |
Probably fair enough to lose it on a restart - as the rest of the back end may have missed other inputs, and not be in a real/valid state at that point. If you can retain things over a browser refresh then you are already in a better place than dashboard 1. |
Taking into account the above, going to move forward with a The next question is whether I apply this at core such that it auto-applies to every node and for every property (which some exceptions like My thinking is, stick with |
Description
Hi,
in DB1 it was possible to modify/update UI-widget parameters via input (e.g msg.Range.min,msg.Range.max,msg,label for UI-Slider range).
Would it be possible to have the same flexibility with the new UI-widgets in DB2?
Below UI-Slider is just an example (and the one I need most) but the feature request wuld apply to all the UI-widgets with its parameters
thanks for considering
Have you provided an initial effort estimate for this issue?
I have provided an initial effort estimate
Tasks
The text was updated successfully, but these errors were encountered: