Page MenuHomePhabricator

[jsduck] Various custom tags should be easily shareable between projects
Open, LowPublic

Description

Recently we introduced the jsduck @see tag in MobileFrontend [1], which isn't part of the vanilla jsduck. Actually we need to add a customTag our self [2] to use it without warnings from jsduck. The feature request for jsduck [3] isn't implemented at the moment and there is no roadmap for it (as i can see).

VisualEditor itself (like mentioned by @Krinkle on the feature request) uses a set of custom tags [4] and there are other projects using this (and other) custom tag(s), too (core, VE and GuidedTours). It would be possible to use cores CustomTags.rb in jsduck, but with it it wouldn't be easy to share custom tags introduced in VE or MF, e.g.. So it would be great to have a central repository (e.g. a git project in gerrit) to manage tags used in wmf projects to simply clone it (maybe integrate it as a submodule) into the project (or a seperate directory) and use it. An update of a tag or new tags could be used without any problems by updating the local copy of the repo.

[1] https://gerrit.wikimedia.org/r/#/c/182968/
[2] https://gerrit.wikimedia.org/r/#/c/184405/
[3] https://github.com/senchalabs/jsduck/issues/558
[4] http://git.wikimedia.org/blob/mediawiki%2Fextensions%2FVisualEditor.git/213c0a2367a3a2c4555ea39401e914e741ffd505/.docs%2FCustomTags.rb

Event Timeline

Florian created this task.Jan 12 2015, 9:46 PM
Florian raised the priority of this task from to Needs Triage.
Florian updated the task description. (Show Details)
Florian added subscribers: Florian, Jdlrobson, Krinkle, thiemowmde.

Seems related to Readers-Web-Backlog and probably VE James since the code currently lives in VE... Would be great to break it out into its own extension or upstream it so we can all reap the benefits!

Seems related to Readers-Web-Backlog and probably VE James since the code currently lives in VE... Would be great to break it out into its own extension or upstream it so we can all reap the benefits!

Obviously. This is long-standing technical debt I've complained about before. Surprised there wasn't already a task…

hashar added a subscriber: hashar.Jan 13 2015, 9:40 AM

Could the CustomTags we use be made a ruby gem? This way we could have it added to Gemfile and have bundler install it for us. The invocation of jsduck can then point --tags to something like vendor/jsduck-wmf/lib/CustomTags.rb.

Jdlrobson moved this task from 2015-16 Q4 to 2016-17 Q4 on the Readers-Web-Backlog board.
Krinkle triaged this task as Low priority.Mar 2 2015, 2:07 PM
phuedx added a subscriber: phuedx.Mar 2 2015, 2:39 PM
bmansurov removed bmansurov as the assignee of this task.
bmansurov removed bmansurov as the assignee of this task.
bmansurov claimed this task.
bmansurov removed bmansurov as the assignee of this task.
Jdlrobson moved this task from Backlog to Tasks on the MobileFrontend board.Nov 4 2015, 5:07 PM
Jdlrobson moved this task from Tasks to Tech debt on the MobileFrontend board.Feb 18 2016, 6:43 PM
Krinkle added a comment.EditedFeb 24 2016, 2:53 AM

This task is about the Ruby implemention of tags for generated html documentation, in other words JSDuck plugins that produce HTML content for each tag in some sensible way.

Whitelisting the tags for JSCS linting is trivial with a few lines in .jscsrc and isn't in need of code sharing.

From what I can see, Wikibase doesn't currently generate documentation for JavaScript code.

This task is about the Ruby implemention of tags for generated html documentation, in other words JSDuck plugins that produce HTML content for each tag in some sensible way.

Yes, I understood that :-)

Whitelisting the tags for JSCS linting is trivial with a few lines in .jscsrc and isn't in need of code sharing.

I apologize for having written the comment as if I thought I was being of some help. That was not my intention.

From what I can see, Wikibase doesn't currently generate documentation for JavaScript code.

It doesn't (T42657; https://wbdoc.wmflabs.org/js/). I posted the URL just in case someone implementing a shared JSDuck plugin wants to glance at some custom tags in use by extensions.

This proposal is selected for the Developer-Wishlist voting round and will be added to a MediaWiki page very soon. To the subscribers, or proposer of this task: please help modify the task description: add a brief summary (10-12 lines) of the problem that this proposal raises, topics discussed in the comments, and a proposed solution (if there is any yet). Remember to add a header with a title "Description," to your content. Please do so before February 5th, 12:00 pm UTC.