Page MenuHomePhabricator

Make timeline extension compatible with Parsoid
Open, MediumPublic

Description

Parsoid has its own extension API - see https://www.mediawiki.org/wiki/Parsoid/Extension_API.
In this first phase, we are targeting tag-hook extensions for migration.
The timeline extension needs an update to work directly with Parsoid.

Known Blockers: Missing support in ParsoidExtensionAPI

  • addTrackingCategory

Event Timeline

Arlolra triaged this task as Medium priority.Feb 25 2021, 5:26 PM
Arlolra moved this task from Backlog to Missing Functionality on the Parsoid board.

Since Parsoid can continue to call the legacy parser for expanding wikitext it doesn't natively support (ex: extension tags like these), Parsoid can continue to proxy expansion of such extensions to the legacy parser. The only constraint is on extensions that accept wikitext constructs and process them.

According to https://www.mediawiki.org/wiki/Extension:EasyTimeline#Code_example, timeline accepts extlinks and wikilinks. So, the EasyTimeline,pl script in the extension source seems to parse these links with a bunch of regexps and substitutes them with the appropriate <a> tag.

As far as I can tell, there is no immediate requirement for us to update this script to generate Parsoid-style HTML for these embedded links since the output is part of the SVG.

So, migrating this to native Parsoid handlers is no longer a blocker for Parsoid read views.

I added back the parent task -- that epic isn't about read views necessarily - but about ensuring these extensions have native Parsoid handlers.

cscott subscribed.

See T259893: Content template using EasyTimeline not working properly in the app, which seems to indicate an incompatibility with the <area> tags generated by EasyTimeline and Parsoid output. If so then "the legacy HTML is good enough" as @ssastry wrote above might /not/ be accurate? Needs investigation.