Page MenuHomePhabricator

PagePreviews sending "dwelledButAbandoned" after "opened"
Closed, ResolvedPublic2 Story Points

Description

  1. Visit a page where you have two links.
  2. Hover over the first link and wait until a preview is shown.
  3. Ctrl (Cmd) click the link or preview to open it in a background tab. Notice that the "opened" is sent. I got data that looks like this:
{ action: "opened", hovercardsSuppressedByGadget: false, isAnon: true, linkInteractionToken: "78aa287599a133ba", namespaceIdSource: 0, pageIdSource: 305, pageTitleSource: "1", pageToken: "b2e294b492296b45", popupEnabled: true, previewCountBucket: "21+ previews", sessionToken: "423642141808eba6", totalInteractionTime: 2951 }
  1. Hover over the other link and notice that a "dwelledButAbandoned" event for the previous link is sent. This is the data I got:
{"pageTitleSource":"1", "namespaceIdSource":0, "pageIdSource":305, "isAnon":true, "popupEnabled":true, "pageToken":"b2e294b492296b45", "sessionToken":"423642141808eba6", "hovercardsSuppressedByGadget":false, "previewCountBucket":"21+ previews", "totalInteractionTime":null, "action":"dwelledButAbandoned"}"
  1. An "opened" event for the second link is also sent as expected. The data I got is:
{"pageTitleSource":"1", "namespaceIdSource":0, "pageIdSource":305, "isAnon":true, "popupEnabled":true, "pageToken":"b2e294b492296b45", "sessionToken":"423642141808eba6", "hovercardsSuppressedByGadget":false, "previewCountBucket":"21+ previews", "action":"opened", "linkInteractionToken":"744e8c9c86a0cb41", "totalInteractionTime":3185}"

Expected: No "dwelledButAbandoned" event is sent in step 4.

Event Timeline

Restricted Application added a subscriber: Aklapper. · View Herald TranscriptApr 13 2017, 5:47 PM

@Jdlrobson: Just a heads up that this is a – really great write up – of a bug that both @Jhernandez and @Tbayer have spoken about during Reading-Web-Sprint-95. Perhaps it's better to think of T159490: PagePreviews events system sends duplicate and incorrect events as the parent task to this task.

Change 348321 had a related patch set uploaded (by Phuedx):
[mediawiki/extensions/Popups@master] reducers: Make LINK_CLICK finalize but not close

https://gerrit.wikimedia.org/r/348321

ovasileva triaged this task as High priority.Apr 17 2017, 1:33 PM

Just saw there's a patch up already...

Change 348321 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] reducers: Make LINK_CLICK finalize but not close

https://gerrit.wikimedia.org/r/348321

phuedx assigned this task to bmansurov.Apr 18 2017, 11:08 AM
phuedx moved this task from Ready for Signoff to Needs QA on the Reading-Web-Sprint-95 board.

^ I'd appreciate someone going over this again just to exercise the fix.

phuedx set the point value for this task to 2.Apr 18 2017, 11:09 AM
bmansurov removed bmansurov as the assignee of this task.Apr 18 2017, 2:49 PM
bmansurov moved this task from Needs QA to To Do on the Reading-Web-Sprint-95 board.

The problem is still showing up when tested against the master branch.

phuedx claimed this task.Apr 18 2017, 5:13 PM
phuedx moved this task from To Do to Doing on the Reading-Web-Sprint-95 board.

Change 348780 had a related patch set uploaded (by Phuedx):
[mediawiki/extensions/Popups@master] WIP

https://gerrit.wikimedia.org/r/348780

rEPOPed1fc3d2e10a: WIP just needs a commit message…

Change 348789 had a related patch set uploaded (by Phuedx):
[mediawiki/extensions/Popups@master] reducers: Don't destroy interaction on LINK_CLICK

https://gerrit.wikimedia.org/r/348789

Change 348790 had a related patch set uploaded (by Phuedx):
[mediawiki/extensions/Popups@master] actions: Conditionally dispatch ABANDON_*

https://gerrit.wikimedia.org/r/348790

OK. I split the change into two, the former fixing a regression in rEPOP56aeeccb0ddc: reducers: Make LINK_CLICK finalize but not close.

Change 348789 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] reducers: Don't destroy interaction on LINK_CLICK

https://gerrit.wikimedia.org/r/348789

Change 348790 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] actions: Conditionally dispatch ABANDON_*

https://gerrit.wikimedia.org/r/348790

phuedx removed phuedx as the assignee of this task.Apr 19 2017, 5:40 AM

Quoting @bmansurov's testing notes from his review:

"dwelledButAbandoned" is not being dispatched after the "opened" event when I Ctrl+Click a link and hover over another link.

phuedx assigned this task to Jdlrobson.EditedApr 19 2017, 8:31 AM

^ Might be useful when signing this task off. Over to you @Jdlrobson!

Change 348780 abandoned by Phuedx:
WIP

Reason:
Superseded by Ia03e719c.

https://gerrit.wikimedia.org/r/348780

As noted in standup, I'm not planning on signing this off until T161769 and T163198 and other Popups/EventLogging issues are resolved. I'd like to see the dust settle before running through these steps.

Jdlrobson reassigned this task from Jdlrobson to pmiazga.Apr 26 2017, 5:08 PM

Piotr will sign this off.

Tested on beta cluster, Popups now sends only one opened event. I couldn't reproduce sending both opened and dwelledButAbandoned. Marking this task as resolved.

pmiazga closed this task as Resolved.Apr 27 2017, 12:49 AM