Page MenuHomePhabricator

Replace jsduck with JSDoc3 in OOUI
Closed, ResolvedPublic

Event Timeline

Jdforrester-WMF created this task.

Change 405543 had a related patch set uploaded (by Jforrester; owner: Prtksxna):
[oojs/ui@master] [WIP] doc: Convert from jsduck to JSDoc3

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

Change 405543 abandoned by Jforrester:

[oojs/ui@master] doc: Convert from jsduck to JSDoc3

Reason:

This will need re-doing from scratch, unfortunately.

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

Change 765552 had a related patch set uploaded (by Jforrester; author: Jforrester):

[oojs/ui@master] [WIP] doc: Switch from jsduck to jsdoc

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

Change 765552 merged by jenkins-bot:

[oojs/ui@master] doc: Switch from jsduck to jsdoc

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

The change causes a few regressions in the generated documentation, but we're doing it anyway, because JSDuck's parser's limitation are preventing us from making maintenance changes in OOUI.

I'm not sure if these problems will be fixed. OOUI mostly receives only critical fixes these days, unless someone volunteers to do something more.

Known issues:

  • Documentation for all static properties is missing. This is because they're defined on the .static property of the class, rather than the class itself, which is a weird convention that no one else uses. See also T89721 about other problems caused by that.
  • Documentation for all inherited config parameters is missing. This is because JSDoc doesn't special-case config parameters like JSDuck did, they're just parts of the config parameter, so they are not inherited. This may be kind of fixable if we define a type for each class's config and make them inherit too.
  • Documentation several unrelated methods is missing. This is because it was defined using @inheritdoc <foo> to copy it from another method, and JSDoc does not support that. JSDoc instead has @borrows/@lends tags which are supposed to allow doing something similar, but they're super awkward to use. https://codesearch.wmcloud.org/search/?q=%40inheritdoc\s\S%2B&files=\.js%24&excludeFiles=&repos=oojs%2Fui

In addition,

  • No list of inherited mixins: JSDuck · JSDoc. And, obviously, no config parameters from them.

A summary like this was a godsend in retrospect;

image.png (537×294 px, 24 KB)
JSDoc's class tree pales in comparison.
image.png (305×226 px, 10 KB)

Change 998536 had a related patch set uploaded (by VolkerE; author: VolkerE):

[mediawiki/core@master] Update OOUI to v0.49.0

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

Change 998536 merged by jenkins-bot:

[mediawiki/core@master] Update OOUI to v0.49.0

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

Change 999044 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[VisualEditor/VisualEditor@master] Exclude OOUI from generated JSDuck documentation

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

Change 999044 merged by jenkins-bot:

[VisualEditor/VisualEditor@master] Exclude OOUI from generated JSDuck documentation

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

Change 999066 had a related patch set uploaded (by Bartosz Dziewoński; author: Bartosz Dziewoński):

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (58a24a62c)

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

Change 999066 merged by jenkins-bot:

[mediawiki/extensions/VisualEditor@master] Update VE core submodule to master (58a24a62c)

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

matmarex claimed this task.
matmarex removed a project: Patch-For-Review.