Page MenuHomePhabricator

Extract and use a DOMHandler interface (API) for HTML -> wt handlers defined on DOM nodes
Closed, ResolvedPublic

Description

  • DOMHandlers for HTML -> wt currently use a more-or-less uniform interface to define handlers for various DOM node types
  • This can be extracted into a parent class / interface

Not only is this going to be good documentation, this also makes the porting simpler and more performant.

Event Timeline

ssastry triaged this task as Medium priority.Sep 24 2018, 8:37 PM
ssastry moved this task from Backlog to Post-Port Work on the Parsoid-PHP board.

Change 479742 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] WIP: Experimental simplification of SyncTTM and handlers

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

Change 481305 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] WIP: Purge old sync handler related code

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

Change 481306 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] WIP: Add back generateTest, traceTime support and update transformTests.js

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

Oops .. I used the wrong task id on those patches

Change 479742 abandoned by Subramanya Sastry:
WIP: Experimental simplification of SyncTTM and handlers

Reason:
Squashed the three separate patches into one

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

Change 481305 abandoned by Subramanya Sastry:
WIP: Purge old sync handler related code

Reason:
Squashed the three separate patches into one

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

Change 481306 abandoned by Subramanya Sastry:
WIP: Add back generateTest, traceTime support and update transformTests.js

Reason:
Squashed the three separate patches into one

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

Change 506318 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] [WIP] DOMHandler

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

Also in PHP WikitextSerializer.getDOMHandler should be extracted and turned into some kind of factory object, don't know if it makes sense to do that on the JS side as well.

Change 506554 had a related patch set uploaded (by Arlolra; owner: Arlolra):
[mediawiki/services/parsoid@master] [WIP] Step two, make a SepNls class

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

Change 506554 abandoned by Arlolra:
Step two, make a SepNls class

Reason:
Squashed into https://gerrit.wikimedia.org/r/c/mediawiki/services/parsoid/ /506318

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

Change 506318 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Create a DOMHandler class to ease porting

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