We currently moderate first-timer question, note for preventing spam. Now, comments are also becoming a issue, so it's decided in #2304 that we would be implementing the similar moderation system as that of nodes for comments too.
[x] Check if the user is a first-time commenter or not, if the user has published a note before then he/she
shouldn't be considered as the first-time commenter. Make a function in comment.rb
for this. --- #3509
[x] Make a function in comment.rb
which will change the status of comment to 4 (status = 1 represent normal comment, status = 4 represent under moderation).
[x] In comment_controller.rb
check for the first-time commenter if it is, then changes status to 4 using the function build in 1
[x] Add the view for moderated comment just we have for node
[x] Make a comment_moderation mailer and add the tests for it
[x] Make a comment approval/spammed mail and add the tests for it.
[x] Call both mailers at appropriate places from comment.rb
and comment_controller.rb
[x] Add functional tests
[x] Write documentation about using extra status field
[x] Moderated comments viewability to different users - (#4470)
[x] Append under-moderation comment in comments section using AJAX visible to author/moderator (--- followup)
@jywarren please review the steps. Thanks!
Thank you! I think potentially displaying comments as greyed-out until they are approved? This is related to your last item.
Both on individual notes, questions, wiki pages (these share templates i think) but also at /comments
Also, potentially have a /comments option which shows as-yet-unapproved comments? Like /comments?status=unapproved
maybe?
Thanks and sorry it took me a while to respond!!! 👍
I think potentially displaying comments as greyed-out until they are approved? This is related to your last item.
yes, you got it right!
Both on individual notes, questions, wiki pages (these share templates i think) but also at /comments
I will take care
Also, potentially have a /comments option which shows as-yet-unapproved comments? Like /comments?status=unapproved
I will add it as follow-up.
okay, breaking it now. Thanks @jywarren !
Awesome!
On Tue, Sep 25, 2018 at 10:29 AM Gaurav Sachdeva notifications@github.com
wrote:
Reopened #3331 https://github.com/publiclab/plots2/issues/3331.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/3331#event-1865902314, or mute
the thread
https://github.com/notifications/unsubscribe-auth/AABfJ3sBkZbWC2v9Gpdm3929HcJbsrQ4ks5uej2egaJpZM4Wp6Ju
.
Maybe this could be a good source of GCI issues!!!
working on the tests :+1: :) https://github.com/publiclab/plots2/pull/4103
We've been working on this, there are a lot new features ready and maybe we can mark them as done
.
comment.rb
which will change the status of comment to 4 (status = 1 represent normal comment, status = 4 represent under moderation).[x] In comment_controller.rb check for the first-time commenter if it is, then changes status to 4 using the function build in 1.
_The two last points have changed. Now, when a new comment is created and the author is first-time-poster, you set the status (4) before creating, so the function isn't necessary. You can check the discussion here #4098_
[x] Add the view for moderated comment just we have for node #4219
Great work here @gauravano :) 💯Please tell me if I'm forgetting something
This is awesome!!!!
On Tue, Dec 11, 2018, 4:57 PM Valentina Tironi <[email protected]
wrote:
We've been working on this, there are a lot new features ready and maybe
we can mark them as done.
Done-
Check if the user is a first-time commenter or not, if the user has
published a note before then he/she #4047
https://github.com/publiclab/plots2/issues/4047
-Make a function in comment.rb which will change the status of comment
to 4 (status = 1 represent normal comment, status = 4 represent under
moderation).
-In comment_controller.rb check for the first-time commenter if it is,
then changes status to 4 using the function build in 1.The two last points have changed. Now, when a new comment is created
and the author is first-time-poster, you set the status (4) before
creating, so the function isn't necessary. You can check the discussion
here #4098 https://github.com/publiclab/plots2/pull/4098
-Add the view for moderated comment just we have for node #4219
https://github.com/publiclab/plots2/pull/4219
-Call both mailers at appropriate places from comment.rb and
comment_controller.rb (#4226
https://github.com/publiclab/plots2/pull/4226 #4098
https://github.com/publiclab/plots2/pull/4098 #4217
https://github.com/publiclab/plots2/pull/4217 #4068
https://github.com/publiclab/plots2/pull/4068)
-Add functional tests (Test were added in the pull request
correspondent) (#4226 https://github.com/publiclab/plots2/pull/4226
#4098 https://github.com/publiclab/plots2/pull/4098 #4217
https://github.com/publiclab/plots2/pull/4217 #4068
https://github.com/publiclab/plots2/pull/4068)To Do
- Make a comment_moderation mailer and add the tests for it
- Make a comment approval/spammed mail and add the tests for it.
- Write documentation about using extra status field
- Append under-moderation comment in comments section using AJAX
visible to author/moderator (--- followup)Great work here @gauravano https://github.com/gauravano :) 💯Please
tell me if I'm forgetting something—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
https://github.com/publiclab/plots2/issues/3331#issuecomment-446377491,
or mute the thread
https://github.com/notifications/unsubscribe-auth/AABfJxYRSR918eTQ3-rm_30FJeSOdiMOks5u4CoWgaJpZM4Wp6Ju
.
@ValentinaTironi although I'm quite busy this week, I will have a lot of time this weekend to put toward working on stuff, so I'd love to help with the first task on the todo! I would like to actually make it though, since I think I want a change from writing the tests and try something new. Great idea!
That sounds fantastic @dinaelhanan! I think we can make it happens
Hi @dinaelhanan I have updated the issue checklist only 2 parts are remaining. Thanks to @ValentinaTironi for her great work in solving all the tasks.
Last 2 parts are remaining, you are welcome to complete those. Also, feel free to mention me if you need any clarification or help. Thanks :smiley: !
@gauravano I would love to get started on the documentation! Is it targeted to the users? also where can I see this feature/the code that affects it? Thanks!
Hey @dinaelhanan, you have to make changes in this section - https://github.com/publiclab/plots2/blob/master/doc/DATA_MODEL.md#comments
What you have to do -
Notice the Node status part in this section - https://github.com/publiclab/plots2/blob/master/doc/DATA_MODEL.md#nodes
You have to copy that node status list and append the similar list to comment section but without status 5.
Why all this? As we have made status = 4 for comment moderation and as we are adding status so it's good to avoid any confusion among new contributors. Any questions are welcome?
Thanks!
@gauravano Oh so do I just let people know that those nodes are used for the comments and what they mean? Like a list of all statuses except 5, then say what they mean, and how they are related to the comments, right? thanks!
First copy that node status part to comment section part. Then, node keyword would be replaced by comment. And, status =5 not needed there.
Status for Node are now same for comment in our Code base except status =5.
@gauravano Ok I've made the changes however I'm not seeing status =5. Do you mean the status 4? I left that in just in case. Thanks!
Moderated comment visibility at comment node before moderating:
Most helpful comment
@ValentinaTironi although I'm quite busy this week, I will have a lot of time this weekend to put toward working on stuff, so I'd love to help with the first task on the todo! I would like to actually make it though, since I think I want a change from writing the tests and try something new. Great idea!