WMDE is going to be tackling adding references to Popups.
In preparation for that work, Extension:Popups needs to know about multiple preview types (page preview, the current one, and in the future reference preview).
Notes | AC
- Multiple types of previews are supported by the frontend system
- Links are categorized appropriately in title.js
- Right now it only returns title if it is a page preview, should return something like {type, ...payload}, payload being the information needed for the preview
- For example, a page preview link could return {type: 'PAGE_PREVIEW', title: mw.Title}, and in the future a reference link could return {type: 'REFERENCE', id: '...'}
- Right now it only returns title if it is a page preview, should return something like {type, ...payload}, payload being the information needed for the preview
- The information should be passed through the actions when the DOM events happen
- Links are categorized appropriately in title.js
- Analytics
- statsv logging should only be sending events for the preview type PAGE_PREVIEW, so that the dashboard and the API info stays useful and focused on page previews
- EL schemas need to include the type of link in a field so that the preview events can be filtered as needed for analytics analysis
- The event logging events should include the preview type sent
- Tests still passing, new code is unit tested
See also T109796 which talks through various other possible ways Page previews may want to be used.