Page MenuHomePhabricator

Add an image: dialog for no suggestions available
Closed, ResolvedPublic

Description

This edge case is possible: a user chooses a suggested article from the feed, but then there is not actually any suggestions available when they arrive on the article, either because the article already has an image or because the suggested image is no longer available. This can happen because another user has added the image since the feed was refreshed, among other reasons.

In this case:

  • The user should see a simple error dialog.
  • It should say, "Suggestion no longer available on this article."
  • The button should say, "Back to suggested edits"
  • The button should go back to the suggested edits module on mobile (back to the homepage on desktop in future iterations).

This is similar to the dialog shown for the Add a link task in T277508.

Event Timeline

kostajh triaged this task as Medium priority.Sep 28 2021, 8:06 AM

(Please add project tags as project tags instead of subscribers. Thanks!)

Showing an error when all images are missing (and hiding missing images in case there are other suggestions) was already done by @mewoph in T290911: Add an image: show suggestion-specific content in image inspector .

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

[mediawiki/extensions/GrowthExperiments@master] Add Image: Add ImagePresenceCheckDecorator

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

Change 727015 abandoned by Gergő Tisza:

[mediawiki/extensions/GrowthExperiments@master] Add Image: Add ImagePresenceCheckDecorator

Reason:

On second thought this is not useful. It's common to use icons in templates, we need to ignore those and only detect images used directly in the article, and we can't do that with a ParserOutput.

It would have been nice to reuse the provider error mechanism, but this will have to be done on the client side.

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

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

[mediawiki/extensions/GrowthExperiments@master] Add Image: Show error dialog when article already has images

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

Change 734804 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Add Image: Show error dialog when article already has images

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

@Tgr - if I understood the spec correctly, it seems that the following is not yet done.

  • The button should go back to the suggested edits module on mobile (back to the homepage on desktop in future iterations).

Clicking the "Back to suggested edits" button brings a user to the Homepage, see the gif below:

returning_Homepage.gif (669×376 px, 655 KB)

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

[mediawiki/extensions/GrowthExperiments@master] Structured tasks: Fix no suggestion dialog link URL

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

Change 752366 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] Structured tasks: Fix no suggestion dialog link URL

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

Etonkovidova updated the task description. (Show Details)

Re-checked in testwiki wmf.18 - all specs are in place.

Note: - a page with unavailable image suggestions will (1) still attempt to load (2) still display the oboarding dialog