Uploaded image for project: 'ERM Platform'
  1. ERM Platform
  2. ERM-1845

SPIKE: Applying keyboard shortcuts modal guidelines within ERM and Dashboard apps



    • ERM Sprint 122, ERM Sprint 123
    • Bienenvolk


      The approach proposed for https://github.com/folio-org/stripes-components/pull/1595 does not meet the application design goals and constraints for Stripes  Components.

      This task is to explore acceptable alternatives.

      We need to come up with an API that lets an app developer declartive specify the list of keyboard shortcuts he/she needs within their app. Currently, the implementation of the individual shortcuts exists in [STCOM|https://github.com/folio-org/stripes-components/blob/569c89aa13955ddda9f187f7d33802e1b0cea6ec/lib/Commander/keyboardShortcuts.js.] 

      The reason the implementation exists in STCOM is to reduce the boilerplate code required within the apps. So, re implementing those at the app level is not ideal.

      Currently, an app developer has to import that list within their app and has to prune it to conditionaly display a specific set of shortcut keys relevant to their app, but this approach is cumbersome and doesnt represent a good API design.

      Task here is to come up with a design which is declarative in nature, i.e. the app has to just call a function such as:

      shortcutKeys(['new', 'save', 'edit', 'duplicateRecord']);

       and that should return the keys along with their implementation which can be then displayed in the shortcut modal.

      This API needs extension, as we need customizable labels for each of those keys. Currently the labels for the shortcuts are hardcoded within stcom.

      So, probably the above  function call `shortcutKeys` needs to be further extended to accept an array of name/label objects. 

      TestRail: Results


          Issue Links



                adityamatukumalli Aditya matukumalli
                jag.goraya Jag Goraya
                0 Vote for this issue
                2 Start watching this issue



                  TestRail: Runs

                    TestRail: Cases