Page MenuHomePhabricator

Add Image: Backend handling of user acceptance/rejection of image recommendations
Closed, ResolvedPublic

Description

Add backend code for processing and storing image recommendation user feedback submitted via the VisualEditor API's plugin mechanism.

  • Create an image recommendation submission handler service, similar to the AddLinkSubmissionHandler and LinkSubmissionRecorder classes (there probably wasn't much point in those two being separate classes), maybe with a shared SubmissionHandler interface. (See also T289217: Add Image: Handle differences in invalidation logic.)
  • Declare the new Special:Log event subtype to use for recording image recommendations. The i18n messages should be placeholders for now.
  • Add some mechanism to the VisualEditorApiVisualEditorEditPostSave hook handler to select the appropriate submission handler based on the plugin data.
  • Invalidate items in the search index when suggestions are accepted or rejected

(Similar Add Link tasks: T266446, T269657)


This is pending further discussion and might not be needed:

  • Create a growthexperiments_image_submission table, similar to the existing growthexperiments_link_submission table, but with the appropriate data fields instead of offset/length/target/feedback, and a DAO class for interacting with the table.

Event Timeline

Tgr updated the task description. (Show Details)
kostajh triaged this task as Medium priority.Aug 25 2021, 11:36 AM

The main reason to have a growthexperiments_link_submission table was to be able to avoid recommending links which have been rejected multiple times. Since Add Image iteration 1 is a one-shot (each wiki article will be presented for image suggestions to a single user and a single time only), this won't be an issue, so I'll remove that part of the task for now. We might decide later that we still want a DB table for data collection, or we might put it into a later iteration.

Change 716108 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] Add growthexperiments_image_submissions table

https://gerrit.wikimedia.org/r/716108

Change 716108 abandoned by Gergő Tisza:

[mediawiki/extensions/GrowthExperiments@master] Add growthexperiments_image_submissions table

Reason:

per T289024#7327286

https://gerrit.wikimedia.org/r/716108

Tgr renamed this task from Add Image: Store data about user acceptance/rejection of image recommendations to Add Image: Backend handling of user acceptance/rejection of image recommendations.Sep 2 2021, 6:41 AM

Change 717122 had a related patch set uploaded (by Gergő Tisza; author: Gergő Tisza):

[mediawiki/extensions/GrowthExperiments@master] [WIP] Add Image: Handle submission

https://gerrit.wikimedia.org/r/717122

Change 717122 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add Image: Handle submission

https://gerrit.wikimedia.org/r/717122

kostajh moved this task from Code Review to QA on the Growth-Team (Sprint 0 (Growth Team)) board.

I don't think there is anything to QA here just yet, but once the feature is enabled in testwiki / betalabs, it would be possible.

@MMiller_WMF the current behavior is that images that are accepted or rejected (but not skipped) are removed from the task queue forever (well, until some future iteration of Add Image, presumably). IIRC we talked about that, but haven't written it down anywhere, so just double-checking that that's the expected behavior.

@Tgr -- yes, that is the correct behavior. Thank you!

Etonkovidova closed this task as Resolved.EditedNov 5 2021, 6:42 PM
Etonkovidova subscribed.

@MMiller_WMF the current behavior is that images that are accepted or rejected (but not skipped) are removed from the task queue forever (well, until some future iteration of Add Image, presumably). IIRC we talked about that, but haven't written it down anywhere, so just double-checking that that's the expected behavior.

Just a clarification - the decision was made that images after rejection are not removed - implemented in https://gerrit.wikimedia.org/r/c/mediawiki/extensions/GrowthExperiments/+/730678/