Workflows
There are many different ways that templates may be accidentally deleted. This ticket documents the different workflows and marks which ones need warnings (and follow-up tickets).
Where/When | What content | How | Warning? |
VE article editing screen | Any existing template or multi-part template content | Click on template and click delete button OR click on template and press backspace | |
VE template dialog | Inserting a new template, at least one parameter has a value | Click on back button | [x] Confirm lose data and template T272355 |
VE template dialog | Editing an existing template, at least one edit is made | Click on close button | [ ] Confirm lose changes T297792 |
VE template dialog | Editing a multi-part template, existing or new | Delete one part (template or wikitext with values/content) with trashcan in toolbar or with shortcut Ctrl Del | Deprioritized, not implementing now |
Background
Onwiki feedback
Reported on https://meta.wikimedia.org/wiki/Talk:WMDE_Technical_Wishes/Removing_a_template_from_a_page_using_the_VisualEditor
"It is sometimes too easy to remove large templates without any confirmation. This is a frequent problem in Russian Wikipedia, for example, where the new users would delete the filled infobox template, for example, and not notice that they’ve done this because the shortcuts for template deletion are extremely common in VE.
My uneducated guess would be that the newcomers editing the lead section press Backspace, since infoboxes are placed before the article text, and do not notice that a large template was just removed by them, and then (usually) get reverted. It’s a common problem for any non-inline template (meaning templates that use block-level HTML elements, not "format": "block" in TD), with editors also inadvertently deleting navboxes etc., but I’m not sure how to formalise the generic solution for it other than ‘stop deletion of big templates without a confirmation’.
Some edits that might illustrate that: