Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: ✨ show a notification item in the settings page #26843

Open
wants to merge 6 commits into
base: develop
Choose a base branch
from

Conversation

matteoscurati
Copy link
Contributor

@matteoscurati matteoscurati commented Sep 2, 2024

Description

This PR introduces the Notifications option within the settings page. Clicking on this option will render the user to the notifications/settings page.
Specifically:

  1. If basic functionalities are not active, the option disappears from the menu
  2. If notifications are not active, the user will still be redirected to the notifications/settings page, where they can enable them
  3. If notifications are active, the user will access the notifications/settings page, where they can select their options

Open in GitHub Codespaces

Related issues

N/A

Manual testing steps

  1. Go to the settings page.
  2. Find the Notifications option
  3. Verify that the Notifications option links to the notifications/settings page
  4. Verify that the Notifications option is hidden if basic functionalities are off

Screenshots/Recordings

N/A

Before

N/A

After

N/A

Pre-merge author checklist

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.

@matteoscurati matteoscurati added the team-notifications Notifications team label Sep 2, 2024
Copy link
Contributor

github-actions bot commented Sep 2, 2024

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.

@metamaskbot
Copy link
Collaborator

Builds ready [a272aca]
Page Load Metrics (1821 ± 101 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint163926131821207100
domContentLoaded161926021805208100
load162726151821209101
domInteractive2495442110
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 115 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

codecov bot commented Sep 3, 2024

Codecov Report

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

Project coverage is 70.15%. Comparing base (7dc6362) to head (2911149).

Files with missing lines Patch % Lines
.../notifications-settings/notifications-settings.tsx 0.00% 1 Missing ⚠️
ui/pages/settings/settings.component.js 66.67% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop   #26843      +/-   ##
===========================================
- Coverage    70.15%   70.15%   -0.00%     
===========================================
  Files         1425     1425              
  Lines        49653    49656       +3     
  Branches     13891    13892       +1     
===========================================
+ Hits         34833    34835       +2     
- Misses       14820    14821       +1     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@matteoscurati matteoscurati marked this pull request as ready for review September 10, 2024 14:34
@matteoscurati matteoscurati requested review from a team as code owners September 10, 2024 14:34
@matteoscurati matteoscurati force-pushed the feat/settings-page-add-notifications branch 2 times, most recently from 8e62d16 to 5d376ee Compare September 10, 2024 15:00
@metamaskbot
Copy link
Collaborator

Builds ready [1ca448e]
Page Load Metrics (1866 ± 208 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint34131411794560269
domContentLoaded148630671857432208
load149130711866432208
domInteractive18135443316
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 124 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

Copy link

sonarcloud bot commented Sep 11, 2024

@metamaskbot
Copy link
Collaborator

Builds ready [2911149]
Page Load Metrics (1650 ± 74 ms)
PlatformPageMetricMin (ms)Max (ms)Average (ms)StandardDeviation (ms)MarginOfError (ms)
ChromeHomefirstPaint60619261583263126
domContentLoaded13801918163115474
load13881926165015474
domInteractive13146403115
Bundle size diffs
  • background: 0 Bytes (0.00%)
  • ui: 124 Bytes (0.00%)
  • common: 0 Bytes (0.00%)

@@ -82,7 +81,7 @@ export default function NotificationsSettings() {
ariaLabel="Back"
iconName={IconName.ArrowLeft}
size={ButtonIconSize.Sm}
onClick={() => history.push(NOTIFICATIONS_ROUTE)}
onClick={() => history.go(-1)}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't see this used elsewhere in extension.
Can we use history.back()?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
team-notifications Notifications team
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants