Page MenuHomePhabricator

Set up Extension:Popups to support multiple preview types
Closed, ResolvedPublic


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: '...'}
    • The information should be passed through the actions when the DOM events happen
  • 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.

Event Timeline

@ovasileva This is a technical task to adapt the base so that WMDE can start working on their references part, as we discussed on the meeting before all hands.

Will require technical sign-off, maybe QA to verify nothing was broken.

ovasileva triaged this task as Medium priority.Feb 1 2018, 4:22 PM

Thanks for setting this up @Jhernandez

Jdlrobson added a subscriber: Jdlrobson.

This seems quite well defined and I think ready to be talked about. I think T165036 would help this a lot and should be a precursor so adding that as a dependency.

decided to hold on estimating until we can have a conversation with WMDE on specifics

We also have to refactor the VirtualPagePreviews stuff to be triggered only for page previews.

We spent some time at the hackathon showing how this might work. We actually have multiple preview types - disambiguation and normal cards. It's possible as a result of that discussion and that fact that this task is no longer necessary.

@thiemowmde what do you need from us here (if anything?)

Thanks for asking, @Jdlrobson! The learnings from the Hackathon are all documented in Please leave additional comments there if you have some, that would be super-helpful!

Currently we are focusing on Move-Files-To-Commons and don't have capacities to work on wishes that involve the Popups extension. But we plan to come back to this rather soon.

As for this task: What I learned during the Hackathon gave me the impression we are not going to need what this ticket describes. Or more precisely: we will need pretty much exactly what is described here, but it looks like we can do all this ourself as part of our sprint work, and don't need you to change any infrastructure. During the Hackathon we agreed the code for a first MVP should be added directly to the Popups extension codebase. If this sounds fine for you, you can close this ticket, or leave it open for us to work with.

thiemowmde claimed this task.

Yes! We are currently in Beta, and plan to roll it out as a default feature within the next months.