Conversation
|
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. |
darkwing
left a comment
There was a problem hiding this comment.
Added some guidance here. Nice start!
|
Kicked CI because test failures look intermittent. This looks awesome! |
NidhiKJha
left a comment
There was a problem hiding this comment.
Really great start! Left some nits.
ui/pages/home/index.scss
Outdated
| &__survey-banner { | ||
| position: absolute; | ||
| &__overlay-banners { | ||
| z-index: 9999; |
There was a problem hiding this comment.
Why are we using this z-index?
There was a problem hiding this comment.
I found that the current implementation was being shown under other elements in the DOM.
The toasts should always be on top of everything, so the best way to ensure this is with z-index, as there are currently other elements using z-index as well.
ui/pages/home/home.component.js
Outdated
| /> | ||
| )} | ||
| {showPrivacyPolicyToast && isPrivacyToastRecent && ( | ||
| <BannerBase |
There was a problem hiding this comment.
Question: Why are we using BannerBase and not Toast component here?
There was a problem hiding this comment.
The implementation mirrors the one of the Survey banner, I haven't seen the Toast component before, but I think I can change the implementation of both banners to use Toast
|
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 |
| const isPrivacyToastNotShown = !newPrivacyPolicyToastShownDate; | ||
|
|
||
| return ( | ||
| <ToastContainer> |
There was a problem hiding this comment.
I suggest moving this function into its own component and then importing it. This approach offers several benefits: it makes the function easier to test on its own (unit testing), enables us to create a dedicated Storybook entry for it, and facilitates its reuse in future projects or components if needed, and reduce the size of the routes.component.js file
Builds ready [2b58957]
Page Load Metrics (1569 ± 657 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [23a6b09]
Page Load Metrics (1262 ± 729 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Builds ready [977936a]
Page Load Metrics (756 ± 576 ms)
Bundle size diffs [🚨 Warning! Bundle size has increased!]
|
Codecov ReportAttention: Patch coverage is
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 ☔ View full report in Codecov by Sentry. |
|
@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. |
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:
Related issues
Fixes: https://github.com/MetaMask/MetaMask-planning/issues/2319
Manual testing steps
Screenshots/Recordings
Before
After
Pre-merge author checklist
Pre-merge reviewer checklist