-
Notifications
You must be signed in to change notification settings - Fork 5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: trigger alert modal on confirm button (#24049)
<!-- Please submit this PR as a draft initially. Do not mark it as "Ready for review" until the template has been completely filled out, and PR status checks have passed at least once. --> ## **Description** This PR aims to add a button to review alerts when there are unacknowledged alerts in a confirmation Once the button is clicked the `MultipleAlerModal` is displayed enabling users to review and take action on each alert individually. If all alerts are reviewed a `ConfirmAlertModal` is displayed warning the user and with the possibility to again review all the alerts before confirming it. Create the logic to support the friction modal when all the alerts are reviewed and the confirm button is clicked. **Background** As with the inline alerts alongside the confirmation fields, the confirmation confirm button should also display all the confirmation alerts sequentially in the alert modal. In addition the confirm button should be suitably styled to indicate alerts are present. Based on [figma](https://www.figma.com/file/yUczlH2HbHaHsYijiONKx0/Warnings%2C-Alerts-and-Flags?type=design&node-id=1208-25406&mode=design). <!-- Write a short description of the changes included in this pull request, also include relevant motivation and context. Have in mind the following questions: 1. What is the reason for the change? 2. What is the improvement/solution? --> [![Open in GitHub Codespaces](https://github.com/codespaces/badge.svg)](https://codespaces.new/MetaMask/metamask-extension/pull/24049?quickstart=1) ## **Related issues** Fixes: MetaMask/MetaMask-planning#2292 ## **Manual testing steps** Those components are currently not in use and are not available to users. It is part of the new alert system, and we will have a dedicated PR to integrate this component into the new confirmation screens. - Regression for new confirmation screens. ## **Screenshots/Recordings** <!-- If applicable, add screenshots and/or recordings to visualize the before and after of your change. --> ### **Before** <!-- [screenshots/recordings] --> ### **After** ![image](https://github.com/MetaMask/metamask-extension/assets/45455812/c16c0ded-b450-49f7-b63b-ec238c69ea9c) [frictionModal.webm](https://github.com/MetaMask/metamask-extension/assets/45455812/49badc8d-a90e-4449-81a1-4a744f5da499) <!-- [screenshots/recordings] --> ## **Pre-merge author checklist** - [x] I’ve followed [MetaMask Coding Standards](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/CODING_GUIDELINES.md). - [x] I've completed the PR template to the best of my ability - [x] I’ve included tests if applicable - [x] I’ve documented my code using [JSDoc](https://jsdoc.app/) format if applicable - [x] I’ve applied the right labels on the PR (see [labeling guidelines](https://github.com/MetaMask/metamask-extension/blob/develop/.github/guidelines/LABELING_GUIDELINES.md)). Not required for external contributors. ## **Pre-merge reviewer checklist** - [ ] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed). - [ ] I confirm that this PR addresses all acceptance criteria described in the ticket it closes and includes the necessary testing evidence such as recordings and or screenshots. --------- Co-authored-by: Matthew Walsh <[email protected]> Co-authored-by: George Marshall <[email protected]>
- Loading branch information
1 parent
bf76bff
commit 85d7f8a
Showing
15 changed files
with
801 additions
and
152 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.