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

Reintroduce NotificationController for in-app notifications #709

Merged
merged 18 commits into from
Apr 27, 2022

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Mar 7, 2022

Description
Reintroduces the NotificationController for in-app notifications.

  • ADDED:
    • Added NotificationController for in-app notifications.

Checklist

  • Tests are included if applicable
  • Any added code is fully documented

Issue

Progresses MetaMask/metamask-extension#13553

@FrederikBolding FrederikBolding changed the title Revive NotificationControllerV2 for in-app notifications Reintroduce NotificationController for in-app notifications Apr 8, 2022
@FrederikBolding FrederikBolding marked this pull request as ready for review April 13, 2022 14:52
@FrederikBolding FrederikBolding requested a review from a team as a code owner April 13, 2022 14:52
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

Overall looks great! most of my comments are minor questions or suggestions.

src/notification/NotificationController.ts Outdated Show resolved Hide resolved
src/notification/NotificationController.ts Outdated Show resolved Hide resolved
src/notification/NotificationController.ts Outdated Show resolved Hide resolved
src/notification/NotificationController.ts Outdated Show resolved Hide resolved
src/notification/NotificationController.ts Outdated Show resolved Hide resolved
src/notification/NotificationController.test.ts Outdated Show resolved Hide resolved
src/notification/NotificationController.test.ts Outdated Show resolved Hide resolved
mcmire
mcmire previously approved these changes Apr 19, 2022
Copy link
Contributor

@mcmire mcmire left a comment

Choose a reason for hiding this comment

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

Two nits never mind!, but looks good to me regardless.

src/notification/NotificationController.ts Show resolved Hide resolved
src/notification/NotificationController.ts Show resolved Hide resolved
Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

The restricted messenger type in the tests should be corrected, and I'd at least like to hear a reason for the native notifications being included (this thread)

@FrederikBolding
Copy link
Member Author

The restricted messenger type in the tests should be corrected, and I'd at least like to hear a reason for the native notifications being included (this thread)

Fixed the type. I thought it would be nice to use the same API for in-app and native notifications, but I see your points in the thread as well. I have removed it for now.

Copy link
Member

@Gudahtt Gudahtt left a comment

Choose a reason for hiding this comment

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

LGTM!

@FrederikBolding FrederikBolding merged commit 654e5dc into main Apr 27, 2022
@FrederikBolding FrederikBolding deleted the fb/notification-controller-v2 branch April 27, 2022 12:41
@adonesky1 adonesky1 mentioned this pull request May 3, 2022
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* Revive NotificationControllerV2 for in-app notifications

* Add more functionality and tests

* Test another case

* Remove getCurrent, add getNotifications

* Add a bit more information to the notifications

* Add getUnreadCount

* Rename to NotificationController

* Support multiple ids for dismissing and marking as read

* Simplify further

* Run linting

* Fix some PR comments

* Remove getters

* Add readDate

* Add some documentation

* Expand test slightly

* Fix test type

* Remove native notifications
MajorLift pushed a commit that referenced this pull request Oct 11, 2023
* Revive NotificationControllerV2 for in-app notifications

* Add more functionality and tests

* Test another case

* Remove getCurrent, add getNotifications

* Add a bit more information to the notifications

* Add getUnreadCount

* Rename to NotificationController

* Support multiple ids for dismissing and marking as read

* Simplify further

* Run linting

* Fix some PR comments

* Remove getters

* Add readDate

* Add some documentation

* Expand test slightly

* Fix test type

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

Successfully merging this pull request may close these issues.

None yet

3 participants