Interface to configure notification preferences#7001
Interface to configure notification preferences#7001tomhughes merged 3 commits intoopenstreetmap:masterfrom
Conversation
|
This is currently deployed on the dev server at https://pablobm.apis.dev.openstreetmap.org. There are a couple of users you can use to try out things: |
|
From on overall point of view, is it a good idea to let people start turning email notifications off before we have in-site notifications working? |
|
As I understand it, the logic is that people are already ignoring/filtering their notification emails, so this doesn't make a big difference. |
|
The only ones that are fairly critical are changeset comments and note comments. We could perhaps disable those checkboxes for now until the in-site option is available. Direct messages already have an in-site indicator of course. New followers might not matter to some users. |
32d216b to
db272de
Compare
That sounds reasonable to me. What do the maintainers think? |
|
Forgot to mention: this doesn't include preferences for the notifications on GPX import success/failure, as that would require #6939 to be merged first. I think that's ok as they can be added in a later PR. |
ae49354 to
be33840
Compare
be33840 to
e381651
Compare
e381651 to
702dcd5
Compare
I'm happy to let users control whether they receive notification emails. If we forbid them from turning them off, then they are more likely to get frustrated and/or mark the emails as spam. I realise that we've managed a decade without being able to turn them off, but now that we have the option it would be unexpected to prohibit using it. |
|
As #6939 is now merged should we add the GPX notification to this before we merge it? |
702dcd5 to
53f9436
Compare
f056b75 to
68662cb
Compare
|
The last commit should probably add tests for the GPX notifiers that you've now added preferences for? There also seems to be a failing test? |
|
Yeah, sorry, I had to go in the middle of it. I'll complete tomorrow. |
68662cb to
7887698
Compare
Generated by 🚫 Danger |
7887698 to
81c3c70
Compare
81c3c70 to
1f8370e
Compare
1f8370e to
8c56c6e
Compare
|
This should be ready now. Gets labelled as "big-pr" particularly because testing each notification type requires ~40 lines of code. Could be DRY'ed up, but I think it would make it more clever than actually maintainable. |
|
Thanks for all the work. I think this looks good now. |
Closes #6897
This introduces a form under Preferences to configure notification preferences. At the moment this just means checkboxes for things like "I want to receive emails when I get changeset comments, but not when I receive diary comments".
I am storing preferences under
user_preferences, in the format:k => "notification.changeset_comment.email"/:v => "t". The table is there and seems like the right place. I could have gone for an array value instead ("notification.changeset_comment"/["email"]), but my choice simplifies serializing/deserializing and is easier to query.I have changed the labels in the Preferences section as they read "Preferences" a bit too redundantly. Let me know if you can think of better names, particularly for the first one.