Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: single alert modal component and state alert #23625

Merged
merged 28 commits into from
Apr 29, 2024

Conversation

vinistevam
Copy link
Contributor

@vinistevam vinistevam commented Mar 21, 2024

Description

This PR aims to add an alert modal component and respective reducers, hooks, and selectors in the UI layer to support generic alerts.

Open in GitHub Codespaces

Related issues

Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2243 and https://github.com/MetaMask/MetaMask-planning/issues/2255

Manual testing steps

The component is not yet being used.

Screenshots/Recordings

Screenshot from 2024-03-21 09-42-13

Screenshot from 2024-03-21 09-42-26

Screenshot from 2024-03-21 09-42-39

Before

After

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

Copy link
Contributor

CLA Signature Action: All authors have signed the CLA. You may need to manually re-run the blocking PR check if it doesn't pass in a few minutes.

@vinistevam vinistevam added the team-confirmations-system DEPRECATED: please use "team-confirmations" label instead label Mar 21, 2024
@vinistevam vinistevam force-pushed the feat/single-alert-modal-component branch from 1065c02 to f04477c Compare March 21, 2024 15:10
@metamaskbot
Copy link
Collaborator

Builds ready [f04477c]
Page Load Metrics (1205 ± 494 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint723261487536
domContentLoaded117126157
load55245712051030494
domInteractive117126157
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.11 KiB (0.01%)
  • common: 134 Bytes (0.00%)

Copy link

codecov bot commented Mar 21, 2024

Codecov Report

Attention: Patch coverage is 87.77778% with 11 lines in your changes are missing coverage. Please review.

Project coverage is 67.62%. Comparing base (c7f4821) to head (4087140).

❗ Current head 4087140 differs from pull request most recent head 8d1402a. Consider uploading reports for the commit 8d1402a to get more accurate results

Files Patch % Lines
...p/confirmations/alerts/alert-modal/alert-modal.tsx 74.42% 11 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #23625      +/-   ##
===========================================
+ Coverage    67.24%   67.62%   +0.37%     
===========================================
  Files         1271     1251      -20     
  Lines        49618    49024     -594     
  Branches     12899    12792     -107     
===========================================
- Hits         33364    33148     -216     
+ Misses       16254    15876     -378     

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

@vinistevam vinistevam marked this pull request as ready for review March 21, 2024 16:56
@vinistevam vinistevam requested a review from a team as a code owner March 21, 2024 16:56
@metamaskbot
Copy link
Collaborator

Builds ready [a405398]
Page Load Metrics (1747 ± 520 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint873751746230
domContentLoaded13113352512
load72304117471082520
domInteractive13113352512
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.11 KiB (0.01%)
  • common: 134 Bytes (0.00%)

ui/ducks/confirm-alerts/confirm-alerts.ts Show resolved Hide resolved
ui/ducks/confirm-alerts/confirm-alerts.ts Show resolved Hide resolved
ui/ducks/index.js Show resolved Hide resolved
ui/pages/confirmations/hooks/useAlerts.test.ts Outdated Show resolved Hide resolved
ui/ducks/confirm-alerts/confirm-alerts.ts Show resolved Hide resolved
@vinistevam vinistevam requested review from a team as code owners March 28, 2024 08:55
@metamaskbot
Copy link
Collaborator

Builds ready [603e861]
Page Load Metrics (1026 ± 448 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint803961568139
domContentLoaded985302211
load6421301026933448
domInteractive985302211
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.11 KiB (0.02%)
  • common: 134 Bytes (0.00%)

vinistevam and others added 3 commits March 28, 2024 11:13
…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
Collaborator

Builds ready [b95d5fa]
Page Load Metrics (702 ± 450 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint622941325526
domContentLoaded977352211
load502512702936450
domInteractive977352211
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.11 KiB (0.02%)
  • common: 134 Bytes (0.00%)

@metamaskbot
Copy link
Collaborator

Builds ready [a9e2219]
Page Load Metrics (493 ± 395 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint702541074019
domContentLoaded105822116
load632364493823395
domInteractive105822116
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.11 KiB (0.02%)
  • common: 158 Bytes (0.00%)

vinistevam and others added 5 commits April 17, 2024 09:13
Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
Co-authored-by: Matthew Walsh <matthew.walsh@consensys.net>
@metamaskbot
Copy link
Collaborator

Builds ready [4087140]
Page Load Metrics (1563 ± 640 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint742801354924
domContentLoaded106831178
load61301615631334640
domInteractive106831178
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.11 KiB (0.02%)
  • common: 158 Bytes (0.00%)

matthewwalsh0
matthewwalsh0 previously approved these changes Apr 19, 2024
@metamaskbot
Copy link
Collaborator

Builds ready [be59763]
Page Load Metrics (1987 ± 536 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint833371637938
domContentLoaded147731178
load62290319871116536
domInteractive147731178
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.11 KiB (0.02%)
  • common: 158 Bytes (0.00%)

Copy link
Contributor

@georgewrmarshall georgewrmarshall left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looking great and excellent use of component library components! A couple small suggestions

app/_locales/en/messages.json Outdated Show resolved Hide resolved
Co-authored-by: George Marshall <george.marshall@consensys.net>
@metamaskbot
Copy link
Collaborator

Builds ready [538927f]
Page Load Metrics (875 ± 595 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint6313288199
domContentLoaded105616115
load5129488751240595
domInteractive105616115
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 1.11 KiB (0.02%)
  • common: 157 Bytes (0.00%)

@vinistevam vinistevam merged commit 50c4610 into develop Apr 29, 2024
67 of 68 checks passed
@vinistevam vinistevam deleted the feat/single-alert-modal-component branch April 29, 2024 10:37
@github-actions github-actions bot locked and limited conversation to collaborators Apr 29, 2024
@metamaskbot metamaskbot added the release-11.17.0 Issue or pull request that will be included in release 11.17.0 label Apr 29, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
release-11.17.0 Issue or pull request that will be included in release 11.17.0 team-confirmations-system DEPRECATED: please use "team-confirmations" label instead
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants