T165017 introduces a new endpoint that returns HTML. It should be possible for page previews to consume this new API.
- On reading web staging when I hover over a link I see a text extract in HTML as provided by the new summay endpoint.
- It is configurable and in production we continue to use the plain text mode for our previews.
- Ensure the following pages are testable on the beta cluster:
- https://ar.wikipedia.org/wiki/%D8%AE%D9%84%D8%A7%D9%81%D8%A9_%D8%A5%D8%B3%D9%84%D8%A7%D9%85%D9%8A%D8%A9 (rtl scripts)
- https://en.wikipedia.org/wiki/Lie_group (mathematical expressions, hover on "lie algebra"), https://en.wikipedia.org/wiki/Lie_algebra
- https://en.wikipedia.org/wiki/Earth (lists, hover on "planet"), https://en.wikipedia.org/wiki/Planet
- https://en.wikipedia.org/wiki/Berlin (parentheticals, hover on "Germany", https://en.wikipedia.org/wiki/Germany
- https://en.wikipedia.org/wiki/Alejandro_Gonz%C3%A1lez_I%C3%B1%C3%A1rritu (parantheticals, hover on "birdman"), https://en.wikipedia.org/wiki/Birdman_(film)
- https://en.wikipedia.org/wiki/List_of_bands_from_Finland, https://en.wikipedia.org/wiki/Marko_Saaresto (lists, hover on "list of bands from finland)
@ABorbaWMF (or whoever) make sure you refer to T165018#3354869 before submitting any new bug reports as they may have already been written up. This task is about bug discovery and not fixing them all at once, which'll require larger architectural changes.
- Deploy https://gerrit.wikimedia.org/r/#/c/358415/ after the MediaWiki train deployment on Thursday, 22nd June.
- This can be done on Monday, 26th June.
- This'll require a new gateway as we'll want to test this in isolation. The wgPopupsAPIUseRESTBase configuration variable controls whether or not to consume the RESTBase Page Summary API. Perhaps this configuration variable needs revisiting, e.g. it could be superseded by a variable that can have the values "mediawiki", "restbase", and "restbase-experimental"?
- Alternatively the endpoint can be configurable e.g. wgPopupsApiRESTBaseEndpoint and the new endpoint can simply be used with wgPopupsAPIUseRESTBase
- Currently the renderer does additional processing on the plain text extract that it gets from the preview model (see ext.popups.renderer#renderExtract), this could be extracted to the preview model, i.e. ext.popups.PreviewModel#getHtml. The new gateway could return a specialised instance of ext.popups.PreviewModel.