rollupid icon indicating copy to clipboard operation
rollupid copied to clipboard

chore(platform): Refactor authorization screen for dynamic controls

Open betimshahini opened this issue 2 years ago • 0 comments

Current authorization screen hard codes the user controls required for the scopes we support. The Authorization component should be refactored to allow the controls, the data contained within them and their interactions to be configured through a data prop. This data prop should be generically typed, with the details of each of the entries below to be defined in the concrete type that implements the scope-specific control.

Structure should include:

  • Scope value name, eg. scopeValue
  • Reference to input data object, eg. inputData
  • Reference to callback for adding new entry, eg. addNewEntryCallback
  • Reference to callback for selecting an entry, eg. selectEntryCallback
  • Reference to component (and possibly dynamic props?) to render for given scope value, eg. entryComponent

A list of objects with the elements above should be provided to the Authorization component to render.

betimshahini avatar May 09 '23 16:05 betimshahini