Page MenuHomePhabricator

Change copy on empty preview
Closed, ResolvedPublic3 Estimated Story Points

Description

Background

After discussing the best way to handle previews when we have an error T182905: Show an informative preview when the backend service responds with an error, we decided the best option would be to change the copy on the original empty preview to handle all cases

empty preview:

Screen Shot 2017-12-19 at 6.23.33 PM.png (218×722 px, 55 KB)

Acceptance criteria

  • Change copy of empty preview to "There was an issue displaying this preview", link: change from "read" to "Go to this page", selecting link should navigate to the page
  • Ensure preview appears for all cases including when backend service responds with an error, i.e. the server responds with an HTTP 5xx code.

Testing instructions

  • Staging has been set up to load content from production and for Popups to use RESTBase [1]. When visiting a page in desktop and hovering over a preview you should see the old failure popup. The link in the popup will always link to Tracy Island. Ask a developer to update staging with the patches inside this task.
  • When the patches are live, you'll notice that the copy has changed and the link now points to the page relating to the link NOT the current page Tracy Island.
  • Ask a developer [2] to introduce a fatal error so that a 500 is triggered on a hover. Ensure the preview shows for this too.

Developer notes

[1] Config being used is:

$wgMFAlwaysUseMobileFormatter = true;
$wgPopupsGateway = "restbaseHTML";

[2] https://gerrit.wikimedia.org/r/#/c/403722/5 has some good instructions on how to simulate errors.

Event Timeline

ovasileva updated the task description. (Show Details)
ovasileva updated the task description. (Show Details)
ovasileva set the point value for this task to 3.Dec 19 2017, 5:29 PM

We estimated this task a 3 because this looks like a copy change but will require that QA be able to set up an environment where the Page Previews client thinks that RESTBase is responding with HTTP 4xx, 5xx, and garbage responses.

We discussed possible approaches with @ABorbaWMF and they seemed happy with any/all of them.

@phuedx Yes, and I mentioned using staging in the meeting and we talked about using Fiddler or something similar, but I just realized we could probably run something on the beta cluster as well.

Change 403580 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[mediawiki/extensions/Popups@master] Fix: preview page URL for 404 RESTBase responses

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

Change 403683 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[mediawiki/extensions/Popups@master] Update: missing preview copy

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

Change 403684 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[mediawiki/extensions/Popups@master] Hygiene: add more fetch failure test cases

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

Change 403722 had a related patch set uploaded (by Niedzielski; owner: Sniedzielski):
[mediawiki/extensions/Popups@master] Update: show placeholder preview for more failures

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

These changes all look sound, but my Popups is a little rusty so I'd appreciate a second glance. @Jhernandez maybe?

Change 403580 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Fix: preview page URL for 404 RESTBase responses

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

Jdlrobson updated the task description. (Show Details)
Jdlrobson added a subscriber: Niedzielski.

Over to you @ABorbaWMF . Note that to test this, you'll need to seek help from a developer.

Change 403683 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Update: missing preview copy

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

Change 403684 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Hygiene: add more fetch failure test cases

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

Change 403722 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Update: show placeholder preview for more failures

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

This looks good to me on Staging

Screen Shot 2018-02-16 at 5.28.36 PM.png (1×2 px, 1 MB)

Screen Shot 2018-02-16 at 5.28.26 PM.png (1×2 px, 1 MB)

Screen Shot 2018-02-16 at 5.29.27 PM.png (1×2 px, 1 MB)

Screen Shot 2018-02-16 at 5.29.33 PM.png (1×2 px, 1 MB)

More browsers/OSs

image.png (768×1 px, 227 KB)
image.png (768×1 px, 224 KB)
image.png (768×1 px, 200 KB)
image.png (768×1 px, 199 KB)
image.png (768×1 px, 404 KB)
image.png (768×1 px, 396 KB)
image.png (768×1 px, 405 KB)
image.png (768×1 px, 402 KB)