metamask-extension
metamask-extension copied to clipboard
refactor(snap-keyring): better UI messages
Description
Refactor and generalize success/error messages being used in the Snap-Keyring "adapter". This refactoring will ease additions of new metrics for Snap account management (future PR).
Related issues
Fixes: N/A
Manual testing steps
- Build and runs with
yarn start:flask - Use this test dapp: https://metamask.github.io/snap-simple-keyring/latest/
- Do each operations like create/remove an account.
Screenshots/Recordings
Before
After
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
- [ ] I've included screenshots/recordings if applicable
- [ ] I’ve included tests if applicable
- [ ] 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:
- [x] 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.
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.
Codecov Report
Attention: Patch coverage is 28.00000% with 18 lines in your changes are missing coverage. Please review.
Project coverage is 68.65%. Comparing base (
61a79e0) to head (2137ce4).
Additional details and impacted files
@@ Coverage Diff @@
## develop #23007 +/- ##
===========================================
- Coverage 68.65% 68.65% -0.00%
===========================================
Files 1098 1100 +2
Lines 43185 43197 +12
Branches 11532 11532
===========================================
+ Hits 29647 29655 +8
- Misses 13538 13542 +4
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [72a75f2]
- 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 (1011 ± 39 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 135 | 273 | 204 | 39 | 19 |
| domContentLoaded | 15 | 99 | 40 | 28 | 13 | ||
| load | 890 | 1195 | 1011 | 80 | 39 | ||
| domInteractive | 15 | 99 | 40 | 28 | 13 |
Bundle size diffs [🚀 Bundle size reduced!]
- background: -645 Bytes (-0.02%)
- ui: 4.71 KiB (0.07%)
- common: 0 Bytes (0.00%)
I have read the CLA Document and I hereby sign the CLA
Builds ready [7504d02]
- 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 (954 ± 64 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 113 | 404 | 200 | 66 | 32 |
| domContentLoaded | 9 | 85 | 29 | 24 | 12 | ||
| load | 820 | 1494 | 954 | 133 | 64 | ||
| domInteractive | 9 | 85 | 29 | 24 | 12 |
Bundle size diffs [🚀 Bundle size reduced!]
- background: -645 Bytes (-0.02%)
- ui: 4.71 KiB (0.07%)
- common: 0 Bytes (0.00%)
Builds ready [ac743a4]
- 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 (1787 ± 56 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 118 | 417 | 196 | 79 | 38 |
| domContentLoaded | 17 | 144 | 38 | 31 | 15 | ||
| load | 1582 | 2102 | 1787 | 117 | 56 | ||
| domInteractive | 17 | 144 | 38 | 31 | 15 |
Bundle size diffs [🚀 Bundle size reduced!]
- background: -645 Bytes (-0.02%)
- ui: 4.63 KiB (0.07%)
- common: 0 Bytes (0.00%)
Builds ready [5124640]
- 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 (1937 ± 88 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 117 | 700 | 223 | 143 | 69 |
| domContentLoaded | 11 | 78 | 31 | 19 | 9 | ||
| load | 1680 | 2364 | 1937 | 183 | 88 | ||
| domInteractive | 11 | 78 | 31 | 19 | 9 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 505 Bytes (0.01%)
- ui: 4.66 KiB (0.07%)
- common: 0 Bytes (0.00%)
Builds ready [f9f11e8]
- 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 (1845 ± 68 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 122 | 410 | 178 | 63 | 30 |
| domContentLoaded | 13 | 85 | 35 | 17 | 8 | ||
| load | 1529 | 2074 | 1845 | 141 | 68 | ||
| domInteractive | 13 | 85 | 35 | 17 | 8 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 505 Bytes (0.01%)
- ui: 4.66 KiB (0.07%)
- common: 0 Bytes (0.00%)
Builds ready [d29b107]
- 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 (1300 ± 381 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 73 | 247 | 123 | 35 | 17 |
| domContentLoaded | 14 | 71 | 31 | 16 | 8 | ||
| load | 59 | 1942 | 1300 | 793 | 381 | ||
| domInteractive | 14 | 71 | 30 | 16 | 8 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 505 Bytes (0.01%)
- ui: 4.66 KiB (0.07%)
- common: 0 Bytes (0.00%)
Builds ready [d4fa44b]
- 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 (1054 ± 422 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 63 | 177 | 118 | 31 | 15 |
| domContentLoaded | 10 | 81 | 31 | 19 | 9 | ||
| load | 59 | 2132 | 1054 | 879 | 422 | ||
| domInteractive | 10 | 81 | 31 | 19 | 9 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 505 Bytes (0.01%)
- ui: 4.89 KiB (0.07%)
- common: 0 Bytes (0.00%)
Builds ready [67ee5de]
- 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 (1036 ± 378 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 65 | 202 | 126 | 38 | 18 |
| domContentLoaded | 10 | 74 | 38 | 24 | 11 | ||
| load | 53 | 1910 | 1036 | 787 | 378 | ||
| domInteractive | 10 | 74 | 38 | 24 | 11 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 505 Bytes (0.01%)
- ui: 4.89 KiB (0.07%)
- common: 0 Bytes (0.00%)
Interesting, I was not aware of that convention. Now that I think about it, having a more imperative tone in the test name does have a better ring to it. I'd push to take @danroc suggestion but I don't see it as blocker for this PR
Builds ready [2137ce4]
- 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 ± 355 ms)
| Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
|---|---|---|---|---|---|---|---|
| Chrome | Home | firstPaint | 67 | 239 | 136 | 44 | 21 |
| domContentLoaded | 9 | 87 | 35 | 25 | 12 | ||
| load | 54 | 1850 | 1220 | 739 | 355 | ||
| domInteractive | 9 | 87 | 35 | 25 | 12 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 505 Bytes (0.01%)
- ui: 4.89 KiB (0.07%)
- common: 0 Bytes (0.00%)