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

Add utilities for working with user settings API

XMLWordPrintable

    • Icon: Story Story
    • Resolution: Done
    • Icon: Undefined Undefined
    • None
    • None
    • UI
    • None
    • ODC Sprint 192, ODC Sprint 193

      Description

      As a user, I want the console to save my settings such that upon returning to the console on another device or browser, my settings are restored.

      The purpose of this story is to make saving and restoring user settings easy for the developer.

      Acceptance Criteria

      1. utility that can fetch user settings from the backend
      2. utility that can save user settings to the backend
      3. api to retrieve and store individual settings
      4. user settings should be loaded only once.
        • Further discussion on the need to "watch" the user settings may change this AC
      5. Multiple requests to save settings in a short timeframe should be batched

      Additional Details:

      • Implementation ideas for hook:

      Hook to get and set an individual user setting. Abstraction over browser storage and persisted storage.

       

      useUserSettings = (key: string, defaultValue: string): [string, (value: string) => void];

       

       

      const [value, setValue] = useUserSettings(key, defaultValue);

       

       

            jakumar jaivardhan Kumar
            christianvogt Christian Vogt
            Votes:
            0 Vote for this issue
            Watchers:
            3 Start watching this issue

              Created:
              Updated:
              Resolved: