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

feat(useaccountmanager): add ability to input callback functions

Open brandonlammey opened this issue 4 years ago • 1 comments

Description

  • Add state to track login popup
  • Add callback function params

Related Issue

Closes #465

Motivation and Context

  • Allows the user to track when the login popup is open to control a loader
  • Allows input of callback functions to easily fire off events when accountManager state is updated

How Has This Been Tested?

Tested in docz

Screenshots (if appropriate):

Types of changes

  • [ ] Bug fix (non-breaking change which fixes an issue)
  • [x] New feature (non-breaking change which adds functionality)
  • [ ] Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • [x] My code follows the code style of this project.
  • [x] My change requires a change to the documentation.
  • [x] I have updated the documentation accordingly.
  • [ ] I have read the CONTRIBUTING document.

brandonlammey avatar May 24 '21 14:05 brandonlammey

  • [x] callbacks added for: addAccount, removeAccount, logoutAccount
  • [ ] callbacks added for: removeAllAccounts, logoutAllAccounts, restoreAccount, refreshAccount
  • [x] popupOpen added to accountManagerState
    • [x] set for addAccount
    • [ ] set for refresh/restore
    • [ ] check if closed when user closes window directly

brandonlammey avatar May 25 '21 13:05 brandonlammey