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: notifications library - [2 of 10] #8701

Merged
merged 52 commits into from
Apr 11, 2024
Merged

Conversation

Jonathansoufer
Copy link
Contributor

@Jonathansoufer Jonathansoufer commented Feb 23, 2024

Description

Within the scope of Notifications Project, this PR replaces libraries and approaches on how MetaMask handles notifications to our users. The adoption of this approach will pave the way for MM make usage of push notifications (back/foregrounds).

REMINDER: Although this PR can be reviewed separately, triggering a NEW BUILD should be done together with UI changes PR so the user can have full control about push notifications.

Related issues

Fixes: Jira Ticket

Manual testing steps

  1. Go to any token details page.
  2. Submit a transaction and close the app.
  3. Wait for the Push Notification and click on it.

Screenshots/Recordings

After

Screen.Recording.2024-03-06.at.11.36.42.mov

Pre-merge author checklist

  • I’ve followed MetaMask Coding Standards.
  • I've clearly explained what problem this PR is solving and how it is solved.
  • I've linked related issues
  • I've included manual testing steps
  • I've included screenshots/recordings if applicable
  • 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.
  • I’ve properly set the pull request status:
    • In case it's not yet "ready for review", I've set it to "draft".
    • In case it's "ready for review", I've changed it from "draft" to "non-draft".

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.

@Jonathansoufer Jonathansoufer self-assigned this Feb 23, 2024
Copy link
Contributor

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.

Copy link

socket-security bot commented Feb 23, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@notifee/react-native@7.8.2 None 0 872 kB mikehardy
npm/@react-native-async-storage/async-storage@1.23.1 None +2 445 kB krizzu

🚮 Removed packages: npm/@react-native-async-storage/async-storage@1.17.10, npm/react-native-push-notification@3.1.3

View full report↗︎

Copy link

socket-security bot commented Feb 23, 2024

👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎

This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored.

View full report↗︎

@codecov-commenter
Copy link

codecov-commenter commented Mar 6, 2024

Codecov Report

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

Project coverage is 43.61%. Comparing base (2c29c7f) to head (034e44f).
Report is 1 commits behind head on main.

Files Patch % Lines
app/components/Nav/Main/index.js 0.00% 25 Missing ⚠️
app/util/notifications/settings/storage/index.ts 0.00% 21 Missing ⚠️
app/core/NotificationManager.js 0.00% 20 Missing ⚠️
...p/util/notifications/settings/storage/constants.ts 27.27% 8 Missing ⚠️
app/util/notifications/types.ts 0.00% 2 Missing ⚠️
app/util/notifications/setupAndroidChannels.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8701      +/-   ##
==========================================
- Coverage   43.67%   43.61%   -0.07%     
==========================================
  Files        1271     1275       +4     
  Lines       30921    30975      +54     
  Branches     3092     3098       +6     
==========================================
+ Hits        13506    13509       +3     
- Misses      16636    16687      +51     
  Partials      779      779              

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

@Jonathansoufer Jonathansoufer marked this pull request as ready for review March 6, 2024 12:30
@Jonathansoufer Jonathansoufer requested a review from a team as a code owner March 6, 2024 12:30
@Jonathansoufer
Copy link
Contributor Author

@Jonathansoufer You will probably have to deal with Apple Privacy Manifest when integrating Firebase. Review this PR for how it was addressed.

@sethkfman thanks for the heads up. Based on https://firebase.google.com/docs/ios/app-store-data-collection we'll absolutely have to update our manifest, but since this PR doesn't implement FCM yet, I'll handle it in a separated PR.

Copy link

sonarcloud bot commented Apr 10, 2024

@Jonathansoufer Jonathansoufer merged commit 8a9f18d into main Apr 11, 2024
30 of 31 checks passed
@Jonathansoufer Jonathansoufer deleted the feat/notifications branch April 11, 2024 13:00
@github-actions github-actions bot locked and limited conversation to collaborators Apr 11, 2024
@metamaskbot metamaskbot added the release-7.21.0 Issue or pull request that will be included in release 7.21.0 label Apr 11, 2024
@Jonathansoufer Jonathansoufer changed the title feat: notifications feat: notifications library - [2 of 6] May 8, 2024
@Jonathansoufer Jonathansoufer changed the title feat: notifications library - [2 of 6] feat: notifications library - [2 of 8] May 8, 2024
@Jonathansoufer Jonathansoufer changed the title feat: notifications library - [2 of 8] feat: notifications library - [2 of 10] May 8, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
notification release-7.21.0 Issue or pull request that will be included in release 7.21.0 Run Smoke E2E Triggers smoke e2e on Bitrise team-mobile-platform team-notifications Notifications team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

None yet

6 participants