Page MenuHomePhabricator

Add a link: 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 are not actually any suggestions available when they arrive on the article. This can happen because another user has added all the links since the feed was refreshed, among other reasons.

In this case:

  • The user should see a simple error dialog.
  • It should say, "Suggestions are 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, or back to the homepage on desktop.
Instrumentation

See T278112: Instrumentation: dialog for no suggestions available for details.

Event Timeline

We should also log details of the error to the console, for easier debugging. And maybe send it to the Javscript error feed in logstash, although these are not necessarily errors in the programming sense so that's debatable.

Change 674141 had a related patch set uploaded (by Kosta Harlan; owner: Kosta Harlan):
[mediawiki/extensions/GrowthExperiments@master] Add a link: dialog for no suggestions available

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

We should also log details of the error to the console, for easier debugging. And maybe send it to the Javscript error feed in logstash, although these are not necessarily errors in the programming sense so that's debatable.

What details would you want to log? We currently have mw.log.error( suggestedEditSession.taskData.error ); which just tells us that we failed to get the task data.

Logging the error message should suffice. Knowing why the data could not be retrieved can be informative.

Change 674141 merged by jenkins-bot:
[mediawiki/extensions/GrowthExperiments@master] Add a link: dialog for no suggestions available

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

The back button is using router.back(), which doesn't do the expected thing when the page has been accessed via the task card in the post-edit dialog.

Etonkovidova moved this task from QA to Design Review on the Growth-Team (Current Sprint) board.

For @RHo review - as per the screenshots in @kostajh comment and my testing - all specs seem to be in place:

suggestions_not_available 2021-04-28 at 11.42.59 AM.png (716×1 px, 61 KB)

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

[mediawiki/extensions/GrowthExperiments@master] No suggestions dialog: Use more robust method to bring user back to Homepage

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

Change 683981 merged by jenkins-bot:

[mediawiki/extensions/GrowthExperiments@master] No suggestions dialog: Use more robust method to bring user back to Homepage

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

Super, thanks all