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
Determine new notifications in extension and display #4046
Conversation
4e23a7d
to
285bea6
Compare
285bea6
to
9924f8d
Compare
@tonisevener Just a head's up – merge conflict in this one (surrounding the prefixed localized string changes in #4044). |
@tonisevener Looks like a few more merge conflicts have snuck into this one. |
- audit public keyword uses - move date determination from model controller into model computed property
…notifications from RemoteNotificationAPIController directly
…xtension - still needs testing
…rything is localized properly
80537d5
to
e60b954
Compare
Snagging this PR from you, @staykids |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks great! Just a bunch of small suggested tweaks.
WMF Framework/Remote Notifications/Model/RemoteNotificationsModelController.swift
Show resolved
Hide resolved
WMF Framework/Remote Notifications/RemoteNotificationsAPIController.swift
Outdated
Show resolved
Hide resolved
- Clean up and refactor business logic out of NotificationService and move into separate helper class - Add ability to generate mock notifications, write unit tests against new helper class - Add Remote Notifications directory to localization script so that new helper class strings are localized. - Small naming and comment tweaks
716bb20
to
08485d7
Compare
- Even with one talk page notification, we still need "New message" subtitle according to designs.
@mcleinman This is ready for another look. I went through the test steps and had to push one little bug fix commit after the refactor. I didn't receive push notifications through the beta cluster though, so I leaned on the push utility. It could be that backend is stalling or not working at the moment, or I just wasn't patient enough. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just a couple small ones - one I think helps readability, others are nice to have.
WMF Framework/Remote Notifications/NotificationServiceHelper.swift
Outdated
Show resolved
Hide resolved
Code looks great, will be testing this tomorrow. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code looks great, and tests great! Thank you!
Phabricator:
https://phabricator.wikimedia.org/T288773
https://phabricator.wikimedia.org/T285353
& Some of https://phabricator.wikimedia.org/T287033
Notes
This extends the work done in #4026 to pull the latest unread push notifications from the notifications API, filters out previously seen notifications via an app container cache file and displays the results. If the result is a single new unread notification, it modifies the push content to display it's
header
value. There is also some extra handling for talk page notification types (adds subtitle, bundles if necessary) based on the Figma mocks. For all other situations, it defaults to "New activity on Wikipedia" text.After review, please wait for #4044 to be reviewed and merged. Then update this with feature/notifications and merge into that feature branch.
These steps should be tested through the Beta Cluster via the Staging scheme.
Test Steps