VisualEditor: Transclusion dialog should recommend TemplateData-hinted mandatory parameters
Closed, ResolvedPublic

Description

TemplateData makes it possible to have 'required' parameters, but not using these parameters in the Template editor, does not alert you of the fact that these parameters are required.


Version: unspecified
Severity: normal
See Also:
https://bugzilla.wikimedia.org/show_bug.cgi?id=60358

bzimport set Reference to bz50747.
TheDJ created this task.Via LegacyJul 4 2013, 2:15 PM
Eloquence added a comment.Via ConduitJul 9 2013, 7:14 AM

Indeed, this seems like a low hanging fruit improvement - when inserting a new template, having all the required fields immediately be ready for use would significantly speed up template completion.

gerritbot added a comment.Via ConduitJul 11 2013, 12:40 AM

Change 73136 had a related patch set uploaded by Jforrester:
Auto-add required params for user added templates

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

Jdforrester-WMF added a comment.Via ConduitJul 11 2013, 12:42 AM

(In reply to comment #2)

Change 73136 had a related patch set uploaded by Jforrester:
Auto-add required params for user added templates

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

This just adds the parameters, not "enforcing" their presence. Not sure if we should do that (or let users do what they want).

Another improvement under this bug will be to indicate mandatory ones in the list of available parameters on the template. (Put them at the top? Highlight them? Icon? …)

Eloquence added a comment.Via ConduitJul 11 2013, 1:57 AM

Leaving at "recommend" for now since we can't fully ensure that requiring all parameters is consistently the desired behavior.

gerritbot added a comment.Via ConduitJul 11 2013, 4:33 PM

Change 73136 merged by jenkins-bot:
Auto-add required params for user added templates

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

Mdennis-WMF added a comment.Via ConduitJul 11 2013, 5:53 PM

*** Bug 51186 has been marked as a duplicate of this bug. ***

Mdennis-WMF added a comment.Via ConduitJul 11 2013, 5:54 PM

English Wikipedian Joe Decker recommends indicating required parameters perhaps with the standard red asterisk.

SalixAlba added a comment.Via ConduitJul 15 2013, 8:55 PM

This topic came up in http://en.wikipedia.org/wiki/Wikipedia:VisualEditor/Feedback#Duplicate_parameters_in_a_template
and John Broughton came up with the idea that you really want more types of status: "required" - must be set, "suggested" - appears automatically on the lhs, and "optional".

I'd possibly add a "not recommended" for parameters which are there to cover corner cases but you really don't want the user to enter, the color parameter in the Taxobox is such a case. Its only useful for subtemplate calling taxobox and should almost never be used in an article, but it needs to be documented.

BTW Taxobox http://en.wikipedia.org/wiki/Taxobox is a nice torture test. It has over 100 parameter, most will not need to be used, but there will be an article using each. Perhaphs 10 of these are the most likely to be used which could be marked as "suggested".

He7d3r added a comment.Via ConduitJul 15 2013, 9:05 PM

Indeed, I gave up doing this for the Portuguese version for now:
https://pt.wikipedia.org/wiki/Template:Info/Taxonomia?uselang=en

John_Broughton added a comment.Via ConduitJul 17 2013, 4:39 PM

Should there be "not recommended" parameters (I'd suggest something like "for experts only" as a label; if something is "not recommended", why have it at all?) should be marked as such by a label, when listed as parameters that *could* be added.

More generally, I don't think we need to worry much about really complex templates, if (as suggested elsewhere) the template dialog box includes a link to the documentation page for such templates. We don't need to worry much because only editors who are really interested - and motivated to understand the template - are likely to go beyond the parameters that are required and suggested, with the possible exception of editors who (idiosyncratically) use a less common parameter on a regular basis.

In short, a "required" and a "suggested" list (AND enforcing that the "required" list be filled in) would be a huge win for the occasional user of templates.

jayvdb added a comment.Via ConduitJul 21 2013, 10:56 PM

Not enforcing mandatory params is a bug in either design or implementation.

John_Broughton added a comment.Via ConduitJul 22 2013, 12:55 AM

I don't see why Wikipedia communities can't be trusted to decide what is *mandatory* and what is not, for template parameters. The communities are, after all, the ones who will live with the consequences of over-specifying or under-specifying such parameters.

It seems a bit paternalistic for the WMF to tell these communities that whether or not they want the software to help ensure that "required" parameters are non-blank, that's not going to happen - that WMF considers anything "required" to actually be just "recommended".

As an absolute minimum, VE should issue a warning when a "required" parameter is left blank.

Qgil added a comment.Via ConduitDec 10 2013, 2:11 AM

I haven't tested required/optional fields in depth, but some casual tests suggest that currently

  • Required and optional parameters are presented differently. The required can be seen in a left column, while the optional are in the "body". Not the most self-evident UX if you ask me (why not adding labels "Required" / "Optional"?), but you get the idea after filling the first templates.
  • Required field aren't still enforced, nor there is any warning when they are left empty.

My expectation as an editor is that a field marked as "required" in the documentation it is actually required...

Krenair added a comment.Via ConduitAug 23 2014, 1:27 AM

Is there anything left here to do that isn't bug 60358?

Jdforrester-WMF added a comment.Via ConduitAug 23 2014, 2:54 AM

(In reply to Alex Monk from comment #14)

Is there anything left here to do that isn't bug 60358?

I believe that that will complete this.

John_Broughton added a comment.Via ConduitAug 23 2014, 4:00 AM

I just used the Cite news template in VE, via the mini-editor. That template has a number of "required" parameters. I added just a url (a non-required field), clicked "Insert citation", and the dialog closed, posting the citation to the main page.

I also tested the Infobox person template, which uses the regular Template dialog. That template has one required parameter, "Name". I ignored that parameter, added another one, filled in the second one, and clicked "Insert template"; the dialog box closed. And the inserted template did *not* have a value for the one required parameter.

So not only are "required" parameters not enforced by VE, but VE doesn't even *warn* the user that one or more required parameters are missing. That is quite unhelpful; it's a missed opportunity for VE to be *better* than the wikitext editor.

(I note, in passing, that the marking of "required" fields is, let's say, *subtle* - an uncolored asterisk that doesn't have a tooltip. I hope that subtlety isn't one of the goals of the VE team.)

At minimum, VE should display a warning (pop-up box) that says "One or more required parameters is missing". Then the user could choose either to click on "return to dialog" or click on "insert citation"; the latter would finish the dialog.

And NO, Bug 60358 does not address *anything* about the templates creation process (as described above). Bug 60358 is about *editing* an existing template, which is a different thing.

Krenair added a comment.Via ConduitAug 27 2014, 3:44 PM

We're also going to require the user to confirm when they try to insert a template with required parameters missing.

gerritbot added a comment.Via ConduitAug 27 2014, 3:46 PM

Change 156559 had a related patch set uploaded by Alex Monk:
Get confirmation when trying to insert template with required parameters missing

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

gerritbot added a comment.Via ConduitSep 17 2014, 7:33 PM

Change 156559 merged by jenkins-bot:
Get confirmation when trying to insert/edit template/citation with required parameters missing

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

Jdforrester-WMF added a comment.Via ConduitSep 17 2014, 7:39 PM

There are still some remaining improvements (as always), but the thrust of this bug is now done.

Ryasmeen added a comment.Via ConduitSep 17 2014, 10:08 PM

Verified the fix to show confirmation dialog when trying to insert/edit a template with one or more missing required parameters

Ryasmeen added a comment.Via ConduitSep 18 2014, 11:06 PM

Verified the fix in test2

Ryasmeen added a comment.Via ConduitSep 25 2014, 10:04 PM

Verified the fix in production

Add Comment