mediawiki-extensions-Visual.../modules/ve-mw/dm/models
Thiemo Kreuz 9e74e2f352 Ignore default values as not being valuable as well
This check makes sure the user doesn't loose work when clicking
the back button. I would like to argue that neither of these
values is valuable enough to block the user with a confirmation
dialog:
* Literally nothing is lost when the input is empty.
* The auto-value is only temporarily lost, but will
  automatically be restored when the user decides to add the
  template back. The input field is pre-filled with this value.
* The default value doesn't need to be manually entered. It will
  show up anyway when the parameter is missing.

There is a rare edge-case, but it is not really relevant in this
situation. Some templates allow to override a default value with
the empty string. This will be considered irrelevant by this
code. However, this was already happening before and doesn't
change with this patch.

The only edge-case where this patch makes a difference is if a
parameter is marked as required or suggested, is documented to
have a default value, _and_ the template allows to override it
with an empty string. But this combination is rather crazy, if
not bogus, and not worth considering here, I believe.

Bug: T274551
Change-Id: Ib176a82844335c3d4dd5b720d335ec28245e1637
2021-08-09 10:28:09 +00:00
..
ve.dm.MWImageModel.js Remove @param/@return docs that literally repeat the code 2021-06-14 15:44:51 +02:00
ve.dm.MWParameterModel.js Merge "Fix incomplete template dialog event handling in new sidebar" 2021-07-16 13:07:03 +00:00
ve.dm.MWTemplateModel.js Ignore default values as not being valuable as well 2021-08-09 10:28:09 +00:00
ve.dm.MWTemplatePlaceholderModel.js Remove redundant ve.dm.MWTemplatePlaceholderModel.isEmpty 2021-08-03 14:40:50 +02:00
ve.dm.MWTemplateSpecModel.js Merge "Add a message next to undocumented parameters" 2021-07-16 12:05:29 +00:00
ve.dm.MWTransclusionContentModel.js Better name for ambiguous "empty" concept in the model 2021-08-06 15:11:44 +02:00
ve.dm.MWTransclusionModel.js Merge "Split MWTransclusionModel methods to do one thing only" 2021-08-05 10:32:18 +00:00
ve.dm.MWTransclusionPartModel.js Better name for ambiguous "empty" concept in the model 2021-08-06 15:11:44 +02:00