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

Moderation module for comments #59

Open
wants to merge 9,364 commits into
base: master
Choose a base branch
from

Conversation

taitus
Copy link
Member

@taitus taitus commented Feb 26, 2020

Objectives

  • Define a "dictionary" (moderated texts), which builds a dynamic algorithm that detects comments with words considered offensive to the community

  • Hide offensive comments to the public, except under the Comments tab under Users#show, where the comment can be seen along with a Moderated tag

  • The comment's author can edit their offensive comment until no offenses are detected; the recorded offense is also removed from the backend so that no action can be taken upon it

  • An admin can "decline" or "confirm" these offenses —the former meaning the moderated comment will be shown again, while the latter hides the comment permanently (shadowban-like behavior)

Visual Changes

Notice when a comment including an offense is created:

Screenshot_20200226_104829

Comments section (with offensive comments) after reload:

Screenshot_20200226_104939

Comments tab under Users#show when a comment is offensive:

Screenshot_2020-02-26 Decide Madrid

View when editing an offensive comment:

Screenshot_2020-02-26 Decide Madrid (2)

Comments tab under Users#show after an offensive comment is corrected:

Screenshot_20200226_110208

Comments tab under Users#show for another user with offensive comments other than the currently logged-in one (this is also what an user would see if the comment is deemed offensive by an admin):

Screenshot_20200226_110423

Admin panel for moderated words:

Screenshot_20200226_104719

Admin panel for moderated words when a word has related offenses:

Screenshot_20200226_105102

Admin panel for actions that can be taken upon offenses:

Screenshot_20200226_105117

Admin panel when offenses have been moderated:

Screenshot_20200226_110705

Comments tab under Users#show when an comment is deemed as non-offensive by an admin:

Screenshot_20200226_110801

Notes

  • This change would only affect comments once merged, and after a "dictionary" is defined; to moderate previous comments, a Rake task would be needed

  • This PR is only aimed at comments, so while some logic from this feature is generic in case is ported somewhere in the future to other resources that are considered moderable, some work (i.e.: define a Moderable concern) is needed to fully abstract said behavior

decabeza and others added 30 commits May 16, 2019 17:56
…sals-support-mobile

Proposals support on mobile
DEPRECATION WARNING: Using positional arguments in functional tests
has been deprecated, in favor of keyword arguments, and will be
removed in Rails 5.1.

Deprecated style:
get :show, { id: 1 }, nil, { notice: "Flash message" }

New keyword style:
get :show, params: { id: 1 }, flash: { notice: "Flash message" }
…op_line_long_to_110_characters

Allow lines to be 110 characters long by Rubocop
…e_rspec_deprecation_warnings

Remove Rspec deprecation warning
…e_quotes_for_controllers

Use double quotes in controllers
…e_quotes_for_models

Use double quotes in models
The `maximize` method didn't work as we expected and didn't resize the
window, causing issues in tests expecting the window to be larger.
…apybara_window

Resize Capybara window back to its original size
aitbw and others added 25 commits August 21, 2020 12:42
Scope was fetching all comments for a commentable, regardless of their
status; this commit fixes it and now scope only retrieves non-offensive
comments, or comments that contain offensive words, but are deemed
non-offensive to the community

It also overrides commit cbb9ef1
- Remove "edit_comment" action created in the UserController.
- Add the action "edit" in CommentsController
You can only edit comments with offensive words and that have not been
moderated yet
Display two tags kind:
- Moderated (cannot be edited)
- Pending moderated (can be edited)
Include comment body to moderation emails
To facilitate the work of the moderators we replaced the "all" filter with the
 "pending" filter. This way the moderators will have in the pending tab only
 the pending offenses to moderate.
If the CSV we imported has been updated with new forbidden words, we
can now import it again and it will add the new words and discard the
existing ones without errors.
On the auto_moderated_content index page in the filter section:
- Declined: Add "declined_at" to existing text
- Confirmed: Add "confirmed_at" to existing text

The date format is: dd/mm/yyyy hh:mm:ss

We can use "comment.moderated_contents.first" in moderated_date(comment)
method because a comment may have more than one related moderated_content,  but all of them are updated at the same time with the same :declined_at or
confirmed_at.
Replace header :kind (always was Comment) to :source (Proposal, Debate or Process)
Change "Textos de Moderación" to  "Texto para moderación automática"
@taitus taitus force-pushed the feat/dictionary-from-stable-master branch from eb9e232 to 84af47e Compare August 21, 2020 10:43
@taitus taitus force-pushed the master branch 2 times, most recently from 25ba35f to df9b00f Compare February 15, 2023 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

7 participants