Page MenuHomePhabricator

Add an image: minimal quality gate
Closed, ResolvedPublic

Description

In T290788, we discussed several options for implementing quality gates. This task specifies the minimal one we want to do for Iteration 1 of "add an image".

    • Users may not open a 26th suggestion after having submitted "yes" or "no" responses on 25 suggestions in that day.**
  • Though both "yes" and "no" count, "skip" does not.
  • The "day" period should be defined as midnight-to-midnight in the user's timezone as defined by their user preferences. After midnight, it resets.

The user will encounter this limit in two places:
Note: Final copy updated below - see relevant tab for corresponding QQQ in the copy spreadsheet:

  • Post-edit dialog (T290789: Add an image: post-edit dialog)
    • After the user completes their 25th suggestion by accepting or rejecting the image and submitting, the messaging in their post-edit dialog is different.
    • Banner
      • Whether they accepted or rejected the 25th suggestion: You have completed all of today's image suggestions. Thank you!
    • Bottom sheet
      • Header (to be displayed whether or not more tasks are available): More ways to edit
      • Paragraph (to be displayed whether or not more tasks are available): Try another type of task or come back tomorrow for more image suggestions.
      • If the user has other tasks available in their feed that are not image tasks, show the first of the non-image suggestion edits in their feed. The refresh button should cycle amongst those non-image tasks.
      • If the user does not have other tasks available in their feed that are not image tasks, then we should fall back to other task types using this logic: choose any other task type, as long as it matches the user's currently selected topics.
      • If there are no other tasks of any sort available, there should not be a suggestion. There should still be the header and paragraph described above, followed directly by the two buttons. This is roughly similar to the current state for if no more suggestions are available.
      • The buttons are the same as for "add a link": "View more suggested edits" and "Close and edit this article again", or "Close" if the user rejected the image.
  • Suggested edits feed
    • When the user is navigating their suggested edits feed, tasks should be present according to their filters as usual.
    • If they have done 25 or more image suggestions that day, when they tap on an image card, they should see a dialog that says, You have completed all of today's image suggestions.[paragraph break] Adjust your difficulty levels to see other types of edits or come back tomorrow for more image suggestions. The dialog should have one button: Got it.

We know these specification are somewhat leaky, and that users might be able to do more than 25 image suggestions a day by opening many in multiple tabs or by changing their timezone around. These are described in more detail in T290788: Add an image: quality gates and we accept these leaks for Iteration 1.

Mockups as of 2021-10-14:

After the user completes their 25th task (figma here):

image.png (1×546 px, 220 KB)

When a user selects an "add an image" task after they've hit their limit (figma here):

image.png (1×738 px, 167 KB)

Event Timeline

@RHo @Tgr @kostajh -- I created this task to define the minimal quality gate for Iteration 1. I have some questions:

  • For the post-edit dialog, I said that if the user does not have any non-image tasks in their feed, then we shouldn't offer a suggestion in their post-edit dialog. I did that because it's my understanding that for the dialog, we're pulling the next suggestion out of their cached feed. If their cache only has image tasks in it, there would be nothing to pull. @Tgr @kostajh -- do you see a simple way to go get some other task instead -- any other task? Without forcibly changing their filters for them?
  • @RHo -- in your mockups for this experience, you only have one button at the bottom: "View more suggested edits". But the standard experience also has the "Close and edit this article again" or "Close" button. Is that deliberate? Or should this also have both buttons (like I have in the task description now)?
  • @RHo -- could you please make a design for the dialog that appears in the suggested edits feed when the user taps an image task?

@RHo @Tgr @kostajh -- I created this task to define the minimal quality gate for Iteration 1. I have some questions:

  • For the post-edit dialog, I said that if the user does not have any non-image tasks in their feed, then we shouldn't offer a suggestion in their post-edit dialog. I did that because it's my understanding that for the dialog, we're pulling the next suggestion out of their cached feed. If their cache only has image tasks in it, there would be nothing to pull. @Tgr @kostajh -- do you see a simple way to go get some other task instead -- any other task? Without forcibly changing their filters for them?
  • @RHo -- in your mockups for this experience, you only have one button at the bottom: "View more suggested edits". But the standard experience also has the "Close and edit this article again" or "Close" button. Is that deliberate? Or should this also have both buttons (like I have in the task description now)?

I'd wanted to both simplify it because the new message is long, and as an extra nudge to move on to the next task. But for the sake of simplicity we can keep the second "Close" button. I'll add back in.

  • @RHo -- could you please make a design for the dialog that appears in the suggested edits feed when the user taps an image task?

Yes, this was created here: https://www.figma.com/file/ULhJr1isDstRbGE5vjYDsr/Add-images-structured-task?node-id=3274%3A14654

image.png (1×632 px, 105 KB)

  • For the post-edit dialog, I said that if the user does not have any non-image tasks in their feed, then we shouldn't offer a suggestion in their post-edit dialog. I did that because it's my understanding that for the dialog, we're pulling the next suggestion out of their cached feed. If their cache only has image tasks in it, there would be nothing to pull. @Tgr @kostajh -- do you see a simple way to go get some other task instead -- any other task? Without forcibly changing their filters for them?

Yes, although it would make the post-edit dialog slower to show up in that case (we'd have to make a second, uncached query if the first has no results).

Change 732313 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] ImageRecommendation: Add maxTasksPerDay setting

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

Change 732314 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] Add ImageRecommendationSubmissionLog for querying tasks done per day

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

Change 732634 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] Quality gate: Prevent new image suggestion tasks from homepage

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

Change 732313 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] ImageRecommendation: Add maxTasksPerDay setting

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

Change 732984 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] PostEdit Dialog: Don't show image tasks if over daily limit

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

  • For the post-edit dialog, I said that if the user does not have any non-image tasks in their feed, then we shouldn't offer a suggestion in their post-edit dialog. I did that because it's my understanding that for the dialog, we're pulling the next suggestion out of their cached feed. If their cache only has image tasks in it, there would be nothing to pull. @Tgr @kostajh -- do you see a simple way to go get some other task instead -- any other task? Without forcibly changing their filters for them?

Yes, although it would make the post-edit dialog slower to show up in that case (we'd have to make a second, uncached query if the first has no results).

@Tgr -- this is definitely preferable than the user having no next task. But I only think we should do it if its trivial (and if it's not so slow that we would need to design and build for the waiting period while it loads). What do you think?

What would be the exact logic? Same set of topics but all task types?
The speed would largely depend on how many topics they have selected.

@Tgr -- yes, that's the logic. One day, we'll be wanting to use more deliberate logic that "steps the user up" to an appropriate next task type, but we haven't thought that through sufficiently, plus not all wikis have each task type. Does the post-edit dialog already have any kind of loading animation? If not, would it just sit there being blank for a second or two while the task loads?

@RHo the existing post edit dialog has a semicolon at the end of the title, but the proposed title in the mockup here ("Try another type of edit") does not . For consistency, do you want "Try another type of edit" to have a semicolon like the existing post edit dialog title, or should we remove the semicolon from the current title?

image.png (556×1 px, 62 KB)

Change 735054 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] [WIP] PostEditDialog: Customize text when daily limit exceeded

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

@RHo the existing post edit dialog has a semicolon at the end of the title, but the proposed title in the mockup here ("Try another type of edit") does not . For consistency, do you want "Try another type of edit" to have a semicolon like the existing post edit dialog title, or should we remove the semicolon from the current title?

image.png (556×1 px, 62 KB)

I think it's fine to keep the colon in the existence the post-edit dialog since the suggested article card is directly after that title, whereas this one there is am explanation blurb.

@RHo the existing post edit dialog has a semicolon at the end of the title, but the proposed title in the mockup here ("Try another type of edit") does not . For consistency, do you want "Try another type of edit" to have a semicolon like the existing post edit dialog title, or should we remove the semicolon from the current title?

image.png (556×1 px, 62 KB)

I think it's fine to keep the colon in the existence the post-edit dialog since the suggested article card is directly after that title, whereas this one there is am explanation blurb.

Sounds good, thanks for clarifying!

Change 735677 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] QualityGate: Reorganize quality gate data flow

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

Change 732634 abandoned by Kosta Harlan:

[mediawiki/extensions/GrowthExperiments@master] Quality gate: Prevent new image suggestion tasks from homepage

Reason:

squashed into I063763f1ec359b1e974e62b1d74ab58de7c3bfcc

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

Change 735054 abandoned by Kosta Harlan:

[mediawiki/extensions/GrowthExperiments@master] PostEditDialog: Customize appearance when daily limit exceeded

Reason:

squashed into I063763f1ec359b1e974e62b1d74ab58de7c3bfcc

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

Change 735677 abandoned by Kosta Harlan:

[mediawiki/extensions/GrowthExperiments@master] QualityGate: Reorganize quality gate data flow

Reason:

squashed into I063763f1ec359b1e974e62b1d74ab58de7c3bfcc

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

@Tgr -- yes, that's the logic. One day, we'll be wanting to use more deliberate logic that "steps the user up" to an appropriate next task type, but we haven't thought that through sufficiently, plus not all wikis have each task type. Does the post-edit dialog already have any kind of loading animation? If not, would it just sit there being blank for a second or two while the task loads?

@kostajh -- I wanted to return to this question. I think it's the last unfinalized thing in this task's specifications. What do you think?

@Tgr -- yes, that's the logic. One day, we'll be wanting to use more deliberate logic that "steps the user up" to an appropriate next task type, but we haven't thought that through sufficiently, plus not all wikis have each task type. Does the post-edit dialog already have any kind of loading animation? If not, would it just sit there being blank for a second or two while the task loads?

@kostajh -- I wanted to return to this question. I think it's the last unfinalized thing in this task's specifications. What do you think?

For now, I would propose we not do anything. An uncached query with 8 topics will take about 500ms (most users won't have 8+ topics). I don't think most or any users would notice the delay. If there is time before release, we could think about opening the drawer with skeleton animation elements before actual data is available, but I think that should be a separate task.

Currently the drawer just won't open until the tasks are loaded, there is no blank state.

@kostajh @Tgr -- when you say that you propose we not do anything, are you saying that we should (a) not fall back to other task types if the user has only selected image tasks, or (b) that we should fall back to other task types, but not do anything around the loading state.

If you think it's a good idea to fall back to other task types, then the logic would be "all task types, but same set of topics".

Let me know what you recommend and I'll update the task description (or leave it unchanged) accordingly.

when you say that you propose we not do anything, are you saying that we should (a) not fall back to other task types if the user has only selected image tasks, or (b) that we should fall back to other task types, but not do anything around the loading state.

b) - fall back to other task types, but don't make any changes around loading state right now.

when you say that you propose we not do anything, are you saying that we should (a) not fall back to other task types if the user has only selected image tasks, or (b) that we should fall back to other task types, but not do anything around the loading state.

b) - fall back to other task types, but don't make any changes around loading state right now.

Thanks @kostajh for noticing the lag and the suggestion to create a skeleton/loading state for future iteration. I filed T294835: Positive reinforcement: Revise skeleton state and behaviour of the Post-edit dialog.

Change 736244 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] selenium: Browser test for alert dialog

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

when you say that you propose we not do anything, are you saying that we should (a) not fall back to other task types if the user has only selected image tasks, or (b) that we should fall back to other task types, but not do anything around the loading state.

b) - fall back to other task types, but don't make any changes around loading state right now.

Thanks, @kostajh. I updated the task description with this fallback behavior.

Change 732314 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add ImageRecommendationSubmissionLog for querying tasks done per day

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

Change 732984 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Quality gate: Daily limit for image recommendations

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

For @RHo review - the testing for fallback has not yet done, but I want you to take a look at the following:

(1)

  • Bottom sheet
    • Header (to be displayed whether or not more tasks are available): More ways to edit

I see in Add an image It.1 - copy doc spreadsheet, but I don't see it in the UI:

Quality gate - Image post-edit dialog next suggestionFinalQuantity gate - Image post-edit dialog next suggestion headerTry another type of editMore ways to edit

(2) For review

Quality gate - No more images dialog message
betalabs
Screen Shot 2021-11-09 at 3.27.26 PM.png (1×716 px, 100 KB)
mockup
image.png (1×738 px, 167 KB)
Quality gate - Post edit accepted thanks
betalabs - 25 limit is reached; the last task was "image accepted"; no more "Add image" tasks are available
Screen Shot 2021-11-09 at 4.23.35 PM.png (820×421 px, 100 KB)

For @RHo review - the testing for fallback has not yet done, but I want you to take a look at the following:
(1)

  • Bottom sheet
    • Header (to be displayed whether or not more tasks are available): More ways to edit

I see in Add an image It.1 - copy doc spreadsheet, but I don't see it in the UI:

Quantity gate - Image post-edit dialog next suggestionFinalQuantity gate - Image post-edit dialog next suggestion headerTry another type of editMore ways to edit

