-
-
Notifications
You must be signed in to change notification settings - Fork 33
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
Let users choose which emails to receive #369
Let users choose which emails to receive #369
Conversation
cf73bb6
to
fea3ff4
Compare
This comment has been minimized.
This comment has been minimized.
fea3ff4
to
aee9266
Compare
This comment has been minimized.
This comment has been minimized.
1d76bb9
to
0e36cde
Compare
Ahh right, I probably forgot to check out and pull alpha. Should be OK now? |
The migration and code in |
How does this look after merging your fixes? |
We should be fine now, alembic generates empty revisions. The indexes are used as well, after filling the tables with some data, so I'm confident they're used on production as well. |
We should also specify some I've managed to split them into two columns again, so it's easier to understand which buttons are for which option. Do you like this layout? If so, I can push a commit. It's not much, just adding |
Yes, that looks a lot better, thanks! |
One more small bug I just found in testing, in the auto-update email subject we take the game version of |
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.
Looks solid to me. If you want, you can squash before merge.
45b1aa1
to
5660a4d
Compare
Took me a while to figure out how to run migrations on alpha. For future reference, this seemed to work:
|
Sorry, forgot about it this time. |
No problem, it's something I should learn anyway. I'll try to remember the |
Motivation
Currently if you follow a mod, you receive all email notifications for it. Some users might not want to receive notifications for compatibility updates.
Changes
Fixes #333 (the part about ignoring the auto-update email).
UI
Now if you edit your profile, a new section lists the mods you follow, with two checkboxes for each. The rows are striped to make it easier to pick out the associations between the contents of each row:
If you uncheck a checkbox (and save your changes), you won't receive that notification for that mod anymore. Each column of checkboxes has "Check all" and "Uncheck all" buttons that check and uncheck all the checkboxes in that column, so users can easily disable all notifications of a particular type.
Admins are allowed to edit these settings for other users in case someone requests it and can't figure out how to do it.
Data model
To make this possible, the
mod_followers
table has two new bool columns, both set to True for all old rows:send_update
- True to send regular update notifications, False to suppress themsend_autoupdate
- True to send auto-update notifications, False to suppress themIn addition,
mod_followers
now has three new indices:mod_id
to make it faster to find all of the followers of a moduser_id
to make it faster to find all the mods a user follows(user_id, mod_id)
to make it faster to find a particular user's follow row for a particular modSide fixes
The user description field in the profile edit screen now uses the rich text editor; the field has always supported markdown, but the rich text editor wasn't enabled before.