This task involves the work of adding the instrumentation necessary to know (with some relative certainty) which (if any) edit suggestions someone saw within the course of a visual editor edit session.
Knowing the above will enable us to interpret downstream behaviors (e.g. suggestion engagement, suggestion prevalence) in ways that account for whether someone is likely to have seen the suggestion in question.
Requirements
Meta
The yet-to-be defined "Instrumentation spec" (below) ought to enable the Editing Team to know the following...
- Did a suggestion enter someone's viewport?
- [nice to have] What percentage of a suggestion was visible within someone's viewport?
- What type of suggestion enter someone's viewport?
- What state was the suggestion in when it entered someone's viewport (expanded // collapsed)?
Instrumentation spec
- Event logged on the first time a suggestion or check instance is visible within VisualEditor, with the following definitions:
- Instance: a single rendered suggestion/check associated with specific content within an edit session.
- Visibility during edit (desktop): any portion of the expanded suggestion/check is visible in the viewport.
- Visibility during edit (mobile): the suggestion/check card appears in the drawer.
- Specifically, "gutter icon visible" should not count as "suggestion visible".
- Visibility in pre-save (desktop and mobile): any time a suggestion/check is paged to.
- Events include information on the type of suggestion/check.
Done
- Editing Eng + PM align on an instrumentation spec
- Editing Engineering implements spec
- @MNeisler reviews and provides feedback on initial implementation
- Editing Engineering implements feedback from Megan
- Editing QA verifies events are being emitted
- PA verifies events are being logged in back-end