Page MenuHomePhabricator

Use native Javascript (ES6) classes instead of prototype-based definition pattern in the Parsoid codebase
Closed, ResolvedPublic

Description

This code pattern makes for easier-to-grok code as well as easier-to-port code.

Importantly, using proper classes will facilitate porting to proper PHP classes.

Related Objects

Event Timeline

ssastry created this task.Sep 17 2018, 10:49 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptSep 17 2018, 10:49 PM
ssastry triaged this task as Normal priority.Sep 17 2018, 10:49 PM
ssastry moved this task from Backlog to Parsoid Code Refactoring on the Parsoid-PHP board.
cscott renamed this task from Use native Javascript classes instead of prototype-based definition pattern in the Parsoid codebase to Use native Javascript (ES6) classes instead of prototype-based definition pattern in the Parsoid codebase.Oct 2 2018, 9:08 PM
cscott updated the task description. (Show Details)
cscott added subscribers: cscott, gerritbot.

Change 463560 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Use ES6 classes for AttributeExpander

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

Change 463559 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Use ES6 class for TokenTransformManager and subclasses

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

Change 463559 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Use ES6 class for TokenTransformManager and subclasses

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

Change 464616 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Use ES6 class for ParagraphWrapper

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

Change 464633 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Use ES6 class for BehaviorSwitchHandler

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

Change 464634 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Use ES6 class for DOMFragmentBuilder

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

Change 464616 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Use ES6 class for ParagraphWrapper

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

Change 463560 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Use ES6 classes for AttributeExpander

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

Change 464633 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Use ES6 class for BehaviorSwitchHandler

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

Change 464634 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Use ES6 class for DOMFragmentBuilder

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

Change 464908 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Use ES6 class for LinkHandler

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

Change 464911 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Use ES6 class for ExtensionHandler

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

Change 464913 had a related patch set uploaded (by C. Scott Ananian; owner: C. Scott Ananian):
[mediawiki/services/parsoid@master] Use ES6 class for LanguageVariantHandler

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

Change 464908 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Use ES6 class for LinkHandler

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

Change 464911 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Use ES6 class for ExtensionHandler

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

Change 464913 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Use ES6 class for LanguageVariantHandler

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

Mentioned in SAL (#wikimedia-operations) [2018-10-17T20:50:28Z] <arlolra> Updated Parsoid to e6b708b (T204622, T187848, T207093)

Change 478814 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert PreHandler to ES6 class syntax

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

Change 478815 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert ListHandler to use ES6 class syntax

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

Change 478814 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert PreHandler to ES6 class syntax

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

Change 478815 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert ListHandler to use ES6 class syntax

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

Change 479148 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert TokenCollector and *Include* to use ES6 class syntax

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

Change 479149 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert TemplateHandler to use ES6 class syntax

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

Change 479150 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert TokenStreamPatcher to use ES6 class syntax

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

Mentioned in SAL (#wikimedia-operations) [2018-12-13T18:52:25Z] <arlolra> Updated Parsoid to 4242ad0 (T204622, T211738)

Change 479148 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert TokenCollector and *Include* to use ES6 class syntax

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

Change 479149 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert TemplateHandler to use ES6 class syntax

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

Change 479150 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert TokenStreamPatcher to use ES6 class syntax

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

Mentioned in SAL (#wikimedia-operations) [2018-12-17T21:55:24Z] <arlolra> Updated Parsoid to 4eba44e (T204622, T211941)

Change 482337 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] WikitextSerializer.js: Use ES6 class + other minor cleanup

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

Change 482338 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert SerializerState to use ES6 class syntax

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

Change 482340 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert Normalizer to use ES6 class

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

Change 482351 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert WTSUtils to use ES6 class syntax

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

Change 482352 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert DOMDiff to use ES6 class syntax

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

Change 482353 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert SelectiveSerializer to use ES6 class syntax

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

Change 482354 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert WikitextEscapeHandlers to use ES6 class syntax

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

Change 482366 had a related patch set uploaded (by Subramanya Sastry; owner: Subramanya Sastry):
[mediawiki/services/parsoid@master] Convert ConstrainedText classes to use ES6 class syntax

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

Change 482337 merged by jenkins-bot:
[mediawiki/services/parsoid@master] WikitextSerializer.js: Use ES6 class + other minor cleanup

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

Change 482338 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert SerializerState to use ES6 class syntax

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

Change 482340 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert Normalizer to use ES6 class

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

Change 482351 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert WTSUtils to use ES6 class syntax

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

Change 482352 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert DOMDiff to use ES6 class syntax

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

Change 482353 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert SelectiveSerializer to use ES6 class syntax

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

Change 482354 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert WikitextEscapeHandlers to use ES6 class syntax

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

Change 482366 merged by jenkins-bot:
[mediawiki/services/parsoid@master] Convert ConstrainedText classes to use ES6 class syntax

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

ssastry closed this task as Resolved.Feb 5 2019, 10:46 PM
ssastry removed a project: Patch-For-Review.