-
Notifications
You must be signed in to change notification settings - Fork 0
DEV Adding more action confirmations #397
Description
Overview
Many actions in our app modify data in ways that are difficult or impossible to reverse. To prevent accidental changes and ensure users are fully aware of the actions they are taking, we want to add confirmation dialogs to these critical actions. You may notice that some actions, such as uploading a profile picture, do not require a confirmation. This is because they involve multiple steps that take enough time that an accidental submission is unlikely. For actions that can be completed quickly with minimal input, however, a confirmation step is necessary.
We have a reusable action confirmation component for this purpose. Below is a list of places where we want to integrate it.
- Save Grants (EditGrant.tsx)
- Approving & Denying user accounts (UserApprove.tsx)
- Deleting user profile pictures
- Changing user profile information
Number 4 is a special case. In addition to the standard confirmation, we want to warn the user that changing their email will also change the email they use to log in. This can be handled by comparing the newly entered email against the current logged in user object's email and displaying the warning conditionally.
Please also take some time to review the rest of the app for any other state-changing actions that may need a confirmation dialog. The criteria for adding one is straightforward: if an action can be completed accidentally with minimal effort, such as a single button click, it should have a confirmation. If the action already requires significant time and multiple steps to complete, a confirmation is likely unnecessary.
Tasks
- Add action confirmation to the following:
- Save Grants (EditGrant.tsx)
- Approving & Denying user accounts (UserApprove.tsx)
- Deleting user profile pictures
- Changing user profile information, with an additional warning if the email field has been modified
- Review the application for any other actions that meet the criteria above and implement confirmations where needed
Acceptance Criteria
- All listed actions have a confirmation dialog implemented
- Any additional actions identified during review that meet the criteria also have confirmations implemented