Hiya, yes this header "More ways to edit" should be on the post-edit dialog showing a different edit task type. It should be shown when the add image quality gate is reached on the 25th edit, where there is another task type (eg Add a link) matching the topic filters available.

image.png (1×720 px, 129 KB)

(2) For review

Quantity gate - No more images dialog message
betalabs
Screen Shot 2021-11-09 at 3.27.26 PM.png (1×716 px, 100 KB)
mockup
image.png (1×738 px, 167 KB)

hi @kostajh - can you please add a paragraph break before Adjust...? Thanks!

Quantity gate - Post edit accepted thanks
betalabs - 25 limit is reached; the last task was "image accepted"; no more "Add image" tasks are available
Screen Shot 2021-11-09 at 4.23.35 PM.png (820×421 px, 100 KB)

This looks fine for the case that there are no other types of tasks matching the topic filters available, but per above, we would want to test for that separate scenario as well.

Change 737933 had a related patch set uploaded (by Kosta Harlan; author: Kosta Harlan):

[mediawiki/extensions/GrowthExperiments@master] Add paragraph break in daily task limit exceeded message

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

@RHo - following your comment above, I did more testing, please review the table below for completeness and matching the specs:

Quality gate testing

  • a user has ONLY Add image tasks in their feed
User answers all "yes" and reaches a quality gate
Screen Shot 2021-11-12 at 4.08.35 PM.png (321×338 px, 42 KB)
User answers all "no" and reaches a quality gate
Screen Shot 2021-11-12 at 5.48.39 PM.png (530×786 px, 68 KB)
User skips all add image suggestions Quality gate is not applicable
User answers mixed "yes"/"no"/"skip" and reaches a quality gate
Screen Shot 2021-11-12 at 5.48.39 PM.png (530×786 px, 68 KB)
  • a user has Add image AND other tasks in their feed (the tasks that are still available)
User reaches quality gate with Add image AND has other tasks (that are still available)
Screen Shot 2021-11-12 at 5.47.34 PM.png (846×706 px, 91 KB)
  • a user has Add image AND other tasks in their feed - the other tasks are NOT available - cannot be tested in betalabs: presently the completed tasks are not deleted from the a user feed, so the same articles get suggested again.

Thanks @Etonkovidova - I've filed T295878: Structured tasks: Post-edit message widget uses Success style only when an edit is made, else use the Notice style to fix a minor styling aspect of the post-edit dialog. Other than that, I have a question for @MMiller_WMF and/or @kostajh around the first scenario below.

@RHo - following your comment above, I did more testing, please review the table below for completeness and matching the specs:
Quality gate testing

  • a user has ONLY Add image tasks in their feed
User answers all "yes" and reaches a quality gate
Screen Shot 2021-11-12 at 4.08.35 PM.png (321×338 px, 42 KB)
User answers all "no" and reaches a quality gate
Screen Shot 2021-11-12 at 5.48.39 PM.png (530×786 px, 68 KB)
User skips all add image suggestions Quality gate is not applicable
User answers mixed "yes"/"no"/"skip" and reaches a quality gate
Screen Shot 2021-11-12 at 5.48.39 PM.png (530×786 px, 68 KB)

@MMiller_WMF and @kostajh - Based on my reading of the requirement of the task description (4th bullet point in Bottom sheet) "If the user does not have other tasks available in their feed that are not image tasks, then we should fall back to other task types using this logic: choose any other task type, as long as it matches the user's currently selected topics." - shouldn't there be another task type selected instead of the user seeing nothing? Else, if this is descoped from the initial release, should we create a separate task to follow up?

  • a user has Add image AND other tasks in their feed (the tasks that are still available)
User reaches quality gate with Add image AND has other tasks (that are still available)
Screen Shot 2021-11-12 at 5.47.34 PM.png (846×706 px, 91 KB)
  • a user has Add image AND other tasks in their feed - the other tasks are NOT available - cannot be tested in betalabs: presently the completed tasks are not deleted from the a user feed, so the same articles get suggested again.

Change 737933 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add paragraph break in daily task limit exceeded message

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

Etonkovidova updated the task description. (Show Details)

Change 736244 abandoned by Kosta Harlan:

[mediawiki/extensions/GrowthExperiments@master] selenium: Browser test for mobile only alert dialog

Reason:

We since implemented image suggestions for desktop, so this test no longer adds value. The refactoring here to support testing different quality gate configurations might be useful, but not pursuing it at the moment.

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