feat: new notification components
Description
The notifications team is working to introduce a new type of notifications within the extension. These notifications will be listed in a menu where the user can access basic information. By clicking on an single notification, the user will be able to access detailed data.
This PR introduces the necessary components to display individual items within the list and the various types of details for each notification type.
Related issues
Manual testing steps
Currently, the individual components can be tested within Storybook. For each created component, there is a corresponding story for testing and demonstration purposes.
Screenshots/Recordings
Before
After
These are two screenshots taken from the Figma design created by the design team. They represent the notifications list page and the notification detail page.
Notifications list https://www.figma.com/file/c7GgNw2kScGrVyRGAPhwEd/Notifications?type=design&node-id=1030%3A98661&mode=design&t=MHqDKTFq36ifnkqJ-1
Notification details page https://www.figma.com/file/c7GgNw2kScGrVyRGAPhwEd/Notifications?type=design&node-id=1030%3A98983&mode=design&t=MHqDKTFq36ifnkqJ-1
Pre-merge author checklist
- [x] I’ve followed MetaMask Coding Standards.
- [x] I've clearly explained what problem this PR is solving and how it is solved.
- [ ] I've linked related issues
- [x] I've included manual testing steps
- [x] I've included screenshots/recordings if applicable
- [x] I’ve included tests if applicable
- [x] I’ve documented my code using JSDoc format if applicable
- [x] I’ve applied the right labels on the PR (see labeling guidelines). Not required for external contributors.
- [x] I’ve properly set the pull request status:
- [ ] In case it's not yet "ready for review", I've set it to "draft".
- [x] In case it's "ready for review", I've changed it from "draft" to "non-draft".
Pre-merge reviewer checklist
- [x] 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.
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.
I have read the CLA Document and I hereby sign the CLA
Builds ready [e08e8da]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1183 ± 57 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 91 | 253 | 118 | 44 | 21 |
| domContentLoaded | 9 | 177 | 29 | 47 | 23 | ||
| load | 960 | 1486 | 1183 | 120 | 57 | ||
| domInteractive | 9 | 177 | 29 | 47 | 23 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 35.88 KiB (0.51%)
- common: 0 Bytes (0.00%)
@darkwing I had already reviewed your comments and now, due to some conflicts, I have performed a force push. Do you think it's possible to merge this PR? The components don't affect anything that's in production :)
Codecov Report
Attention: Patch coverage is 77.12418% with 35 lines in your changes are missing coverage. Please review.
Project coverage is 68.70%. Comparing base (
318a8ce) to head (aaad20f).
Additional details and impacted files
@@ Coverage Diff @@
## develop #22509 +/- ##
===========================================
+ Coverage 68.67% 68.70% +0.03%
===========================================
Files 1106 1120 +14
Lines 43356 43509 +153
Branches 11591 11636 +45
===========================================
+ Hits 29773 29891 +118
- Misses 13583 13618 +35
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [1d0da04]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1142 ± 375 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 74 | 234 | 123 | 39 | 19 |
| domContentLoaded | 10 | 74 | 32 | 22 | 11 | ||
| load | 61 | 1961 | 1142 | 782 | 375 | ||
| domInteractive | 10 | 73 | 32 | 22 | 11 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 35.88 KiB (0.51%)
- common: 0 Bytes (0.00%)
This looks good and I have some non-blocking suggestions:
- This top text on the right looks larger than the left, is that wanted?
2. The network badges (on NFTs, for example) display on the bottom right, but all of our UI's badges display on the top right.
thx @darkwing I'll double check with the design team as soon as possible!
Builds ready [2f90ba1]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1185 ± 391 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 71 | 246 | 124 | 43 | 21 |
| domContentLoaded | 10 | 160 | 39 | 36 | 17 | ||
| load | 58 | 1918 | 1185 | 813 | 391 | ||
| domInteractive | 10 | 160 | 39 | 36 | 17 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 35.88 KiB (0.51%)
- common: 0 Bytes (0.00%)
@darkwing
- I have updated the component to display the NFT detail using the original NFTItem component. In this way, we can be more consistent with the rest of the extension
- I confirm that for the object in the top right corner, when present, the font is slightly larger
Builds ready [3fcabf4]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1389 ± 360 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 77 | 229 | 142 | 38 | 18 |
| domContentLoaded | 13 | 82 | 39 | 21 | 10 | ||
| load | 64 | 2012 | 1389 | 750 | 360 | ||
| domInteractive | 13 | 82 | 38 | 21 | 10 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.51 KiB (0.54%)
- common: 0 Bytes (0.00%)
Builds ready [e0f7aca]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1355 ± 350 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 89 | 266 | 142 | 49 | 23 |
| domContentLoaded | 13 | 105 | 44 | 26 | 13 | ||
| load | 86 | 2021 | 1355 | 729 | 350 | ||
| domInteractive | 13 | 105 | 44 | 26 | 13 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.56 KiB (0.54%)
- common: 0 Bytes (0.00%)
Builds ready [0e6ad63]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (940 ± 415 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 69 | 222 | 119 | 35 | 17 |
| domContentLoaded | 14 | 70 | 34 | 18 | 9 | ||
| load | 55 | 1953 | 940 | 864 | 415 | ||
| domInteractive | 14 | 70 | 34 | 18 | 9 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.56 KiB (0.53%)
- common: 0 Bytes (0.00%)
Builds ready [46008e6]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1572 ± 183 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 84 | 195 | 135 | 30 | 14 |
| domContentLoaded | 10 | 72 | 39 | 21 | 10 | ||
| load | 70 | 2013 | 1572 | 382 | 183 | ||
| domInteractive | 10 | 72 | 39 | 21 | 10 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.56 KiB (0.53%)
- common: 0 Bytes (0.00%)
Builds ready [c966779]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1163 ± 424 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 71 | 278 | 138 | 49 | 23 |
| domContentLoaded | 15 | 84 | 40 | 24 | 11 | ||
| load | 57 | 2231 | 1163 | 884 | 424 | ||
| domInteractive | 14 | 84 | 40 | 24 | 11 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.56 KiB (0.53%)
- common: 0 Bytes (0.00%)
Builds ready [5b788e0]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1309 ± 379 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 90 | 194 | 136 | 28 | 14 |
| domContentLoaded | 9 | 76 | 35 | 21 | 10 | ||
| load | 85 | 2145 | 1309 | 789 | 379 | ||
| domInteractive | 9 | 76 | 35 | 21 | 10 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.56 KiB (0.53%)
- common: 0 Bytes (0.00%)
Builds ready [9c30fa5]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1220 ± 410 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 76 | 261 | 141 | 49 | 23 |
| domContentLoaded | 11 | 82 | 34 | 22 | 11 | ||
| load | 60 | 2272 | 1220 | 853 | 410 | ||
| domInteractive | 11 | 82 | 34 | 22 | 11 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.56 KiB (0.53%)
- common: 0 Bytes (0.00%)
Builds ready [daee18b]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1182 ± 442 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 81 | 276 | 134 | 43 | 21 |
| domContentLoaded | 12 | 69 | 33 | 16 | 8 | ||
| load | 65 | 2638 | 1182 | 921 | 442 | ||
| domInteractive | 12 | 69 | 33 | 16 | 8 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.82 KiB (0.54%)
- common: 0 Bytes (0.00%)
Builds ready [a4a547e]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1433 ± 383 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 75 | 211 | 139 | 40 | 19 |
| domContentLoaded | 9 | 80 | 34 | 21 | 10 | ||
| load | 71 | 2362 | 1433 | 798 | 383 | ||
| domInteractive | 9 | 80 | 34 | 21 | 10 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.82 KiB (0.54%)
- common: 0 Bytes (0.00%)
Builds ready [f66151c]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (886 ± 433 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 70 | 272 | 124 | 53 | 26 |
| domContentLoaded | 10 | 98 | 31 | 24 | 12 | ||
| load | 57 | 2180 | 886 | 902 | 433 | ||
| domInteractive | 10 | 98 | 31 | 24 | 12 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.82 KiB (0.54%)
- common: 0 Bytes (0.00%)
Builds ready [9166964]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1234 ± 368 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 77 | 204 | 134 | 32 | 15 |
| domContentLoaded | 10 | 79 | 32 | 20 | 9 | ||
| load | 64 | 2003 | 1234 | 767 | 368 | ||
| domInteractive | 10 | 79 | 32 | 20 | 9 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.82 KiB (0.54%)
- common: 0 Bytes (0.00%)
Builds ready [aaad20f]
- builds: chrome, firefox
- builds (beta): chrome
- builds (flask): chrome, firefox
- builds (MMI): chrome, firefox
- builds (test): chrome, firefox
- builds (test-flask): chrome, firefox
- build viz: Build System
- mv3: Background Module Init Stats
- mv3: UI Init Stats
- mv3: Module Load Stats
- mv3: Bundle Size Stats
- mv2: E2e Actions Stats
- code coverage: Report
- storybook: Storybook
- typescript migration: Dashboard
- all artifacts
Page Load Metrics (1000 ± 395 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 65 | 255 | 133 | 46 | 22 |
| domContentLoaded | 10 | 77 | 44 | 22 | 10 | ||
| load | 53 | 1959 | 1000 | 823 | 395 | ||
| domInteractive | 10 | 77 | 44 | 22 | 10 |
Bundle size diffs
- background: 0 Bytes (0.00%)
- ui: 37.82 KiB (0.54%)
- common: 0 Bytes (0.00%)
2. The network badges (on NFTs, for example) display on the bottom right, but all of our UI's badges display on the top right.