Page MenuHomePhabricator

Allow extensions providing XML-style tags to describe their parameters for VisualEditor
Closed, DeclinedPublic

Description

TemplateData allows describing how a parameter should be handled by editors; currently only templates can make use of that, but it would make perfect sense for extension parser tags to do it as well, maybe via some global field in extension.json.

Event Timeline

Tgr created this task.Oct 1 2017, 10:16 PM
Restricted Application added a subscriber: Aklapper. · View Herald TranscriptOct 1 2017, 10:16 PM

Given the amount of work it would take to build a dynamic form based on the input labels and types (e.g. string, number in specific range, date, Article name), it's probably going to be easier to ask extension developers to build their own VE inspectors, which we already have for a lot of common extensions.

Jdforrester-WMF closed this task as Declined.Oct 2 2017, 7:34 PM
Jdforrester-WMF added a subscriber: Jdforrester-WMF.

Agreed. If you want your extension to work with VisualEditor, there's a well-documented and well-used process for that.

Tgr added a comment.Oct 2 2017, 8:17 PM

Is VisualEditor the only thing that uses TemplateData? It seems nice to have a generic way of describing paramaters. (Also it would be machine-readable version-tracked self-documentation; cf. doc/hooks.txt vs. the often outdated hook wiki pages. Could be useful for something like T155024.)

Given the amount of work it would take to build a dynamic form based on the input labels and types (e.g. string, number in specific range, date, Article name)

Doesn't that code exist already due to templates?

Agreed. If you want your extension to work with VisualEditor, there's a well-documented and well-used process for that.

A fairly high-effort process, though. Getting third-party developers to add a JSON object and a couple interface messages to their extension is easy. Getting them to write a VE plugin, probably not so much.