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

fix: push notifications #11250

Merged
merged 64 commits into from
Sep 24, 2024
Merged

fix: push notifications #11250

merged 64 commits into from
Sep 24, 2024

Conversation

Jonathansoufer
Copy link
Contributor

@Jonathansoufer Jonathansoufer commented Sep 17, 2024

Description

This PR re-enable push notifications (background/foreground) based on notifee approach.

Related issues

Fixes:

NOTIFY-1103

Manual testing steps

  1. Install the MetaMask wallet
  2. Click on the Bell Icon on the top-right header
    3.Turn On Notifications
  3. Trigger any transaction and leave the app.

Expected behaviour: A device push notification should appear on your device.

Screenshots/Recordings

Before

After

Screen.Recording.2024-09-24.at.07.57.41.mov

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.

@Jonathansoufer Jonathansoufer requested review from a team as code owners September 17, 2024 12:01
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.

@github-actions github-actions bot added the team-snaps-platform Snaps Platform team label Sep 17, 2024
@Jonathansoufer Jonathansoufer self-assigned this Sep 17, 2024
@Jonathansoufer Jonathansoufer added team-mobile-platform team-notifications Notifications team Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 17, 2024
Copy link

socket-security bot commented Sep 17, 2024

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

Package New capabilities Transitives Size Publisher
npm/@notifee/react-native@9.0.2 None 0 886 kB mikehardy
npm/@react-native-firebase/app@20.5.0 None 0 504 kB salakar
npm/@react-native-firebase/messaging@20.5.0 None 0 289 kB salakar

🚮 Removed packages: npm/@notifee/react-native@7.8.2, npm/@react-native-firebase/app@20.1.0, npm/@react-native-firebase/messaging@20.1.0

View full report↗︎

Copy link
Contributor

github-actions bot commented Sep 17, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: 5aeff10
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/73ec7fec-9e0b-49e8-86fe-4bc5437b93d1

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Jonathansoufer Jonathansoufer added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 18, 2024
Copy link
Contributor

github-actions bot commented Sep 18, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: c8a802b
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/fcf475e5-5214-447b-a474-6d55d34d6713

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Jonathansoufer Jonathansoufer added Run Smoke E2E Triggers smoke e2e on Bitrise and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 24, 2024
Copy link
Contributor

github-actions bot commented Sep 24, 2024

https://bitrise.io/ Bitrise

❌❌❌ pr_smoke_e2e_pipeline failed on Bitrise! ❌❌❌

Commit hash: d762b5e
Build link: https://app.bitrise.io/app/be69d4368ee7e86d/pipelines/fcf4e088-bf04-4709-a493-517f8f1cc8ca

Note

  • You can kick off another pr_smoke_e2e_pipeline on Bitrise by removing and re-applying the Run Smoke E2E label on the pull request

Tip

  • Check the documentation if you have any doubts on how to understand the failure on bitrise

@Jonathansoufer Jonathansoufer added No E2E Smoke Needed If the PR does not need E2E smoke test run No QA Needed Apply this label when your PR does not need any QA effort. and removed Run Smoke E2E Triggers smoke e2e on Bitrise labels Sep 24, 2024
Copy link

Copy link

@naugtur naugtur left a comment

Choose a reason for hiding this comment

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

Approving to unblock, but got one concern about duplicated firebase lib

yarn.lock Show resolved Hide resolved
Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

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

Nice work!
Some suggestions, questions and comments, but mainly for maintainability, guidelines compliance and readability.
Well done!
Let me know when I can have a second review pass.

Copy link
Contributor

@NicolasMassart NicolasMassart left a comment

Choose a reason for hiding this comment

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

After discussing the comments I put in the PR, I let @Jonathansoufer decide if this is a blocker for this PR or if he can create a new followup PR to handled them.

So I approve it as I know he is currently evaluating this and it has already been reviewed by many others, so it's overall good to go.
@Jonathansoufer please link this PR in your next PR as the issue to be fixed.

I just want to remind that if we release a fix in prod, we have to be very careful about the test part even if the code part seems fine. Without test we are naked in the wild. I don't really feel comfortable being naked in the wild...

@Jonathansoufer Jonathansoufer added this pull request to the merge queue Sep 24, 2024
Merged via the queue into main with commit dcca986 Sep 24, 2024
47 of 49 checks passed
@Jonathansoufer Jonathansoufer deleted the fix/push-notifications branch September 24, 2024 17:50
@github-actions github-actions bot locked and limited conversation to collaborators Sep 24, 2024
@metamaskbot metamaskbot added the release-7.33.0 Issue or pull request that will be included in release 7.33.0 label Sep 24, 2024
github-merge-queue bot pushed a commit that referenced this pull request Oct 14, 2024
<!--
Please submit this PR as a draft initially.
Do not mark it as "Ready for review" until the template has been
completely filled out, and PR status checks have passed at least once.
-->

## **Description**

This PR addresses all comments from [this
PR](#11250) related to
unit tests best practices.

## **Related issues**

Fixes: #11250

## **Manual testing steps**

1. Go to this page...
2.
3.

## **Screenshots/Recordings**

<!-- If applicable, add screenshots and/or recordings to visualize the
before and after of your change. -->

### **Before**

<!-- [screenshots/recordings] -->

### **After**

<!-- [screenshots/recordings] -->

## **Pre-merge author checklist**

- [x] I’ve followed [MetaMask Contributor
Docs](https://github.com/MetaMask/contributor-docs) and [MetaMask Mobile
Coding
Standards](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/CODING_GUIDELINES.md).
- [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](https://jsdoc.app/) format
if applicable
- [x] I’ve applied the right labels on the PR (see [labeling
guidelines](https://github.com/MetaMask/metamask-mobile/blob/main/.github/guidelines/LABELING_GUIDELINES.md)).
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.

---------

Co-authored-by: Nico MASSART <NicolasMassart@users.noreply.github.com>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
No E2E Smoke Needed If the PR does not need E2E smoke test run No QA Needed Apply this label when your PR does not need any QA effort. release-7.33.0 Issue or pull request that will be included in release 7.33.0 team-mobile-platform team-notifications Notifications team team-snaps-platform Snaps Platform team
Projects
Archived in project
Development

Successfully merging this pull request may close these issues.

9 participants