metamask-extension icon indicating copy to clipboard operation
metamask-extension copied to clipboard

feat: Adding delete metametrics data to security and privacy tab

Open NiranjanaBinoy opened this issue 9 months ago • 1 comments

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 the Delete MetaMetrics Data button.
  • The Erroring on the Clear button click opens a new error modal.

Scenarios to disable the DeleteMetaMetrics button:

  1. Metametrics ID not created / not available
  2. Just performed a deletion independent on participate in metametrics toggle
  3. Participate in metric opt-out & no data is recorded after deletion.
  4. Status of current delete regulation as INITIALIZED, RUNNING, or FINISHED and (Participate in metric opt-out/no data recorded after deletion)

Open in GitHub Codespaces

Related issues

Fixes #24406, #24407, https://github.com/MetaMask/MetaMask-planning/issues/2523

Manual testing steps

  1. 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.

NiranjanaBinoy avatar May 17 '24 01:05 NiranjanaBinoy

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.

github-actions[bot] avatar May 17 '24 01:05 github-actions[bot]

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).

Files with missing lines Patch % Lines
ui/ducks/app/app.ts 12.50% 14 Missing :warning:
.../clear-metametrics-data/clear-metametrics-data.tsx 53.85% 6 Missing :warning:
...deletion-error-modal/data-deletion-error-modal.tsx 66.67% 2 Missing :warning:
ui/helpers/constants/settings.js 33.33% 2 Missing :warning:
...es/settings/security-tab/security-tab.container.js 0.00% 2 Missing :warning:
...es/settings/security-tab/security-tab.component.js 66.67% 1 Missing :warning:
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.

codecov[bot] avatar Jul 03 '24 20:07 codecov[bot]

Builds ready [39130bb]
Page Load Metrics (158 ± 192 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint59134932311
domContentLoaded96026189
load401894158399192
domInteractive96026189
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%)

metamaskbot avatar Jul 03 '24 20:07 metamaskbot

Builds ready [b0a49c6]
Page Load Metrics (345 ± 300 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint783931236632
domContentLoaded109234199
load422078345624300
domInteractive109234199
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%)

metamaskbot avatar Jul 18 '24 17:07 metamaskbot

Builds ready [9442fb5]
Page Load Metrics (81 ± 24 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint743821126431
domContentLoaded9185363718
load50286815024
domInteractive9185363718
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%)

metamaskbot avatar Jul 22 '24 21:07 metamaskbot

Builds ready [6b1fc36]
Page Load Metrics (86 ± 18 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint762281173918
domContentLoaded41187833818
load48188863718
domInteractive11148343014
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%)

metamaskbot avatar Aug 21 '24 02:08 metamaskbot

Builds ready [b34672a]
Page Load Metrics (1755 ± 84 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint24422801613476228
domContentLoaded14832261172717082
load14952284175517484
domInteractive136830115
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%)

metamaskbot avatar Aug 29 '24 21:08 metamaskbot

Builds ready [cfd4a7c]
Page Load Metrics (1591 ± 67 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22720291530333160
domContentLoaded14221905157112460
load14302014159114067
domInteractive13145373014
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%)

metamaskbot avatar Sep 05 '24 14:09 metamaskbot

Builds ready [7c2e467]
Page Load Metrics (1859 ± 142 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint22624451710540259
domContentLoaded147423461842287138
load148324571859296142
domInteractive22171423316
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%)

metamaskbot avatar Sep 11 '24 21:09 metamaskbot

Builds ready [f0083a1]
Page Load Metrics (1931 ± 114 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint28422681775527253
domContentLoaded139421971899224108
load140222711931238114
domInteractive14181493617
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%)

metamaskbot avatar Sep 18 '24 21:09 metamaskbot

Builds ready [ce675f0]
Page Load Metrics (1834 ± 110 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint31324771766402193
domContentLoaded145424681807226109
load146224791834230110
domInteractive16100462110
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%)

metamaskbot avatar Sep 19 '24 06:09 metamaskbot

Builds ready [5405387]
Page Load Metrics (1740 ± 98 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint20922001615498239
domContentLoaded14832191172020096
load14862212174020498
domInteractive2390422010
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%)

metamaskbot avatar Sep 23 '24 19:09 metamaskbot

Builds ready [b58f6c1]
Page Load Metrics (1726 ± 85 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint46919361627283136
domContentLoaded15282360170217785
load15362365172617785
domInteractive13142422814
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%)

metamaskbot avatar Sep 23 '24 22:09 metamaskbot

Builds ready [b4dd411]
Page Load Metrics (1793 ± 113 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint153625391793237114
domContentLoaded149825231775240115
load154425321793236113
domInteractive20107432311
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%)

metamaskbot avatar Oct 01 '24 20:10 metamaskbot

Builds ready [e5ca558]
Page Load Metrics (1695 ± 66 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint27721781511520249
domContentLoaded14902168166313364
load14942186169513866
domInteractive19153382814
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%)

metamaskbot avatar Oct 02 '24 15:10 metamaskbot

Builds ready [b874217]
Page Load Metrics (1945 ± 149 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint50228111836411197
domContentLoaded151228001918312150
load152028091945310149
domInteractive14198654220
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%)

metamaskbot avatar Oct 02 '24 18:10 metamaskbot

Builds ready [5ac90ec]
Page Load Metrics (1913 ± 104 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint44824031840384185
domContentLoaded147923501882210101
load148723981913216104
domInteractive22224644924
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 12.65 KiB (0.17%)
  • common: 3 KiB (0.04%)

metamaskbot avatar Oct 03 '24 15:10 metamaskbot

@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 🙏🏻

DDDDDanica avatar Oct 03 '24 16:10 DDDDDanica

@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

NiranjanaBinoy avatar Oct 04 '24 15:10 NiranjanaBinoy

LGTM !

DDDDDanica avatar Oct 07 '24 15:10 DDDDDanica

Builds ready [8013ee7]
Page Load Metrics (1923 ± 110 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint30326751846421202
domContentLoaded163226641897226109
load163526741923230110
domInteractive18251555426
Bundle size diffs [🚨 Warning! Bundle size has increased!]
  • background: 0 Bytes (0.00%)
  • ui: 12.65 KiB (0.17%)
  • common: 3 KiB (0.04%)

metamaskbot avatar Oct 07 '24 20:10 metamaskbot