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
DEV: Normalize reviewable actions #122
Conversation
730328f
to
b6e7e16
Compare
@@ -4,4 +4,8 @@ | |||
|
|||
class ReviewableAkismetPostSerializer < ReviewableSerializer | |||
payload_attributes :post_cooked, :external_error | |||
|
|||
def created_from_flag? |
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.
The only use for this is to determine whether we display the context question:
Is this X Y?
I think it's not a stretch to say that Akismet is flagging posts. WDYT?
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.
created_from_flag
sounds weird? When are reviewables not created from flagging?
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.
There are some settings, IIRC. E.g. where new user first post needs review.
@@ -10,31 +10,24 @@ def self.action_aliases | |||
def build_actions(actions, guardian, _args) | |||
return [] unless pending? | |||
|
|||
agree = | |||
agree_bundle = |
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.
👍
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.
Looks ok
It's a bit sad (not your doing) that we didn't create a plugin API on this Akismet plugin itself to extend reviewables. Ideally this plugin should not have knowledge of post voting.
@@ -46,8 +46,11 @@ en: | |||
types: | |||
reviewable_akismet_post: | |||
title: "Akismet Flagged Post" | |||
noun: "post" |
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.
Curious, where is noun
used?
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.
It is used to construct the context question, e.g.:
Is this post spam?
What is this change?
Several pieces of feedback suggests that the review actions for posts flagged by Akismet are confusing. Since there is conceptually little difference between a post marked as spam by a human and a computer, this PR brings the options more in line with what we have for posts marked as spam in core.
Before
After