mediawiki-extensions-Visual.../modules/ve-mw
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
..
ce Minor documentation updates in template related classes 2021-06-25 16:46:59 +02:00
dm Ignore default values as not being valuable as well 2021-08-09 10:28:09 +00:00
init Move abort event tracking from the start to the end of the teardown process 2021-07-27 22:50:52 +02:00
preinit Avoid conflicts between 2017 wikitext editor and DiscussionTools new topic tool 2021-07-28 16:10:22 +02:00
tests Revert "Hide deprecated parameters if they don't have a value" 2021-08-03 08:24:24 +00:00
themes doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ui Merge "Better name for ambiguous "empty" concept in the model" 2021-08-09 09:40:40 +00:00