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

fix: fix the counter in the header

Open matteoscurati opened this issue 1 year ago • 3 comments

Description

This PR introduces a fix for the management of the counter in the menu. Currently, the counter does not work for Snap notifications if wallet notifications are not enabled. The PR revises the logic we use to manage the count to be displayed by using a hook (instead of selectors) and verifying in the header when to show the counter. In this way, the user has the ability to see the presence of received Snap notifications regardless of whether they have enabled wallet notifications.

Open in GitHub Codespaces

Related issues

Fixes:

Manual testing steps

In the case of unread notifications, a small counter with a red background is visible above the three dots for opening the menu, indicating the number of unread notifications.​

Screenshots/Recordings

Before

After

Screenshot 2024-05-23 at 08 59 50

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.

matteoscurati avatar May 23 '24 07:05 matteoscurati

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 23 '24 07:05 github-actions[bot]

Codecov Report

Attention: Patch coverage is 93.10345% with 2 lines in your changes are missing coverage. Please review.

Project coverage is 65.72%. Comparing base (d0a0037) to head (5622c0c).

Files Patch % Lines
ui/components/multichain/app-header/app-header.js 66.67% 1 Missing :warning:
...i/components/multichain/global-menu/global-menu.js 75.00% 1 Missing :warning:
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #24733      +/-   ##
===========================================
+ Coverage    65.69%   65.72%   +0.02%     
===========================================
  Files         1359     1360       +1     
  Lines        54006    54009       +3     
  Branches     14038    14039       +1     
===========================================
+ Hits         35479    35493      +14     
+ Misses       18527    18516      -11     

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

codecov[bot] avatar May 23 '24 21:05 codecov[bot]

Builds ready [278fb54]
Page Load Metrics (617 ± 545 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint673401065828
domContentLoaded95417105
load5540346171134545
domInteractive95417105
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 619 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar May 24 '24 19:05 metamaskbot

Builds ready [5622c0c]
Page Load Metrics (1254 ± 642 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint602111033718
domContentLoaded9321673
load48338112541336642
domInteractive9321673
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 619 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar May 27 '24 10:05 metamaskbot

Builds ready [cf4ff5c]
Page Load Metrics (946 ± 573 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint671871073617
domContentLoaded96217157
load5629419461194573
domInteractive96217157
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 619 Bytes (0.01%)
  • common: 0 Bytes (0.00%)

metamaskbot avatar May 27 '24 10:05 metamaskbot