-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
Comment digest notification settings #657
Conversation
β¦comment-digest-notification-settings
β¦comment-digest-notification-settings
β¦comment-digest-notification-settings
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.
Looking good..I've tested it an it seems to work properly!
Had couple small questions/comments for your consideration..please ping me if you feel like some of those don't make sense for us, I don't feel strong about those.
@@ -55,6 +55,7 @@ public struct User { | |||
public struct Notifications { | |||
public private(set) var backings: Bool? | |||
public private(set) var comments: Bool? | |||
public private(set) var commentReplies: Bool? |
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.
Is our intent to order these alphabetically? If that's the case shouldn't commentReplies
come before comments
?
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 would probably apply to this whole PR π
@@ -214,6 +215,7 @@ extension User.Notifications: Argo.Decodable { | |||
let tmp1 = curry(User.Notifications.init) | |||
<^> json <|? "notify_of_backings" | |||
<*> json <|? "notify_of_comments" | |||
<*> json <|? "notify_of_comment_replies" |
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.
Should this be tested in UserTests
?
@@ -249,6 +250,9 @@ extension SettingsNotificationCellViewModel { | |||
case .friendBacksProject: | |||
return notificationType == .email | |||
? UserAttribute.Notification.friendActivity : UserAttribute.Notification.mobileFriendActivity | |||
case .commentReplyDigest: |
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.
Should we also test this case?
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.
I don't think it's necessary because the notifications test that we have already are sufficient.
QAing this PR I've noticed the following issue...please correct me if I'm doing something wrong but it looks like in order to see changes ( Steps to reproduce:
It appears to me that we're either not reloading the table properly or not refreshing for some reason. |
@@ -25,6 +25,7 @@ public enum UserAttribute { | |||
case let .notification(notification): | |||
switch notification { | |||
case .comments: return \.notifications.comments | |||
case .commentReplies: return \.notifications.commentReplies |
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.
Let's also move this above comments
in order to sort alphabetically
@@ -52,6 +53,7 @@ public enum UserAttribute { | |||
|
|||
public enum Notification { | |||
case comments | |||
case commentReplies |
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.
And here as well
@@ -71,6 +73,7 @@ public enum UserAttribute { | |||
public var trackingString: String { | |||
switch self { | |||
case .comments, .mobileComments: return "New comments" | |||
case .commentReplies: return "Comment reply digest" |
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.
And here
@@ -209,6 +209,7 @@ extension SettingsNotificationCellViewModel { | |||
AppEnvironment.current.koala.trackChangePushNotification(type: notification.trackingString, | |||
on: enabled) | |||
case .comments, | |||
.commentReplies, |
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.
And here
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.
π’ π’ π’
π’ π’ π’
π’ π’ π’
π² What
This PR implements comment digest notification in settings, which allows the user(backers and creators) to opt in/out of email notifications.
This PR also fixes the issue of users currently not being able to update their notifications.
π€ Why
Currently, backers have no way of knowing if their question was answered or post was responded to without coming back to the project and looking. Creators receive an individual email for every comment and comment reply on their project. Now, comment digest is for all users.
π See
Trello, screenshots, external resources?
β Acceptance criteria
Test Creator Reply Digest
Settings > Notifications
Scroll down toComment reply digest
toggle the email notificationTest Settings Notifications
Settings > Notifications
start toggling email and push notificationsProject Activity notification toggles do not reflect the apps(iOS and Android) on web. This PR does not fix this issue