This task is about implementing an event that should log instances when people are prevented from switching from the Reply tool's `source` mode to the `visual` mode.
=== Background
T256150 implements a new dialog that will prevent people from switching from the Reply tool's `source` mode to its `visual` mode if the comment they've drafted contains a template //or// a table.
This task will help us understand how often people are encountering this dialog/interrupt and subsequently inform how we prioritize implementing the new multi-line comment syntax that will be decided up on in T246960.
=== Timing
We would like for this event to be named, implemented and tested by 4-August-2020.
=== Requirements
- An event is fired and logged that will enable to us to know:
-- A) When people encounter the dialog T256150 implements
-- B) What content – a template or a table – causes people to encounter the dialog T256150 implements
=== Open questions
- [x] 1. What should this event be called?
- [x] 2. What schema should this event be stored in?
| Event | Event name | Schema
|---|---|---
| Person tries to switch to the Reply Tool's `visual` mode after writing a **template** in its `source` mode|`dialog-prevent-template-show` |[VisualEditorFeatureUse](https://meta.wikimedia.org/wiki/Schema:VisualEditorFeatureUse)
| Person tries to switch to the Reply Tool's `visual` mode after writing a **table** in its `source` mode|`dialog-prevent-table-show` |[VisualEditorFeatureUse](https://meta.wikimedia.org/wiki/Schema:VisualEditorFeatureUse)
=== Done
- [x] "Open questions" are answered
- [ ] Pre-deployment QA is completed
- [ ] "Requirements" are implemented
- [ ] New events are added to the [VisualEditor/Feature use data dictionary](https://www.mediawiki.org/wiki/VisualEditor/FeatureUse_data_dictionary)