Page MenuHomePhabricator

No popup is shown when quickly hovering the same link twice
Open, HighPublic5 Story Points

Description

The German-Community-Wishlist team continues to run into an issue that feels more and more like it might be an actual blocker for several tasks we would like to work on, most notably T214693: Investigate why Page and Reference Previews interfere when footnote comes right behind link on English Beta Wikipedia, as well as T218765: Show referencePreviews on click.

Steps to reproduce: When quickly hovering a link to a page, leave the link, and quickly hover it again within the time limit of less than a second, no popup will be shown. We found this is always reproducible.

Chain of events:

  • When hovering the link for the first time, one gets a "link dwell" event, as expected.
  • Let the mouse quickly leave the link. This stops everything and triggers an "abandon start" event.
  • When the mouse re-enters the link quick enough, the next event will be a second "link dwell". This will get a new token. The new token will make the code throw this second "link dwell" away, because it happens to touch the same link as the first "link dwell" and the code acts like the first "link dwell" will still be executed. But it won't.
  • The "abandon start" from before was not finished yet, and did not got stopped. It triggers an "abandon end".
  • No popup will ever appear.

Code responsible for this behavior:

There are probably several ways to fix this issue by changing one of the lines of code listed above.

Patch-For-Review:

Event Timeline

Restricted Application added a subscriber: APerson. · View Herald TranscriptMar 27 2019, 6:27 PM

Change 488098 had a related patch set uploaded (by Thiemo Kreuz (WMDE); owner: Thiemo Kreuz (WMDE)):
[mediawiki/extensions/Popups@master] Fix action reducer forgetting *all* duplicate dwell actions

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

thiemowmde triaged this task as High priority.Mar 27 2019, 6:29 PM
thiemowmde moved this task from Backlog to Bugs on the Navigation-Popups board.
thiemowmde added a subscriber: Jdlrobson.

@thiemowmde, should this be assigned to you? It looks like you already have a patch with some feedback.

We are investigating this. But since this is about code none of us here at WMDE wrote, we would love if your team could pick this task up.

Over to @ovasileva for scheduling :]

I'm pretty sure this is a duplicate of a bug we declined

Or possibly I'm thinking of T154923

Change 500702 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Popups@master] Add browser tests for quickly hovering links

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

Change 500702 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Popups@master] Add browser tests for quickly hovering links
https://gerrit.wikimedia.org/r/500702

The above adds a browser test that tests what the expected behavior described in this ticket would be.

WMDE-Fisch added a comment.EditedApr 2 2019, 4:29 PM

Change 500702 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Popups@master] Add browser tests for quickly hovering links
https://gerrit.wikimedia.org/r/500702

The above adds a browser test that tests what the expected behavior described in this ticket would be.

FYI: The https://gerrit.wikimedia.org/r/488098 patch seems to fix the issue, at least the test is fine when I rebase it accordingly.

Edit: I totally linked the wrong patch here first

WMDE-Fisch set the point value for this task to 3.
WMDE-Fisch moved this task from Backlog to Review on the WMDE-QWERTY-Season-Sprint-2019-03-20 board.
Jdlrobson moved this task from Product Owner Backlog to Upcoming on the Readers-Web-Backlog board.EditedApr 4 2019, 4:11 PM

@ovasileva the patch for this looks simple, but I'd like you to confirm this is the desired behaviour and if so schedule some time to reviewing/QAing this. Maybe "upcoming" column is a better place for that to happen?

Friendly ping to @ovasileva for scheduling. WMDE has a patch for this but the comments in the patch indicate it may need additional work.

ovasileva changed the point value for this task from 3 to 5.May 2 2019, 5:22 PM
ovasileva moved this task from Upcoming to Product Owner Backlog on the Readers-Web-Backlog board.

Discussed with @Lea_WMDE. As this is high priority for reference previews deployments, I'm moving this back to upcoming and will discuss pulling into the sprint board next grooming.

pmiazga claimed this task.May 20 2019, 5:10 PM

Will review it today/tomorrow.

pmiazga removed pmiazga as the assignee of this task.Jun 10 2019, 5:09 PM
pmiazga added a subscriber: pmiazga.

Dear Readers-Web-Backlog team, I'm just wondering what the status is on the ticket?
Thanks,
Lea

Hey @Lea_WMDE, sorry, I should be more transparent on the phab ticket. I kept the task in doing for some time as I wanted to work on the issue. Proposed solution caused some problems (If I remember right, system was sending an API request everytime link was hovered). Sadly I couldn't find time for it so I moved it back to "to do", to mark it that I'm not working on it.