-
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
Spam2: Moderator's Queue feature #8196
Conversation
Codecov Report
@@ Coverage Diff @@
## main #8196 +/- ##
==========================================
- Coverage 81.81% 81.30% -0.51%
==========================================
Files 100 101 +1
Lines 5846 5869 +23
==========================================
- Hits 4783 4772 -11
- Misses 1063 1097 +34
|
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.
Nice work @keshavsethi. I have only one suggestion above :)
This is pretty amazing @keshavsethi , thank you for creating this! Very excited to see this functionality come to life. Is there a view where an admin like myself can see which tags moderators are subscribed to? The use case i'm imagining is "Oh, air-quality only has one moderator, while water-quality has 15 -- does anyone want to help moderate over in air-quality?" |
app/models/tag.rb
Outdated
@@ -334,7 +334,7 @@ def followers_who_dont_follow_tags(tags) | |||
|
|||
# https://github.com/publiclab/plots2/pull/4266 | |||
def self.trending(limit = 5, start_date = DateTime.now - 1.month, end_date = DateTime.now) | |||
Tag.select('term_data.name, plots.term_data.count') # ONLY_FULL_GROUP_BY, issue #8152 & #3120 |
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.
good catch! Thanks!
app/models/user.rb
Outdated
@@ -277,6 +277,20 @@ def unmoderated_in_period(start_time, end_time) | |||
.distinct | |||
end | |||
|
|||
def moderator_queue |
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.
Does this make more sense in a controller, maybe? Or, could you explain your reasoning in a comment in the code? 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, I have added this in the controller. Thanks!!
Would this affect everyone? Perhaps we should think about how this might be the case for moderators but not admins? @ebarry what do you think about this as a policy? Also, if we merge this, we should add an explanatory text just after Thanks, @keshavsethi this is very exciting! |
This is a good idea; for now we have the opposite - you can see who is subscribed to a given topic, but not which topics a given person is subscribed to. I want to suggest we show some kind of "moderator" icon (dunno what! but with an explanatory tooltip, maybe it could be a "certificate" icon? https://fontawesome.com/v4.7.0/icon/certificate) next to users in the subscribers listing, such as on https://publiclab.org/contributors/water-quality This would maybe be easier to fulfill @ebarry's use case:
because the page already exists. Could we open an issue for this to discuss and finalize, @keshavsethi ? It could even be a first-timers-only issue as the badge would be pretty easy to implement! |
@jywarren @ebarry, I have added count of moderators and admins who are following that tag as shown in the screenshot. Here "one" is being followed by 1 moderator. I will add a section where a moderator can follow or unfollow a tag with a count of moderators already following them. |
Here I have created a separate controller(batch controller) for Bulk moderation as code climate is giving error for controller more than 250 lines. Please review it from gitpod as well. |
@pydevsg @ananyaarun @ebarry @jywarren @cesswairimu @VladimirMikulic @Uzay-G Please review!! |
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.
Very nice @keshavsethi
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.
Great work @keshavsethi 🎉
Hi @keshavsethi were you able to add explanatory text about the narrower tag-filtered display after the word Queue? Also,
This is great. Is there a tooltip perhaps that could explain what the number means, as it could seem mysterious to some folks? Thank you! Love the controller split too, great work.
Let's create a new issue for this idea of a moderator icon and split out that task. Sound good, @keshavsethi ? Finally, one more question - i'm thinking of how people could circumvent this filtering and just moderate everything. I can think of 3 ways:
See the "all research" subscription below, which some admins use: |
@jywarren Thanks for the review, I have made some changes here. now moderator can filter out nodes as per tag. Suppose the moderator wants to filter out nodes only based on tag "XYZ" then all the spammed, unmoderated, and flagged nodes will get rendered. This Will remove the problem of everything tag as admin/moderator can just filter nodes based on the tag. |
Oh this is great! Can we name them "all tags" and "selected tags" for clarity? And what is the default when you first open it? |
Yes, I have added few tooltips with tags and everything filter which will help moderators.
I am bit confused here, should I add moderator icon in the tag. If so, then how a user will be able to tag node with icon??
This will be solved by tag filter Thanks!! |
@jywarren Done, I have changed "everything" to "all tags". By default, it will show all nodes with tags which moderator is following. |
@jywarren @cesswairimu can we merge this if it is fine? |
Yeah this good to merge.. Tremendous work @keshavsethi 🚀 |
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* paginate tag page listings (#8243) * Update _graph.html.erb * Update show.html.erb * topic card count fixes for #7965 (#8249) * fixes for #7965 * count fixes * Update _topicCard.html.erb * Delete _related_tags.html.erb (#8247) * Fixes to tag counting logic (#8245) * Update tag_test.rb * Update tag_test.rb * Update tag_test.rb * Update tag.rb * Spam2: Moderator's Queue feature (#8196) * queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue * Don't let newcomers edit wiki pages (controller-level) (#8250) * Don't let newcomers edit wiki pages (controller-level) * Update wiki_controller.rb * Update wiki_controller_test.rb * Update wiki_controller_test.rb * Update wiki_controller_test.rb * Update wiki_controller_test.rb * Update wiki_controller.rb * Update wiki_controller.rb * Update wiki_controller_test.rb * Update wiki_controller_test.rb * Bump rubocop from 0.88.0 to 0.89.0 Bumps [rubocop](https://github.com/rubocop-hq/rubocop) from 0.88.0 to 0.89.0. - [Release notes](https://github.com/rubocop-hq/rubocop/releases) - [Changelog](https://github.com/rubocop-hq/rubocop/blob/master/CHANGELOG.md) - [Commits](rubocop/rubocop@v0.88.0...v0.89.0) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump codecov from 0.2.3 to 0.2.5 Bumps [codecov](https://github.com/codecov/codecov-ruby) from 0.2.3 to 0.2.5. - [Release notes](https://github.com/codecov/codecov-ruby/releases) - [Changelog](https://github.com/codecov/codecov-ruby/blob/master/CHANGELOG.md) - [Commits](codecov/codecov-ruby@v0.2.3...v0.2.5) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Bump rdiscount from 2.2.0.1 to 2.2.0.2 Bumps [rdiscount](https://github.com/davidfstr/rdiscount) from 2.2.0.1 to 2.2.0.2. - [Release notes](https://github.com/davidfstr/rdiscount/releases) - [Changelog](https://github.com/davidfstr/rdiscount/blob/master/CHANGELOG.md) - [Commits](davidfstr/rdiscount@2.2.0.1...2.2.0.2) Signed-off-by: dependabot-preview[bot] <support@dependabot.com> * Adding tags to Modals of Nodes (#8238) * adding tags in modals of Nodes #8230 * refactored #8230 * fixed tag path in the modal #8230 also fixed extra spacing when no tags on the modal * update _flags.html.erb (#8237) Changed "btn btn-xs" to "btn btn-sm" * adjust opengraph tag Co-authored-by: Jeffrey Warren <jeff@unterbahn.com> Co-authored-by: Keshav Sethi <36025262+keshavsethi@users.noreply.github.com> Co-authored-by: dependabot-preview[bot] <27856297+dependabot-preview[bot]@users.noreply.github.com> Co-authored-by: renugasaraswathy <renugasaraswathy@gmail.com> Co-authored-by: siddhama <54734665+siddhama@users.noreply.github.com>
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
* queue feature spam2 * indentation issue * bulk moderation for comments and tag count in queue * indentation * moderator queue * batch controller * first-timmer issue * tag filter * queue indentation * all tags filter queue
Here, moderators and admin can moderate only those Nodes which has a tag that moderator/admin is following. As in the following screenshot, we can see that "one" tag is being followed by admin. so admin can moderate only those nodes which has "one as "tag". I have mentioned more details in my proposal.
![Screenshot from 2020-08-05 05-38-54](https://user-images.githubusercontent.com/36025262/89357515-5e377d00-d6de-11ea-907f-ecd2cc623e3c.png)
Please try this out on gitpod
@jywarren @cesswairimu @pydevsg @VladimirMikulic @Uzay-G @ananyaarun @ebarry @emilyashley Please review!!
Thanks!