Page MenuHomePhabricator

Frontend performance issue for tablet devices loading parsoid content
Closed, ResolvedPublic1 Estimated Story PointsBUG REPORT

Description

Steps to replicate the issue (include links if applicable):

What happens?:
The sections start collapsed then expand. This is a significant flash of unstyled content / reflow which is a performance issue.

What should have happened instead?:

They should be expanded from the start

Software version (on Special:Version page; skip for WMF-hosted wikis like Wikipedia):

Other information (browser name/version, screenshots, etc.):

This seems to because of an error in the CSS. It uses max-width-breakpoint-tablet instead of max-width-breakpoint-mobile. The JavaScript uses wgMFDeviceWidthTablet which corresponds with max-width-breakpoint-mobile.

Event Timeline

Change #1224996 had a related patch set uploaded (by Jdlrobson; author: Jdlrobson):

[mediawiki/extensions/MobileFrontend@master] Fixes flash of unstyled content performance issue on tablet devices for parsoid

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

@SherryYang-WMF @egardner it is possible to get this in the next sprint? Discovered while looking at the other task in the sprint and I've recommended a fix for this blocks further roll outs of Parsoid.

Change #1225008 had a related patch set uploaded (by SarthakSingh2904; author: SarthakSingh2904):

[mediawiki/extensions/MobileFrontend@master] mobilefrontend: Fix Parsoid content reflow on tablets

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

Change #1224996 abandoned by Jdlrobson:

[mediawiki/extensions/MobileFrontend@master] Fixes flash of unstyled content performance issue on tablet devices for parsoid

Reason:

See https://gerrit.wikimedia.org/r/c/mediawiki/extensions/MobileFrontend/+/1225008

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

Change #1225008 merged by jenkins-bot:

[mediawiki/extensions/MobileFrontend@master] mobilefrontend: Fix Parsoid content reflow on tablets

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

QA-ing now.

I can repro the issue on both the Wikivoyage link above as well as https://en.wikipedia.org/wiki/Bariloche?useparsoid=1 on EnWiki. Throttling the network connection helps.

Setting up a patchdemo to confirm that we have a fix.

Test wiki created on Patch demo by EGardner (WMF) using patch(es) linked to this task:
https://fb54c54fb1.catalyst.wmcloud.org/w/

QA report

Scenario: Navigate to a test page (needs to have multiple sections) on Wikipedia – I used https://en.wikipedia.org/wiki/Bariloche?useparsoid=1.

  • Must have ?useParsoid=1 param in the URL
  • Make sure to set viewport size to 900px wide
  • Make sure to click "mobile view" in the article footer
  • Throttle the network speed to "Good 3G" or similar to make it easier to see the section loading behavior

Behavior

  • On production Wikipedia, the sections start out as collapsed and then flash into expanded state, causing a lot of reflow
  • On the patchdemo instance with the proposed fix applied, sections begin in expanded state and don't reflow as the page loads:

See for yourself at: https://fb54c54fb1.catalyst.wmcloud.org/wiki/Bariloche?useparsoid=1

Summary
✅ QA successful, patch is good to ride the train

Test wiki on Patch demo by EGardner (WMF) using patch(es) linked to this task was deleted:

https://fb54c54fb1.catalyst.wmcloud.org/w/