Last modified: 2014-09-25 22:04:18 UTC

Wikimedia Bugzilla is closed!

Wikimedia migrated from Bugzilla to Phabricator. Bug reports are handled in Wikimedia Phabricator.
This static website is read-only and for historical purposes. It is not possible to log in and except for displaying bug reports and their history, links might be broken. See T52747, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 50747 - VisualEditor: Transclusion dialog should recommend TemplateData-hinted mandatory parameters
VisualEditor: Transclusion dialog should recommend TemplateData-hinted mandat...
Status: VERIFIED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: High normal
: VE-deploy-2014-09-18
Assigned To: Alex Monk
:
: 51186 (view as bug list)
Depends on: 60358
Blocks: ve-templatesupport
  Show dependency treegraph
 
Reported: 2013-07-04 14:15 UTC by Derk-Jan Hartman
Modified: 2014-09-25 22:04 UTC (History)
17 users (show)

See Also:
Web browser: ---
Mobile Platform: ---
Assignee Huggle Beta Tester: ---


Attachments

Description Derk-Jan Hartman 2013-07-04 14:15:27 UTC
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.
Comment 1 Erik Moeller 2013-07-09 07:14:22 UTC
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.
Comment 2 Gerrit Notification Bot 2013-07-11 00:40:36 UTC
Change 73136 had a related patch set uploaded by Jforrester:
Auto-add required params for user added templates

https://gerrit.wikimedia.org/r/73136
Comment 3 James Forrester 2013-07-11 00:42:45 UTC
(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? …)
Comment 4 Erik Moeller 2013-07-11 01:57:28 UTC
Leaving at "recommend" for now since we can't fully ensure that requiring all parameters is consistently the desired behavior.
Comment 5 Gerrit Notification Bot 2013-07-11 16:33:53 UTC
Change 73136 merged by jenkins-bot:
Auto-add required params for user added templates

https://gerrit.wikimedia.org/r/73136
Comment 6 Maggie Dennis 2013-07-11 17:53:14 UTC
*** Bug 51186 has been marked as a duplicate of this bug. ***
Comment 7 Maggie Dennis 2013-07-11 17:54:31 UTC
English Wikipedian Joe Decker recommends indicating required parameters perhaps with the standard red asterisk.
Comment 8 Richard Morris 2013-07-15 20:55:57 UTC
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".
Comment 9 Helder 2013-07-15 21:05:02 UTC
Indeed, I gave up doing this for the Portuguese version for now:
https://pt.wikipedia.org/wiki/Template:Info/Taxonomia?uselang=en
Comment 10 John Broughton 2013-07-17 16:39:08 UTC
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.
Comment 11 John Mark Vandenberg 2013-07-21 22:56:41 UTC
Not enforcing mandatory params is a bug in either design or implementation.
Comment 12 John Broughton 2013-07-22 00:55:42 UTC
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.
Comment 13 Quim Gil 2013-12-10 02:11:25 UTC
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...
Comment 14 Alex Monk 2014-08-23 01:27:35 UTC
Is there anything left here to do that isn't bug 60358?
Comment 15 James Forrester 2014-08-23 02:54:02 UTC
(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.
Comment 16 John Broughton 2014-08-23 04:00:40 UTC
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.
Comment 17 Alex Monk 2014-08-27 15:44:56 UTC
We're also going to require the user to confirm when they try to insert a template with required parameters missing.
Comment 18 Gerrit Notification Bot 2014-08-27 15:46:25 UTC
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
Comment 19 Gerrit Notification Bot 2014-09-17 19:33:50 UTC
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
Comment 20 James Forrester 2014-09-17 19:39:53 UTC
There are still some remaining improvements (as always), but the thrust of this bug is now done.
Comment 21 Rummana Yasmeen 2014-09-17 22:08:58 UTC
Verified the fix to show confirmation dialog when trying to insert/edit a template with one or more missing required parameters
Comment 22 Rummana Yasmeen 2014-09-18 23:06:34 UTC
Verified the fix in test2
Comment 23 Rummana Yasmeen 2014-09-25 22:04:18 UTC
Verified the fix in production

Note You need to log in before you can comment on or make changes to this bug.


Navigation
Links