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:
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.