Page MenuHomePhabricator

Improve jsdoc for WikiEditor and publish to docs.wikimedia.org
Open, Needs TriagePublic

Description

This is a pretty common extension that lots of parties interact with. It's probably a good idea to get its documentation properly published.

Extension description and repo location: https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:WikiEditor

Some documentation exists at:
https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:WikiEditor/Toolbar_customization
https://www.mediawiki.org/wiki/Special:MyLanguage/Extension:WikiEditor/Toolbar_customization/Library

CodeMirror is an existing extension that has JSDoc that is being published.
https://gerrit.wikimedia.org/g/mediawiki/extensions/CodeMirror

Instructions for JSDoc are at:
https://www.mediawiki.org/wiki/JSDoc

This includes publishing instructions:
https://www.mediawiki.org/wiki/JSDoc#4._Publish_on_doc.wikimedia.org
After setting up publishing, it would then end up at https://doc.wikimedia.org in the MediaWiki Components section

Event Timeline

Thank you for tagging this task with good first task for Wikimedia newcomers!

Newcomers often may not be aware of things that may seem obvious to seasoned contributors, so please take a moment to reflect on how this task might look to somebody who has never contributed to Wikimedia projects.

A good first task is a self-contained, non-controversial task with a clear approach. It should be well-described with pointers to help a completely new contributor, for example it should clearly point to the codebase URL and provide clear steps to help a contributor get set up for success. We've included some guidelines at https://phabricator.wikimedia.org/tag/good_first_task/ !

Thank you for helping us drive new contributions to our projects <3

TheDJ updated the task description. (Show Details)

Hi, I’d like to work on this task.

Plan:

  • Add JSDoc comments to core WikiEditor modules
  • Set up JSDoc configuration
  • Generate documentation locally
  • Follow CodeMirror extension as reference
  • Attempt publishing setup for doc.wikimedia.org

Please let me know if there are specific modules to prioritize.

Change #1277259 had a related patch set uploaded (by TheDJ; author: Praveen5638):

[mediawiki/extensions/WikiEditor@master] Improve JSDoc for WikiEditor functions

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

Change #1276668 had a related patch set uploaded (by TheDJ; author: Mohdsarfraz):

[mediawiki/extensions/WikiEditor@master] Improve JSDoc formatting (align comment with function)

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

Change #1278419 had a related patch set uploaded (by Status 401; author: Status 401):

[mediawiki/extensions/WikiEditor@master] Improve JSDoc for toolbar module functions

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

Submitted patch 1278419 — adds JSDoc blocks for the 19 previously-undocumented functions in jquery.wikiEditor.toolbar.js (the api.* and fn.* objects). Verified locally with npm run doc under pedantic: true and eslint. Targeted functions don't overlap with the in-progress patches 1276668 and 1277259. Will follow up with the integration/config and integration/docroot patches to set up CI publishing once the JSDoc patches land.

Change #1278439 had a related patch set uploaded (by Status 401; author: Status 401):

[mediawiki/extensions/WikiEditor@master] Improve JSDoc descriptions in realtimepreview module

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

Change #1281645 had a related patch set uploaded (by TheDJ; author: Shauryasingh0302):

[mediawiki/extensions/WikiEditor@master] docs: add JSDoc for buildRow function in toolbar module

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

Change #1278439 merged by jenkins-bot:

[mediawiki/extensions/WikiEditor@master] Improve JSDoc descriptions in realtimepreview module

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