metamask-extension
metamask-extension copied to clipboard
feat: Adding delete metametrics data to security and privacy tab
This PR is dependant on #24503
Description
- Added a new functional component as an entry to the Security & Privacy tab with the
Delete MetaMetrics Data
button. - A new Delete MetaMetrics Data model will open when you click the button.
- Clicking the
Clear
button in the modal will create a data deletion regulation, update the state, and close the modal, deactivating theDelete MetaMetrics Data
button. - The Erroring on the
Clear
button click opens a new error modal.
Scenarios to disable the DeleteMetaMetrics button:
- Metametrics ID not created / not available
- Just performed a deletion independent on participate in metametrics toggle
- Participate in metric opt-out & no data is recorded after deletion.
- Status of current delete regulation as INITIALIZED, RUNNING, or FINISHED and (Participate in metric opt-out/no data recorded after deletion)
Related issues
Fixes #24406, #24407, https://github.com/MetaMask/MetaMask-planning/issues/2523
Manual testing steps
- Go to this page...
Screenshots/Recordings
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.
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 68.23529%
with 27 lines
in your changes missing coverage. Please review.
Project coverage is 70.19%. Comparing base (
ba04af8
) to head (cfd4a7c
).
Additional details and impacted files
@@ Coverage Diff @@
## delete-metametrics-data-controller #24571 +/- ##
======================================================================
- Coverage 70.19% 70.19% -0.00%
======================================================================
Files 1427 1430 +3
Lines 49745 49829 +84
Branches 13921 13936 +15
======================================================================
+ Hits 34916 34974 +58
- Misses 14829 14855 +26
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
Builds ready [39130bb]
- 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 (158 ± 192 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 59 | 134 | 93 | 23 | 11 |
domContentLoaded | 9 | 60 | 26 | 18 | 9 | ||
load | 40 | 1894 | 158 | 399 | 192 | ||
domInteractive | 9 | 60 | 26 | 18 | 9 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 7.5 KiB (0.22%)
- ui: 12.75 KiB (0.18%)
- common: 3.66 KiB (0.06%)
Builds ready [b0a49c6]
- 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 (345 ± 300 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 78 | 393 | 123 | 66 | 32 |
domContentLoaded | 10 | 92 | 34 | 19 | 9 | ||
load | 42 | 2078 | 345 | 624 | 300 | ||
domInteractive | 10 | 92 | 34 | 19 | 9 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 7.78 KiB (0.23%)
- ui: 13.03 KiB (0.17%)
- common: 3.57 KiB (0.05%)
Builds ready [9442fb5]
- 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 (81 ± 24 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 74 | 382 | 112 | 64 | 31 |
domContentLoaded | 9 | 185 | 36 | 37 | 18 | ||
load | 50 | 286 | 81 | 50 | 24 | ||
domInteractive | 9 | 185 | 36 | 37 | 18 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 7.78 KiB (0.23%)
- ui: 12.24 KiB (0.16%)
- common: 2.89 KiB (0.04%)
Builds ready [6b1fc36]
- 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 (86 ± 18 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 76 | 228 | 117 | 39 | 18 |
domContentLoaded | 41 | 187 | 83 | 38 | 18 | ||
load | 48 | 188 | 86 | 37 | 18 | ||
domInteractive | 11 | 148 | 34 | 30 | 14 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 7.78 KiB (0.23%)
- ui: 12.42 KiB (0.18%)
- common: 2.89 KiB (0.04%)
Builds ready [b34672a]
- 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 (1755 ± 84 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 244 | 2280 | 1613 | 476 | 228 |
domContentLoaded | 1483 | 2261 | 1727 | 170 | 82 | ||
load | 1495 | 2284 | 1755 | 174 | 84 | ||
domInteractive | 13 | 68 | 30 | 11 | 5 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 7.77 KiB (0.22%)
- ui: 12.42 KiB (0.17%)
- common: 2.89 KiB (0.04%)
Builds ready [cfd4a7c]
- 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 (1591 ± 67 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 227 | 2029 | 1530 | 333 | 160 |
domContentLoaded | 1422 | 1905 | 1571 | 124 | 60 | ||
load | 1430 | 2014 | 1591 | 140 | 67 | ||
domInteractive | 13 | 145 | 37 | 30 | 14 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 7.77 KiB (0.23%)
- ui: 12.42 KiB (0.17%)
- common: 2.9 KiB (0.04%)
Builds ready [7c2e467]
- 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 (1859 ± 142 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 226 | 2445 | 1710 | 540 | 259 |
domContentLoaded | 1474 | 2346 | 1842 | 287 | 138 | ||
load | 1483 | 2457 | 1859 | 296 | 142 | ||
domInteractive | 22 | 171 | 42 | 33 | 16 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 7.77 KiB (0.22%)
- ui: 12.47 KiB (0.17%)
- common: 2.9 KiB (0.04%)
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
0.0% Coverage on New Code
0.0% Duplication on New Code
Builds ready [f0083a1]
- 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 (1931 ± 114 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 284 | 2268 | 1775 | 527 | 253 |
domContentLoaded | 1394 | 2197 | 1899 | 224 | 108 | ||
load | 1402 | 2271 | 1931 | 238 | 114 | ||
domInteractive | 14 | 181 | 49 | 36 | 17 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.47 KiB (0.17%)
- common: 2.98 KiB (0.04%)
Builds ready [ce675f0]
- 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 (1834 ± 110 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 313 | 2477 | 1766 | 402 | 193 |
domContentLoaded | 1454 | 2468 | 1807 | 226 | 109 | ||
load | 1462 | 2479 | 1834 | 230 | 110 | ||
domInteractive | 16 | 100 | 46 | 21 | 10 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.47 KiB (0.17%)
- common: 2.98 KiB (0.04%)
Builds ready [5405387]
- 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 (1740 ± 98 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 209 | 2200 | 1615 | 498 | 239 |
domContentLoaded | 1483 | 2191 | 1720 | 200 | 96 | ||
load | 1486 | 2212 | 1740 | 204 | 98 | ||
domInteractive | 23 | 90 | 42 | 20 | 10 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.63 KiB (0.17%)
- common: 3.01 KiB (0.04%)
Builds ready [b58f6c1]
- 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 (1726 ± 85 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 469 | 1936 | 1627 | 283 | 136 |
domContentLoaded | 1528 | 2360 | 1702 | 177 | 85 | ||
load | 1536 | 2365 | 1726 | 177 | 85 | ||
domInteractive | 13 | 142 | 42 | 28 | 14 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.63 KiB (0.17%)
- common: 3.01 KiB (0.04%)
Builds ready [b4dd411]
- 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 (1793 ± 113 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 1536 | 2539 | 1793 | 237 | 114 |
domContentLoaded | 1498 | 2523 | 1775 | 240 | 115 | ||
load | 1544 | 2532 | 1793 | 236 | 113 | ||
domInteractive | 20 | 107 | 43 | 23 | 11 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.64 KiB (0.17%)
- common: 3.01 KiB (0.04%)
Builds ready [e5ca558]
- 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 (1695 ± 66 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 277 | 2178 | 1511 | 520 | 249 |
domContentLoaded | 1490 | 2168 | 1663 | 133 | 64 | ||
load | 1494 | 2186 | 1695 | 138 | 66 | ||
domInteractive | 19 | 153 | 38 | 28 | 14 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.64 KiB (0.17%)
- common: 3.01 KiB (0.04%)
Builds ready [b874217]
- 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 (1945 ± 149 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 502 | 2811 | 1836 | 411 | 197 |
domContentLoaded | 1512 | 2800 | 1918 | 312 | 150 | ||
load | 1520 | 2809 | 1945 | 310 | 149 | ||
domInteractive | 14 | 198 | 65 | 42 | 20 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.64 KiB (0.17%)
- common: 3.01 KiB (0.04%)
Builds ready [5ac90ec]
- 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 (1913 ± 104 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 448 | 2403 | 1840 | 384 | 185 |
domContentLoaded | 1479 | 2350 | 1882 | 210 | 101 | ||
load | 1487 | 2398 | 1913 | 216 | 104 | ||
domInteractive | 22 | 224 | 64 | 49 | 24 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.65 KiB (0.17%)
- common: 3 KiB (0.04%)
@NiranjanaBinoy the feature looks solid, If you can append a short demo of the deletion feature, it would help a lot to refine and manual testing as well 🙏🏻
@georgewrmarshall I have created a new ticket to add the storybook files, as we are aiming to get this PR merged as soon as possible. https://github.com/MetaMask/metamask-extension/issues/27630
LGTM !
Quality Gate passed
Issues
0 New issues
0 Accepted issues
Measures
0 Security Hotspots
85.2% Coverage on New Code
0.0% Duplication on New Code
Builds ready [8013ee7]
- 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 (1923 ± 110 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 303 | 2675 | 1846 | 421 | 202 |
domContentLoaded | 1632 | 2664 | 1897 | 226 | 109 | ||
load | 1635 | 2674 | 1923 | 230 | 110 | ||
domInteractive | 18 | 251 | 55 | 54 | 26 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 0 Bytes (0.00%)
- ui: 12.65 KiB (0.17%)
- common: 3 KiB (0.04%)