calcite-react icon indicating copy to clipboard operation
calcite-react copied to clipboard

useAccountManager popup improvements

Open am-maneaters opened this issue 3 years ago • 1 comments

Few ideas I had for improving useAccountManager, mostly when using popup.

  • improved status checking

    • check if popup window is currently open
    • something like const {popupOpen: boolean} = useAccountManager() for example: this would make it easy to display a loader on the base website while the authentication is happening in the popup window (i.e. {popupOpen && <Loader/>})
  • callback events

    • something like useAccountManager(options, onAccountAdded : () => {}, onAccountRemoved: () => {}, onAccountsUpdated:: () => {}, onAuthCancelled: () => {})
      ex: in table editor, after authentication is finished, i want to use a callback to execute some cmds. here's how i do it now:

image

am-maneaters avatar Apr 09 '21 21:04 am-maneaters

@samMatenaer These are great recommendations, @brandonlammey any thoughts?

codylawson avatar Apr 12 '21 15:04 codylawson