-
Story
-
Resolution: Unresolved
-
Undefined
-
None
-
None
-
False
-
False
-
0
-
Not Supported
-
Description
As a developer of the console, I want that only component are re-rendered when a used (listened) user setting value has changed and the sync parameter is true.
With the current implementation any patch call to the user-settings ConfigMap triggers a re-rendering of all components that uses useUserSettings.
Acceptance Criteria
- New user settings implementation doesn't re-render unrelated components
- New user settings implementation triggers re-render only when the sync parameter is true and the value has changed
- Values should always we serialized to JSON, so that strings which looks like numbers are not converted to numbers when getting/returning the value (See bug https://bugzilla.redhat.com/show_bug.cgi?id=2009345 and PR https://github.com/openshift/console/pull/11126)
- Everything else should be API compatible to the existing implementation
- MAYBE we remove the compatibility hook?
Additional Details:
This maybe require a rewrite of the complete user settings package. Instead of many useK8sWatchResources we suggest to write a UserSettingsContext and that the useUserSettings hook listen to changes in this method (if sync parameter is true).