You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is your feature request related to a problem? Please describe.
Well it is sort of a problem.
Say that you have a driver which listens to some stream and whenever that stream emits a value, then the driver want the widget to update. Do it calls 'notifyWidget'.
But what if that stream updates really often.
Or you listen to 2 streams and when any of them updates you want to call 'notifyWidget'.
Here it would be practical if you could batch the update calls (if they come close to each other and only trigger a widget update once.
So some denounce and/or throttle behavior.
Describe the solution you'd like
We could add a 'notifyWidget-update-behavior property on the drivers.
And then the developer could set the denounce/throttle behavior if wanted and then internally the widgetDriver framework could take care of this.
And by default if the developer takes no action, then a call to notifyWidget would always trigger a widget update.
We could also add a 'update-behavior' as an horizontal parameter to the 'notifyWidget' call. So that you could say that some calls should override them general behavior.
So if you have one trigger which calls notifyWidget often, then only for that you would call:
NotifyWidget(denounce: Duration(millisec: 300))
Describe alternatives you've considered
The alternative could be that each developer builds their own logic for this. But since it is a generic solution we could just put it in the framework.
The text was updated successfully, but these errors were encountered:
Team decided it makes sense to implement this.
But the exact way to implement is still open.
Before you start working on this ticket, please schedule a follow up call with the team and decide on the best approach.
Is your feature request related to a problem? Please describe.
Well it is sort of a problem.
Say that you have a driver which listens to some stream and whenever that stream emits a value, then the driver want the widget to update. Do it calls 'notifyWidget'.
But what if that stream updates really often.
Or you listen to 2 streams and when any of them updates you want to call 'notifyWidget'.
Here it would be practical if you could batch the update calls (if they come close to each other and only trigger a widget update once.
So some denounce and/or throttle behavior.
Describe the solution you'd like
We could add a 'notifyWidget-update-behavior property on the drivers.
And then the developer could set the denounce/throttle behavior if wanted and then internally the widgetDriver framework could take care of this.
And by default if the developer takes no action, then a call to notifyWidget would always trigger a widget update.
We could also add a 'update-behavior' as an horizontal parameter to the 'notifyWidget' call. So that you could say that some calls should override them general behavior.
So if you have one trigger which calls notifyWidget often, then only for that you would call:
NotifyWidget(denounce: Duration(millisec: 300))
Describe alternatives you've considered
The alternative could be that each developer builds their own logic for this. But since it is a generic solution we could just put it in the framework.
The text was updated successfully, but these errors were encountered: