Last modified: 2014-09-04 20:59:16 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 T62358, the corresponding Phabricator task for complete and up-to-date bug report information.
Bug 60358 - VisualEditor: Stop users from deleting parameters in the template dialog if they're marked as "required" in TemplateData
VisualEditor: Stop users from deleting parameters in the template dialog if t...
Status: VERIFIED FIXED
Product: VisualEditor
Classification: Unclassified
Editing Tools (Other open bugs)
unspecified
All All
: Normal enhancement
: VE-deploy-2014-08-28
Assigned To: Alex Monk
:
Depends on:
Blocks: 50747
  Show dependency treegraph
 
Reported: 2014-01-23 00:12 UTC by Rummana Yasmeen
Modified: 2014-09-04 20:59 UTC (History)
9 users (show)

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


Attachments
Screenshot attached (54.85 KB, image/png)
2014-01-23 00:12 UTC, Rummana Yasmeen
Details

Description Rummana Yasmeen 2014-01-23 00:12:43 UTC
Created attachment 14368 [details]
Screenshot attached

Steps to reproduce:


1.Open a page with VE 
2.Go to Insert>Transclusion
3.Search for the template Cite Web
4.Observe that the required parameters are now marked with * symbol
5.Delete the required parameters

Observed Result:

The required parameters gets deleted

See the screenshot attached.
Comment 1 Gerrit Notification Bot 2014-08-14 20:36:32 UTC
Change 154133 had a related patch set uploaded by Alex Monk:
Don't add delete button to required parameters in template dialog

https://gerrit.wikimedia.org/r/154133
Comment 2 Gerrit Notification Bot 2014-08-27 10:04:42 UTC
Change 154133 merged by jenkins-bot:
Remove delete button from required parameters in template dialog

https://gerrit.wikimedia.org/r/154133
Comment 3 Rummana Yasmeen 2014-08-27 19:15:48 UTC
Verified the fix in Betalabs
Comment 4 Rummana Yasmeen 2014-08-28 21:17:28 UTC
Verified the fix in test2
Comment 5 Ricordisamoa 2014-09-02 00:12:07 UTC
VisualEditor should only make edits easier, not restrict the users' capabilities.
As long as the wikitext editor allows removing required fields from templates (and it should, indeed), VE should too.
Sometimes the TemplateData information may be incorrect, or a set of fields may be mutually exclusive (and yet one of them would be required). Sometimes a user may want to remove a wrong value, and a template may show a warning for missing arguments (always better than wrong data).
Instead, a warning should be shown when a required parameter is going to be removed.
Comment 6 James Forrester 2014-09-02 22:24:16 UTC
(In reply to Ricordisamoa from comment #5)
> VisualEditor should only make edits easier,

I agree.

> not restrict the users' capabilities.

I think this is a false dichotomy.

> As long as the wikitext editor allows removing required fields from
> templates (and it should, indeed), VE should too.

The wikitext editor lets you do lots of things that are stupid. VisualEditor's job is to make it easy to make good content, not easy to make broken pages. :-)

> Sometimes the TemplateData information may be incorrect, 

Then the TemplateData should be fixed.

> or a set of fields may be mutually exclusive (and yet one of them would
> be required).

That doesn't make sense. "Required" means "the template will die horribly if you don't include this". It is *not* a "we'd like you to fill this in" – that's what "suggested" is for. Most templates will have no 'required' fields.

> Sometimes a user may want to remove a wrong value, and a template may
> show a warning for missing arguments (always better than wrong data).

If the template outputs an error, that's probably a required parameter.

> Instead, a warning should be shown when a required parameter is going to be
> removed.

I disagree, for the reasons above.
Comment 7 Ricordisamoa 2014-09-02 23:40:06 UTC
(In reply to James Forrester from comment #6)
> The wikitext editor lets you do lots of things that are stupid.

I do 'stupid' things all the time.
Now I understand that VE will always be a toy for newbies, and never a valid replacement for the wikitext editor.
Comment 8 Helder 2014-09-03 02:39:13 UTC
(In reply to Ricordisamoa from comment #5)
> ...a set of fields
> may be mutually exclusive (and yet one of them would be required).

(In reply to James Forrester from comment #6)
> > or a set of fields may be mutually exclusive (and yet one of them would
> > be required).
> 
> That doesn't make sense. "Required" means "the template will die horribly if
> you don't include this". It is *not* a "we'd like you to fill this in" –
> that's what "suggested" is for. Most templates will have no 'required'
> fields.

It seems perfectly valid for a template to require that "either A or B be provided" and the user should be able to delete one of them if it is not needed.
Comment 9 James Forrester 2014-09-03 19:19:24 UTC
(In reply to Helder from comment #8)
> (In reply to James Forrester from comment #6)
> > (In reply to Ricordisamoa from comment #5)
> > > or a set of fields may be mutually exclusive (and yet one of them would
> > > be required).
> > 
> > That doesn't make sense. "Required" means "the template will die horribly if
> > you don't include this". It is *not* a "we'd like you to fill this in" –
> > that's what "suggested" is for. Most templates will have no 'required'
> > fields.
> 
> It seems perfectly valid for a template to require that "either A or B be
> provided" and the user should be able to delete one of them if it is not
> needed.

This feels like a pretty edge case (and suggests that we should consider whether the template should be re-written to be less anti-human); maybe file a TemplateData bug to ask for a way to express this relationship?
Comment 10 Helder 2014-09-03 20:48:47 UTC
This kind of relationship between parameters was requested on bug 50407.
Comment 11 Rummana Yasmeen 2014-09-04 20:59:16 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