Skip to content

feat: add support to handle blocking alerts in the alert modal#24400

Merged
vinistevam merged 168 commits intodevelopfrom
feat/alert-modal-handle-blocking-alert
May 22, 2024
Merged

feat: add support to handle blocking alerts in the alert modal#24400
vinistevam merged 168 commits intodevelopfrom
feat/alert-modal-handle-blocking-alert

Conversation

@vinistevam
Copy link
Copy Markdown
Contributor

@vinistevam vinistevam commented May 7, 2024

Description

This PR aims to add support to handle blocking alerts to the AlertModal component.
Changes:

  • added a property called isBlocking
  • added logic to hide the Got it button and acknowledgement checkbox for blocking alerts

Context
Conceptually, some alerts cannot be acknowledged or skipped since they indicate the relevant process cannot continue. For example, having an insufficient balance to cover the gas fees for a transaction.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2411

Manual testing steps

The alert modal is currently not in use and is 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.

Screenshots/Recordings

blocking-alert.webm

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've completed the PR template to the best of my ability
  • I’ve included tests if applicable
  • I’ve documented my code using JSDoc format if applicable
  • I’ve applied the right labels on the PR (see labeling guidelines). 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.

vinistevam and others added 30 commits March 18, 2024 10:35
…al.tsx

Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
…al.tsx

Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
…al.test.tsx

Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [397a652]
Page Load Metrics (1394 ± 637 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint742001364220
domContentLoaded95923126
load61330013941326637
domInteractive95923126
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 20.23 KiB (0.31%)
  • common: 411 Bytes (0.01%)

Base automatically changed from feat/add-support-dynamic-actions-alert-modal to develop May 22, 2024 13:21
@vinistevam vinistevam dismissed jpuri’s stale review May 22, 2024 13:21

The base branch was changed.

@vinistevam vinistevam requested review from a team as code owners May 22, 2024 13:21
@codecov
Copy link
Copy Markdown

codecov bot commented May 22, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 67.42%. Comparing base (4135b68) to head (952b5b0).

Additional details and impacted files
@@           Coverage Diff            @@
##           develop   #24400   +/-   ##
========================================
  Coverage    67.42%   67.42%           
========================================
  Files         1295     1295           
  Lines        50378    50382    +4     
  Branches     13047    13049    +2     
========================================
+ Hits         33964    33968    +4     
  Misses       16414    16414           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@vinistevam vinistevam merged commit 31826eb into develop May 22, 2024
@vinistevam vinistevam deleted the feat/alert-modal-handle-blocking-alert branch May 22, 2024 15:39
@github-actions github-actions bot locked and limited conversation to collaborators May 22, 2024
@metamaskbot
Copy link
Copy Markdown
Collaborator

Builds ready [0918474]
Page Load Metrics (1235 ± 560 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint761951012713
domContentLoaded10104202010
load62257912351167560
domInteractive10104202010
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 72 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@gauthierpetetin gauthierpetetin added the release-12.0.0 Issue or pull request that will be included in release 12.0.0 label Jun 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

release-12.0.0 Issue or pull request that will be included in release 12.0.0 team-confirmations Push issues to confirmations team

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants