metamask-extension
metamask-extension copied to clipboard
feat: Add new privacy policy toast
Description
Changes: Adds a new privacy policy banner that will show up after June 4, 2024. If the user closes it manually, the privacy policy banner will not show up again. If the user does not close the toast manually, the privacy policy banner will cease to show up after a day of being shown for the first time. Changes the Survey banner so that we can display multiple banners at the same time without overlapping each other.
Considerations:
- Make sure this doesn't show up during onboarding
- This toast will show up even after years of the privacy policy being changed. We should set up a deadline for that or eventually revert this PR.
- Check if copy is correct.
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2319
Manual testing steps
- Go to the home page
- Check if there's a new privacy banner there (date should be edited in the code so that the privacy policy shows up earlier than May 6, 2024)
- When closing it, it shouldn't show up again
- If not closing it manually, the toast should not show up again after 1 day of being shown for the first time. This data is saved in localStorage so editing the timestamp there should be enough to test this feature out.
Screenshots/Recordings
Before
After
Pre-merge author checklist
- [x] I’ve followed MetaMask Coding Standards.
- [x] I've completed the PR template to the best of my ability
- [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.
Pre-merge reviewer checklist
- [x] I've manually tested the PR (e.g. pull and build branch, run the app, test code being changed).
- [x] 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.
Kicked CI because test failures look intermittent. This looks awesome!
To get CI tests to pass, you might need to update the error spec file and fixtures as you have added the state in the app-state directly. Use the command yarn build:test
and once the build is generated. You need to run yarn test:e2e:single test/e2e/tests/errors.spec.js --browser chrome --update-snapshot
Almost there! Looking really good so far!
Builds ready [2b58957]
- 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 (1569 ± 657 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 69 | 135 | 94 | 19 | 9 |
domContentLoaded | 10 | 33 | 16 | 7 | 3 | ||
load | 56 | 3330 | 1569 | 1369 | 657 | ||
domInteractive | 10 | 33 | 16 | 7 | 3 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 450 Bytes (0.01%)
- ui: 1.58 KiB (0.02%)
- common: 1.25 KiB (0.02%)
Builds ready [23a6b09]
- 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 (1262 ± 729 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 72 | 186 | 103 | 31 | 15 |
domContentLoaded | 9 | 54 | 19 | 13 | 6 | ||
load | 59 | 4739 | 1262 | 1518 | 729 | ||
domInteractive | 9 | 54 | 19 | 14 | 6 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 450 Bytes (0.01%)
- ui: 1.58 KiB (0.02%)
- common: 1.25 KiB (0.02%)
Builds ready [977936a]
- 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 (756 ± 576 ms)
Platform | Page | Metric | Min (ms) | Max (ms) | Average (ms) | StandardDeviation (ms) | MarginOfError (ms) |
---|---|---|---|---|---|---|---|
Chrome | Home | firstPaint | 55 | 149 | 90 | 23 | 11 |
domContentLoaded | 7 | 68 | 16 | 13 | 6 | ||
load | 44 | 3351 | 756 | 1201 | 576 | ||
domInteractive | 7 | 68 | 16 | 13 | 6 |
Bundle size diffs [🚨 Warning! Bundle size has increased!]
- background: 450 Bytes (0.01%)
- ui: 1.58 KiB (0.02%)
- common: 1.25 KiB (0.02%)
Codecov Report
Attention: Patch coverage is 50.60241%
with 41 lines
in your changes are missing coverage. Please review.
Project coverage is 67.42%. Comparing base (
cfcbd1e
) to head (977936a
).
Additional details and impacted files
@@ Coverage Diff @@
## develop #23838 +/- ##
===========================================
- Coverage 67.48% 67.42% -0.05%
===========================================
Files 1288 1289 +1
Lines 50153 50236 +83
Branches 13023 13023
===========================================
+ Hits 33842 33871 +29
- Misses 16311 16365 +54
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@jonybur I can confirm I no longer see the strange behavior of the toast not going away. 👍
Missing release label release-11.16.0 on PR. Adding release label release-11.16.0 on PR and removing other release labels(release-11.18.0), as PR was cherry-picked in branch 11.16.0.