Page MenuHomePhabricator

Templates that have unnamed parameters and don't have TemplateData are hard to add in VisualEditor
Closed, DeclinedPublic8 Estimated Story Points

Description

There's a large number of templates that don't have TemplateData, and have unnamed parameters. When adding such a template, the editor is presented with one input box called "Field name". As far as I observed till now, nobody really understands what to do with it. People who are experienced with editing in wiki syntax ignore the "Field name" label and fill the value of the first unnamed parameter.

This is technically wrong - the unnamed parameters are not actually unnamed, but called "1", "2", etc., and VE's template insertion dialog assumes that the users know it, but as far as I can see, this confuses everybody.

It would be nice to have TemplateData everywhere,¹ but till then it would be nice to redesign the template insertion dialog. This requires Real design work, but some initial ideas that I have are:

One possibility is to show two fields initially - "Parameter name" and "Parameter value". The default for the first one can be "1", and let people add more.

Another direction is to reuse the logic that TemplateData Editor uses to guess which parameters does the template have, and show a default parameter list accordingly.

Or something else entirely.

¹ See T52368 and T85110 for something that can help the communities achieve this.

Event Timeline

Amire80 raised the priority of this task from to Medium.
Amire80 updated the task description. (Show Details)
Amire80 renamed this task from Tempaltes that have unnamed parameters and don't have TemplateData are confusing to Templates that have unnamed parameters and don't have TemplateData are hard to add.Nov 23 2015, 7:51 AM
Amire80 renamed this task from Templates that have unnamed parameters and don't have TemplateData are hard to add to Templates that have unnamed parameters and don't have TemplateData are hard to add in VisualEditor.
Amire80 set Security to None.
Jdforrester-WMF changed the task status from Open to Stalled.Nov 24 2015, 8:18 PM

This is technically wrong - the unnamed parameters are not actually unnamed, but called "1", "2", etc.,

No. Auto-numbered parameters are by definition "unnamed". If you don't have TemplateData, you haven't labelled the parameters either, so there's nothing to use.

Also, there are quite a lot of tasks already about this. Could you merge into the one you think looks promising?

Jdforrester-WMF edited a custom field.
Jdforrester-WMF edited a custom field.

This is technically wrong - the unnamed parameters are not actually unnamed, but called "1", "2", etc.,

No. Auto-numbered parameters are by definition "unnamed". If you don't have TemplateData, you haven't labelled the parameters either, so there's nothing to use.

Hence declining.