-
Notifications
You must be signed in to change notification settings - Fork 1.8k
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
Option to not receive email notifications for topics you follow #6867
Comments
Existing tags for this kind of thing are formatted like: Then we'll need a UI on this page, https://publiclab.org/settings : Noting we have to add an exemption for Basic switch for this purpose might be labeled:
|
So the switch we'd have to add to the subscription_mailer.rb file would be: recipients += node.author.followers.collect(&:email)
recipients -= UserTag.where(value: 'digest:weekly').collect(&:user).collect(&:email) # exclude anyone who uses weekly digests
recipients -= UserTag.where(value: 'digest:daily').collect(&:user).collect(&:email) # exclude anyone who uses daily digests
recipients -= UserTag.where(value: 'notifications:noemail').collect(&:user).collect(&:email) # exclude anyone who doesn't want email notifications for topics they follow Then we'd need to modify the tests to ensure this is working! And here's a good guide to the UI changes that'd have to happen, based on the last time we added settings to this page! |
Text edit suggestions: Email Notifications
I want to be notified by email for:
Browser Notifications
|
OK awesome; the only thing is that "Never" wouldn't be an option that can have an "on/off" status, so I think for now we'll leave that off? If you'd like we can follow up with something where you click that and it automatically turns off the others, but it's a little more involved. Thanks! |
Regarding the "never" option, while the text Stevie suggested may not work for "never" in that way, does the graphic she drew up work? |
Yes, but ONLY for the first "All topics" row, so for now we will probably keep the page layout as it is. If in the future we set out to do a per-topic notifications settings system, we could adopt the table style view. Thanks! |
Is this otherwise ready to go? Thanks! |
@jywarren Hey! I am an Outreachy applicant. I would like to work on this, can you help me get started on this issue? |
Yes, speaking as a @publiclab/community-reps, this is ready to go 👍. |
The only thing we could consider re-opening this for is to reorganize this into radio buttons (i.e. choose between them, rather than toggle each one on or off): And to add an extra option for "NEVER". However that would involve the ability to add the tag Closing but we can re-open a narrower project! |
Thank you! /Settings is looking really great and fresh. |
Similarly to #4543, and in relation to #6787, we should make an option in https://publiclab.org/settings to turn off email notifications for topics you follow. You might still get notified via the Notifications API (like, smartphone notifications, etc), and you'd still see topics you follow listed on your dashboard (new dashboard at #6072).
New note email notifications are generated from this segment of code:
plots2/app/mailers/subscription_mailer.rb
Lines 8 to 26 in 97d0142
We need to modify this line, to make an exception for a) people who have a user tag showing they don't want to get email notifications for things they follow, so
notifications:none
perhaps? (we need to discuss/disambiguate this vs. the existing tags we use on the /settings page...)plots2/app/mailers/subscription_mailer.rb
Line 16 in 97d0142
You can determine if a user has a tag like this:
https://github.com/publiclab/plots2/blob/master/app/views/users/settings.html.erb
(Possibly useful links: The settings were previously worked on in #2985 and #3119 and digests are sent from https://github.com/publiclab/plots2/blob/7e20e413e94925a4f021f14e61a36b7ebb270e25/app/jobs/digest_mail_job.rb)
The text was updated successfully, but these errors were encountered: