Page MenuHomePhabricator

Show HTML summaries on all wikis
Closed, ResolvedPublic2 Estimated Story Points

Description

Background

Prior to deploying page previews to all wikis, we would like to switch to the new summary endpoint so that all users will be able to see html previews

Pre-task checklist

  • Ensure all subtasks are closed before picking up this task.

Acceptance criteria

  • Switch all projects to new summary endpoint
  • Perform a full round of QA on feature
  • Announce switch (village pumps, wikitech-l)
  • Add the deployment to the Readers Web Release Timeline page.

QA

Related Objects

StatusSubtypeAssignedTask
ResolvedDereckson
ResolvedJdlrobson
Resolvedovasileva
Resolvedovasileva
ResolvedABorbaWMF
Resolved mobrovac
ResolvedABorbaWMF
ResolvedABorbaWMF
Resolved Mholloway
Resolved Mholloway
Resolved Mholloway
Resolvedovasileva
Resolved bearND
ResolvedMSantos
DeclinedNone
OpenNone
OpenNone

Event Timeline

ovasileva triaged this task as Medium priority.Dec 7 2017, 1:08 PM
ovasileva created this task.
phuedx renamed this task from Switch all projects to new summary endpoint to Show HTML summaries on all wikis.Dec 8 2017, 5:28 PM
ovasileva raised the priority of this task from Medium to High.Feb 21 2018, 4:06 PM

Change 414751 had a related patch set uploaded (by Pmiazga; owner: Pmiazga):
[operations/mediawiki-config@master] Enable HTML Previews on all wikipedias

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

Requires SWAT deploy. I added this task to mid-day European SWAT on Feb 28th

Change 414751 merged by jenkins-bot:
[operations/mediawiki-config@master] Enable HTML Previews on all wikipedias

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

Mentioned in SAL (#wikimedia-operations) [2018-02-28T14:32:45Z] <zfilipin@tin> Synchronized wmf-config/InitialiseSettings.php: SWAT: [[gerrit:414751|Enable HTML Previews on all wikipedias (T182319)]] (duration: 00m 57s)

Page https://ar.wikipedia.org/wiki/%D8%B1%D9%8A%D8%A7%D8%B6%D9%8A%D8%A7%D8%AA:

المبرهنة الأساسية في الجبر

math_arabic.png (443×734 px, 64 KB)

الاستمثال

math_arabic2.png (443×734 px, 104 KB)

عدد بي

math_arabic2.png (443×734 px, 59 KB)

now live. here's some initial bugs/concerns:

multiple previews with cutoff text on arwiki (I will be opening a bug for this)

  1. Go to https://ar.wikipedia.org/wiki/%D9%87%D9%86%D8%AF%D8%B3%D8%A9_%D8%B1%D9%8A%D8%A7%D8%B6%D9%8A%D8%A9
  2. Hover over والمساحات

Observed - text is cutoff

Screen Shot 2018-02-28 at 3.38.53 PM.png (482×371 px, 88 KB)

Note: seeing this in many other places on arwiki:

Screen Shot 2018-02-28 at 3.27.50 PM.png (460×430 px, 61 KB)

Screen Shot 2018-02-28 at 3.26.27 PM.png (470×401 px, 68 KB)

Screen Shot 2018-02-28 at 3.40.57 PM.png (466×410 px, 97 KB)

Formulas not always rendered

  1. Go to https://en.wikipedia.org/wiki/Invertible_matrix
  2. Hover over Linear Algebra

Screen Shot 2018-02-28 at 3.53.31 PM.png (495×431 px, 118 KB)

Could replicate across a few wikis:
Screen Shot 2018-02-28 at 3.19.02 PM.png (326×437 px, 109 KB)

Screen Shot 2018-02-28 at 3.26.57 PM.png (257×376 px, 60 KB)

@ovasileva that thumbnail is still appearing on arwiki because its summary is still on 1.3.0. Once the page gets modified or purged it should be rerendered with the latest. I have not pushed yet to get all pages on all wikis to the latest version because the client side thumbnail fix should land with the train today IIUC.

About the formulas not always rendered:
Would you post the links to the articles you used on the other wikis than en so I can check them out? It could be that not all summaries have been forced to the latest version yet.

The enwiki Linear algebra preview looks good in my browser (tested Chrome and FF):

Screen Shot 2018-02-28 at 9.06.57 AM.png (513×385 px, 98 KB)

Maybe a (browser) cache issue? https://en.wikipedia.org/api/rest_v1/page/summary/Linear_algebra returns an extract_html with the <img> tag for me:

<p><b>Linear algebra</b> is the branch of mathematics concerning linear equations such as</p><dl><dd><span class="mwe-math-element"><img src="https://wikimedia.org/api/rest_v1/media/math/render/svg/f4f0f2986d54c01f3bccf464d266dfac923c80f3" class="mwe-math-fallback-image-inline" aria-hidden="true" style="vertical-align:-0.671ex;width:22.811ex;height:2.509ex;" /></span></dd></dl>

So far I have been able to reproduce the text cutoff on arwiki across a few browsers:

image.png (768×1 px, 286 KB)
Screen Shot 2018-02-28 at 9.34.39 AM.png (928×758 px, 407 KB)

I have not been able to reproduce the enwiki issue with linear algebra. But I have seen problems on hewiki for the same article

image.png (768×1 px, 320 KB)
Screen Shot 2018-02-28 at 10.00.55 AM.png (1×2 px, 1 MB)

But I did see some problems on eswiki with math https://es.wikipedia.org/wiki/Matriz_invertible

Screen Shot 2018-02-28 at 9.49.35 AM.png (1×2 px, 1 MB)
Screen Shot 2018-02-28 at 9.49.25 AM.png (1×2 px, 1 MB)

And similar problems on ruwiki https://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D1%82%D0%BE%D0%B4_%D0%93%D0%B0%D1%83%D1%81%D1%81%D0%B0

Screen Shot 2018-02-28 at 9.56.07 AM.png (1×2 px, 1 MB)
Screen Shot 2018-02-28 at 9.58.02 AM.png (1×2 px, 1 MB)

Maybe a (browser) cache issue? https://en.wikipedia.org/api/rest_v1/page/summary/Linear_algebra returns an extract_html with the <img> tag for me:

These are all caching issues. I purged the Linear Algebra article shortly after seeing this bug report.

Page https://ar.wikipedia.org/wiki/%D8%B1%D9%8A%D8%A7%D8%B6%D9%8A%D8%A7%D8%AA:

Also caching...

But I did see some problems on eswiki with math https://es.wikipedia.org/wiki/Matriz_invertible

This was a caching problem. I purged the target page and now this is showing correctly.

Screen Shot 2018-02-28 at 10.42.05 AM.png (265×416 px, 44 KB)

And similar problems on ruwiki https://ru.wikipedia.org/wiki/%D0%9C%D0%B5%D1%82%D0%BE%D0%B4_%D0%93%D0%B0%D1%83%D1%81%D1%81%D0%B0

Also caching fixed by a purge.

Screen Shot 2018-02-28 at 10.43.35 AM.png (279×444 px, 84 KB)

Please ignore any issues like this in QA from now on. I think we can safely attribute them to old outdated copies of the HTML.

When you encounter issues like this note what Spec version the summary for the target page page is at. You can check with something like:

curl -sI "https://ar.wikipedia.org/api/rest_v1/page/summary/%D8%B1%D9%8A%D8%A7%D8%B6%D9%8A%D8%A7%D8%AA" | grep Spec
content-type: application/json; charset=utf-8; profile="https://www.mediawiki.org/wiki/Specs/Summary/1.3.0"

If this still shows 1.2.0 then that explains why we would see the math markup.

FWIW, the 1.3.1 would fix the thumbnail issue server side, 1.3.2 would fix most chemical formulas. There is still one outstanding issue with more complex chemical formulas.

ar wikipedia changes line-height to 1.6em for their script.

We have a max-height property on popups set to 140px

because of 1.6em line height, 140px is not the correct max height, it should be 130px for ar wikipedia.

for any wikipedia that basically touches line height of their content should adjust the max-height of popups

.mwe-popups.mwe-popups-is-not-tall .mwe-popups-extract {max-height:130px;}
if you add above rule in local css, it fixes the issue

I don't know how we going to deal with custom line-heights per wiki in a systematic way but we should document this

Change 414861 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Introduce View.prototype.parseHTML Always use local jQuery where possible

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

Sorry bout the above spam ^

ar wikipedia changes line-height to 1.6em for their script.
for any wikipedia that basically touches line height of their content should adjust the max-height of popups

Fixed:https://ar.wikipedia.org/w/index.php?title=%D9%85%D9%8A%D8%AF%D9%8A%D8%A7%D9%88%D9%8A%D9%83%D9%8A%3ACommon.css&type=revision&diff=27560800&oldid=27457556

for any wikipedia that basically touches line height of their content should adjust the max-height of popups

How are you going to deal with summaries of pages like this one:

Screen Shot 2018-02-28 at 9.12.02 PM.png (257×585 px, 77 KB)

The line height here is rather -- variable.

The line height here is rather -- variable.

the line-height is actually the same, if you look at computed line-height and compare with any other text on that wikipedia. the fading will work properly as long as we match the max-height to the line-height if line-height is custom.

Thank you @Jdlrobson for adding that css! the issue looks fixed to me as well.

Never mind. Looks ok from my sandbox on arwiki:

Screen Shot 2018-02-28 at 10.48.05 PM.png (254×433 px, 46 KB)

The earlier screenshot was from the comparison report, which doesn't have any prod CSS.

Sorry bout the above spam ^

ar wikipedia changes line-height to 1.6em for their script.
for any wikipedia that basically touches line height of their content should adjust the max-height of popups

Fixed:https://ar.wikipedia.org/w/index.php?title=%D9%85%D9%8A%D8%AF%D9%8A%D8%A7%D9%88%D9%8A%D9%83%D9%8A%3ACommon.css&type=revision&diff=27560800&oldid=27457556

It's fixed, thanks @Jdlrobson! I pulled the separate bug T188521: Page previews text and formulas cut off on arwiki into the sprint for @ABorbaWMF to do some cross-browser testing if necessary.

I think this can move to sign off. It looks like some of the issues identified above are either fixed or tracked elsewhere. There is a note in the original description to check the Acetic Acid pages and view the previews. I'm not sure if this is the desired result. Here is the preview and page for Acetic Anhydride:

Screen Shot 2018-03-01 at 10.41.23 AM.png (1×2 px, 1 MB)

Screen Shot 2018-03-01 at 10.41.28 AM.png (1×2 px, 1 MB)

ovasileva updated the task description. (Show Details)

All acceptance criteria are completed. Some smaller issues and edge cases are tracked under T187936: List of issues of 1.3.0 summary endpoint results and its subtasks. For now, html previews are live and looking pretty good.