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
There are some problems with the current approach:
Arbitrary keys are used for storing data: "agama-iscsi-discovery", "storage-space-actions-expanded", "storage-space-actions-auto-expanded".
The data is never reset, and sometimes it should be deleted after certain event (e.g., "storage-space-actions-expanded" after changing a product).
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.
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.
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.
The text was updated successfully, but these errors were encountered: