Skip to content
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

Moderating first-timer comments #3331

Closed
11 tasks done
grvsachdeva opened this issue Sep 14, 2018 · 17 comments
Closed
11 tasks done

Moderating first-timer comments #3331

grvsachdeva opened this issue Sep 14, 2018 · 17 comments
Assignees
Labels
help wanted requires help by anyone willing to contribute planning Planning issues!
Milestone

Comments

@grvsachdeva
Copy link
Member

grvsachdeva commented Sep 14, 2018

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.

  • 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. --- Method to check if user has commented for first-time or not #3509

  • 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

  • Add the view for moderated comment just we have for node

  • Make a comment_moderation mailer and add the tests for it

  • Make a comment approval/spammed mail and add the tests for it.

  • Call both mailers at appropriate places from comment.rb and comment_controller.rb

  • Add functional tests

  • Write documentation about using extra status field

  • Moderated comments viewability to different users - (Comment listing on dashboard #4470)

  • Append under-moderation comment in comments section using AJAX visible to author/moderator (--- followup)

@jywarren please review the steps. Thanks!

@grvsachdeva grvsachdeva added the planning Planning issues! label Sep 14, 2018
@grvsachdeva grvsachdeva added this to the Spam! milestone Sep 14, 2018
@grvsachdeva grvsachdeva changed the title Moderating 🚧 first-timer comments Moderating first-timer comments Sep 14, 2018
@jywarren
Copy link
Member

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?

@jywarren jywarren added the break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration label Sep 24, 2018
@jywarren
Copy link
Member

Thanks and sorry it took me a while to respond!!! 👍

@grvsachdeva
Copy link
Member Author

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 !

@jywarren
Copy link
Member

jywarren commented Sep 25, 2018 via email

@jywarren jywarren added the help wanted requires help by anyone willing to contribute label Oct 31, 2018
@jywarren
Copy link
Member

Maybe this could be a good source of GCI issues!!!

@digitaldina
Copy link
Collaborator

working on the tests 👍 :) #4103

@vatbq
Copy link
Contributor

vatbq commented Dec 11, 2018

We've been working on this, there are a lot new features ready and maybe we can mark them as done.

Done

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 :) 💯Please tell me if I'm forgetting something

@jywarren
Copy link
Member

jywarren commented Dec 11, 2018 via email

@digitaldina
Copy link
Collaborator

@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!

@vatbq
Copy link
Contributor

vatbq commented Dec 12, 2018

That sounds fantastic @dinaelhanan! I think we can make it happens

@grvsachdeva
Copy link
Member Author

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 😃 !

@grvsachdeva grvsachdeva removed the break-me-up break up for cleaner code separation, discrete tests, and, easier and iterative collaboration label Dec 15, 2018
@digitaldina
Copy link
Collaborator

@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!

@grvsachdeva
Copy link
Member Author

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!

@digitaldina
Copy link
Collaborator

@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!

@grvsachdeva
Copy link
Member Author

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.

@digitaldina
Copy link
Collaborator

digitaldina commented Dec 16, 2018

@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!

@grvsachdeva
Copy link
Member Author

Moderated comment visibility at comment node before moderating:

  • Comment author: Visible for question, not for note
  • Moderator: Visible for question, not for note
  • Any user: Visible for question, not for note
  • Without session: Visible for question, not for note

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
help wanted requires help by anyone willing to contribute planning Planning issues!
Projects
None yet
Development

No branches or pull requests

4 participants