-
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
Changed text and styling for the settings page #9240
Conversation
Codecov Report
@@ Coverage Diff @@
## main #9240 +/- ##
=======================================
Coverage ? 82.24%
=======================================
Files ? 98
Lines ? 5852
Branches ? 0
=======================================
Hits ? 4813
Misses ? 1039
Partials ? 0 |
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.
Thanks @Manasa2850, this looks good so far, I've noticed this part is missing
Whenever there are new posts on topics I follow
in the I want to receive an email section
Should it be present?
app/views/users/settings.html.erb
Outdated
|
||
<div style="display: inline-flex; justify-content: space-between; width: 90%;"> | ||
<span>Do you want to receive a customized digest weekly?</span> | ||
<span>For a weekly digest </span> |
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 think the issue says In a weekly digest
...not sure if it is a strict change...I think it could remain as it is now...
This is the same for line 84
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.
Yes, we'd prefer the exact wording:
I want to receive an email
- Whenever there are new posts on topics I follow
- In a daily digest
- In a weekly digest
Can you make these changes? Thank you!!!!
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.
Sure I'll make these changes. Thanks!
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.
@jywarren @RuthNjeri there was nothing corresponding to "Whenever there are new posts on topics I follow" earlier. I can take it up as a separate issue and add it in another PR if that's fine!
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.
Hi @Manasa2850 I think that it is meant to be added as part of the notifications under I want to receive an email
here https://github.com/publiclab/plots2/pull/9240/files#diff-60dea8a0195e299c872e9b749c642d0606caf5119e88bdfaab11fe378c46534dR67
I think there would be an entirely new notification switch though it's a great idea to follow that up in another issue to find out is there is a digest:topics
for topics
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.
Aha, ummm I think what is happening here is that these three options are actually a toggle. We can have only one of the three states, because a digest is /instead of/ updates for every post. Does that make sense? Is that distinction something we can spin out into a new issue or add to the original? Right now, i think we can skip the first option, but eventually it'll be like "do i want digests OR emails for each post?"
Does that make sense? Thanks and sorry for the confusion!
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.
Or perhaps we can explicitly say that in help text above these toggles? Something like:
Email notifications are sent for each post in topics you follow. If you prefer to receive a digest, choose one of these options:
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.
Sure @jywarren. For now I'll just add a help text. I'll create another issue for creating a toggle for the options and then work on that.
Thanks!
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.
@RuthNjeri there is no digest:topics
for topics as of now. I've created an issue #9260 for that and will try solving it.
@Manasa2850 After this PR is merged, would you be interested in creating FTOs for the translations of the hardcoded texts within this file? |
Yes @RuthNjeri I'd love to create FTOs for the translations! |
Thanks! I know @cesswairimu would love some for the SOC and Outreachy program! |
I sure would love that...thanks you both 🎉 |
@@ -47,7 +49,7 @@ | |||
|
|||
<% if logged_in_as(['admin', 'moderator']) %> | |||
<div style="display: inline-flex; justify-content: space-between; width: 90%;"> | |||
<span>Do you want to be notified by a email for moderation emails? </span> | |||
<span>Moderation emails </span> |
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.
Was this part of the changes in the issue? Also, line 149 and 163
<% if current_user.can_moderate? %> | ||
<div style="display: inline-flex; justify-content: space-between; width: 90%;"> | ||
<span>In a weekly digest for unmoderated posts</span> | ||
<span> | ||
<label style=" vertical-align: middle;" class="switch"> | ||
<p> Notification switch </p> | ||
<input type="checkbox" name="digest:weekly:spam" <% if UserTag.exists?(current_user.id, 'digest:weekly:spam') %>checked<% end %>> | ||
<span class="slider round"></span> | ||
</label> | ||
</span> | ||
</div> | ||
|
||
<br /> | ||
<br /> | ||
|
||
<div style="display: inline-flex; justify-content: space-between; width: 90%;"> | ||
<span>In a daily digest for unmoderated posts</span> | ||
<span> | ||
<label style=" vertical-align: middle;" class="switch"> | ||
<p> Notification switch </p> | ||
<input type="checkbox" name="digest:daily:spam" <% if UserTag.exists?(current_user.id, 'digest:daily:spam') %>checked<% end %>> | ||
<span class="slider round"></span> | ||
</label> | ||
</span> | ||
</div> | ||
|
||
<br /> | ||
<br /> | ||
<% end %> | ||
|
||
<br /> | ||
|
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.
Some of these lines differ from what was there previously, is this also part of the issue changes?
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.
@RuthNjeri the changes mentioned in the issue are just for when we login as a "user". I've extended it for "moderator" and "admin" logins too to maintain uniformity. Hence those changes.
Thanks!
Code Climate has analyzed commit d74e22a and detected 0 issues on this pull request. View more on Code Climate. |
@jywarren @RuthNjeri could you please review it now? I think it can be merged now. I'll create the other 2 issues and start working on them after this is done! |
|
||
|
||
<br /> | ||
<h4><b>Email notifications are sent for each post in topics you follow. If you prefer to receive a digest, choose one of these options: </b></h4> |
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.
Love it. Thank you so much!!!
Thanks so much for the careful work here!!! 🎉 🎉 🎉 🎉 🎉 |
* changes text for settings page * added exact wording * changed help text
* changes text for settings page * added exact wording * changed help text
Fixes #6871 (<=== Add issue number here)
Make sure these boxes are checked before your pull request (PR) is ready to be reviewed and merged. Thanks!
rake test
@publiclab/reviewers
for help, in a comment belowIf tests do fail, click on the red
X
to learn why by reading the logs.Please be sure you've reviewed our contribution guidelines at https://publiclab.org/contributing-to-public-lab-software
Thanks!