Open joseivanlopez opened 8 months ago
Hey, can I have a shot at this?
Hi! I am not sure if we will really need this. For now, I think we can keep it on hold and reevalute later. Thanks!
Hi! I am not sure if we will really need this. For now, I think we can keep it on hold and reevalute later. Thanks!
Just in time since I was about to comment:
Sure, go ahead. Please, remember publishing valuable changes as soon as possible (you can open a draft PR). It's a way of gathering early feedback and been able to foresee if we are going in the right direction.
Also, do not hesitate of asking for help as soon as you get stuck with something or you need an advise.
Last but not least, I believe that
resetOn
could be a collection instead of a single value. Or maybe @joseivanlopez has another view and he prefers more granularity in the data stored.
But I agree, better to re-evaluate if it is really needed before Balsa starts contributing.
Okay then, I'll try looking for something else to work on.
Agama implements a React hook for using local storage, see https://github.com/openSUSE/agama/blob/master/web/src/utils.js#L172. This hook is currently used three times:
There are some problems with the current approach:
The
useLocalStorage
hook should be improved. It should storage everything in a single object for Agama, and each value has to indicate when to reset and its default value.And Agama should reset the values to its default when that events happen.