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:
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...)
You can determine if a user has a tag like this:
UserTag.exists?(user.id, 'digest:weekly')
https://github.com/publiclab/plots2/blob/master/app/views/users/settings.html.erb
(Possibly useful links: The settings were previously worked on in https://github.com/publiclab/plots2/pull/2985/ and https://github.com/publiclab/plots2/pull/3119 and digests are sent from https://github.com/publiclab/plots2/blob/7e20e413e94925a4f021f14e61a36b7ebb270e25/app/jobs/digest_mail_job.rb)
Existing tags for this kind of thing are formatted like: notifications:mentioned so perhaps notifications:noemail (just so it specifically means no emails, as opposed to turning off other kinds of notifications)?
Then we'll need a UI on this page, https://publiclab.org/settings :

Noting we have to add an exemption for digest:daily and digest:weekly as well, while we're at it.
Basic switch for this purpose might be labeled:
Do you want to receive email notifications for topics you follow? [ ]

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 receive an email:
I want to be notified by email for:
Browser Notifications
I want to receive 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!
Noting this is ready pending @publiclab/community-reps 馃憤 to be taken up; it will be very similar to #6282, which was fixed by #7183 and #7191. 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 馃憤.
I believe this is complete!

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 notifications:noemail which as of https://github.com/publiclab/plots2/pull/9269/ is evolving into a blanket policy of no emails (but is not there yet).
Closing but we can re-open a narrower project!
Thank you! /Settings is looking really great and fresh.