forked from consuldemocracy/consuldemocracy
-
Notifications
You must be signed in to change notification settings - Fork 0
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
taitus
wants to merge
9,364
commits into
master
Choose a base branch
from
feat/dictionary-from-stable-master
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
…users Users menu
Improve help texts on Admin UI
…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
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.
Improve locales.
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
force-pushed
the
feat/dictionary-from-stable-master
branch
from
August 21, 2020 10:43
eb9e232
to
84af47e
Compare
taitus
force-pushed
the
master
branch
2 times, most recently
from
February 15, 2023 17:00
25ba35f
to
df9b00f
Compare
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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 underUsers#show
, where the comment can be seen along with aModerated
tagThe 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:
Comments section (with offensive comments) after reload:
Comments
tab underUsers#show
when a comment is offensive:View when editing an offensive comment:
Comments
tab underUsers#show
after an offensive comment is corrected:Comments
tab underUsers#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):Admin panel for moderated words:
Admin panel for moderated words when a word has related offenses:
Admin panel for actions that can be taken upon offenses:
Admin panel when offenses have been moderated:
Comments
tab underUsers#show
when an comment is deemed as non-offensive by an admin: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