mediawiki-extensions-Visual.../modules/ve-mw/dm/models
Máté Szabó d127dc48b7 ve.dm.MWTemplateModel: Don't add spurious empty parameters
Make ve.dm.MWTemplateModel#serialize ignore empty parameters if they were not
present in the transclusion before the edit. This avoids dirty diffs where an
user edits a template transclusion via VisualEditor, and the editor adds all
available template parameters to the edit wikitext, even if they were not
changed during the edit.

This logic was ported from the old Wikia-WMF VisualEditor project.[1]

Additionally, add tests for ve.dm.MWTemplateModel serialization.

---
[1] https://github.com/Wikia/app/pull/6450/commits/858eaa9

Bug: T101075
Change-Id: I35f8812724658904d30034db4e4684193a661c1e
2020-11-16 19:54:44 +01:00
..
ve.dm.MWImageModel.js Don't set alt text if attribute was originally 'null' 2020-10-04 17:57:02 +01:00
ve.dm.MWParameterModel.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.MWTemplateModel.js ve.dm.MWTemplateModel: Don't add spurious empty parameters 2020-11-16 19:54:44 +01:00
ve.dm.MWTemplatePlaceholderModel.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.MWTemplateSpecModel.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00
ve.dm.MWTransclusionContentModel.js Fix copy-paste mistake in MWTransclusionContentModel 2020-09-09 10:31:27 +02:00
ve.dm.MWTransclusionModel.js Use autogenerated parameter info for templates without TemplateData 2020-01-31 13:43:56 +01:00
ve.dm.MWTransclusionPartModel.js doc: Bump copyright year for 2020 2020-01-08 09:13:24 -08:00