Uploaded image for project: 'OpenShift Dev Console'
  1. OpenShift Dev Console
  2. ODC-6514

User settings should not trigger rerendering of unrelated components

XMLWordPrintable

    • 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

      1. New user settings implementation doesn't re-render unrelated components
      2. New user settings implementation triggers re-render only when the sync parameter is true and the value has changed
      3. 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)
      4. Everything else should be API compatible to the existing implementation
      5. 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).

              Unassigned Unassigned
              cjerolim Christoph Jerolimov
              Votes:
              0 Vote for this issue
              Watchers:
              1 Start watching this issue

                Created:
                Updated: