Page MenuHomePhabricator

[Epic] Make MobileFrontend compatible with Parsoid HTML
Open, MediumPublic

Description

Parsoid-based read views are on the horizon. 2021 will probably start seeing small beginnings and by the end of the year, the Parsing Team expects to have made significant progress towards shifting wikis to use Parsoid HTML for read views.

There will be several milestones along the way. T265943: Decide on EOFY (June 2021) Parsoid read-view target use-case might look at mediawiki.org and/or officewiki as the first guinea pig.

Given this, MobileFrontend should start preparing to consume Parsoid HTML. There will be a transitional period (likely on the order of many months) when both Parsoid and core parser will be serving wikis as we iron out kinks in rendering, performance, features, etc. But, the final switch will likely definitely happen in 2022.

The Parsing Team's hunch is that MobileFrontend code will potentially be simplified with the switch to Parsoid HTML. For example, Parsoid output comes with section tags that are compatible with core parser output and MobileFrontend can simply consume them instead of craft these sections internally.

We are happy to collaborate with other developers to ensure that this transition can happen as smoothly as possible including addressing any missing functionality.

Event Timeline

Exciting!

Related: T101046 T55784 T55784 T258964

Assuming the HTML will be identical https://en.wikipedia.org/api/rest_v1/page/html/Spain a quick look using the attached patch for testing flags a few problems that will need to be addressed prior to this change:

  • Section collapsing is broken with Parsoid HTML
  • Minerva needs to be able to style figure elements
  • Page previews incompatible

The transforms for the lead paragraph and lazy image seem to work correctly.

There will be several milestones along the way. T265943: Decide on EOFY (June 2021) Parsoid read-view target use-case might look at mediawiki.org and/or officewiki as the first guinea pig.

@dcipoletti I think we might want to be proactive here and consider mobile as a separate guinea pig, possibly sending logged in users new Parsoid HTML for mobile to help faciliate this move. From a technical POV I do expect this will lead to simplification of code in MobileFrontend.

Change 646845 had a related patch set uploaded (by Jdlrobson; owner: Jdlrobson):
[mediawiki/extensions/MobileFrontend@master] Repurpose McsProvider as ParsoidContentProvider

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

Jdlrobson renamed this task from Make MobileFrontend compatible with Parsoid HTML to [Epic] Make MobileFrontend compatible with Parsoid HTML.Dec 14 2020, 10:39 PM
Jdlrobson added a project: Epic.
ovasileva triaged this task as Medium priority.Dec 15 2020, 10:54 AM
ovasileva moved this task from Needs Prioritization to Epics/Goals on the Readers-Web-Backlog board.

Change 646845 abandoned by Jdlrobson:
[mediawiki/extensions/MobileFrontend@master] Repurpose McsProvider as ParsoidContentProvider

Reason:
Let me know when you need assistance from reading web on getting MobileFrontend Parsoid compatible. That's unlikely to happen without this patch to support testing. My focus is elsewhere right now however.

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