Page MenuHomePhabricator

Change delay for appearance of ReferencePreviews to 150ms
Closed, ResolvedPublic3 Story Points

Description

Current situation
Currently, reference previews only appear after quite some time (350 ms) of hovering. While for Page-Previews the delay works well, the much smaller Reference Previews (that often appear right after each other) benefit from a shorter time span. Especially, since reference targets are much smaller than page preview targets, and therefore less prone to accidental hovers, it makes sense to render the preview almost right away.

See also comment in T214693#4924357

Acceptance Criteria

  • The delay for the appearance of reference previews is reduced to 150 ms.
  • The delay for the appearance of page previews stays at its current rate.

Notes

  • The delay is about waiting until the popup is being shown. Thus it does not matter whether you have been before.
  • This ticket is independent from the bug that sometimes no popup appears if you hover too quickly between preview types
  • The code is built in a way that we are never seeing empty popups, in the worst case the popup just takes a bit longer too appear
  • The ticket is not about the popup to disappear faster, but about the popup appearing faster

Event Timeline

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

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

Jdlrobson added subscribers: alexhollender, Jdlrobson.

This is actually by design after much scrutiny. The time delays were carefully argued and chosen (T70861 has some background). Please can I request that you do not make any changes to the link interaction timing / display behaviour without consulting @alexhollender first.

I think this is a duplicate of T202934.

After speaking with @Nirzar, who worked on determining the delay for page previews, we agree that the use case for reference previews is a bit different and therefore a different delay time is appropriate. Starting with the reasons why page previews has an artificial delay (beyond what might be necessary to load the content):

  1. Because page links are clickable elements, so if someone was just trying to click it the preview might be annoying
  2. Sometimes people hovering their mouse over words while reading, and unwanted pop ups are annoying (this was tested with abandoned rate and timings)
  3. addition details in this blog post: How we designed page previews for Wikipedia — and what could be done with them in the future

Since these circumstances do not apply to reference links, plus we know that in some cases there will be consecutive, side-by-side reference links that users want to move between relatively quickly, I think it makes sense to set a shorter delay for reference previews. I tried some different delay settings on the reference gadget and something between 150–200ms feels good (assuming we can load the content that quickly).

We should also discuss how the previews will load over slower connections.

Lea_WMDE renamed this task from Quickly moving and hovering links hinders popup creation to Change delay for ReferencePreviews to 150ms .Feb 20 2019, 9:16 AM
Lea_WMDE triaged this task as Normal priority.
Lea_WMDE updated the task description. (Show Details)
Lea_WMDE updated the task description. (Show Details)Feb 26 2019, 2:29 PM
Lea_WMDE set the point value for this task to 5.

Change 494702 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/Popups@master] Change delay for ReferencePreviews to 150ms

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

WMDE-Fisch changed the point value for this task from 5 to 3.
WMDE-Fisch moved this task from Sprint Backlog to Review on the WMDE-QWERTY-Sprint-2019-03-06 board.
WMDE-Fisch moved this task from Ready for pickup to Doing on the Reference Previews board.

Change 495680 had a related patch set uploaded (by WMDE-Fisch; owner: WMDE-Fisch):
[mediawiki/extensions/Popups@master] Move getPreviewType form gateway to model

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

Quickly move the mouse over a link so it just briefly touches the link, leave the link and quickly move back on the link: No popup will be shown, even if you longer dwell for longer. The movement needs to happen in between the ABANDON_END_DELAY 300 ms to show that effect.

This is a bug, already being worked on in https://gerrit.wikimedia.org/r/488098. How did this ended here in this tasks description? It should not be a requirement to somehow work around this bug to make it less of a pain or something. We should fix it. The reduced delay on the other hand should not have anything to do with this.

Quickly move the mouse over a link so it just briefly touches the link, leave the link and quickly move back on the link: No popup will be shown, even if you longer dwell for longer. The movement needs to happen in between the ABANDON_END_DELAY 300 ms to show that effect.

This is a bug, already being worked on in https://gerrit.wikimedia.org/r/488098. How did this ended here in this tasks description? It should not be a requirement to somehow work around this bug to make it less of a pain or something. We should fix it. The reduced delay on the other hand should not have anything to do with this.

Now that you mention it, this really is a bit weird. The ticket became something different in the meantime it seems and the thing being worked on not at all part of the bug described at the beginning. Let's untangle that in the story time tomorrow.

Change 494702 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Change delay for ReferencePreviews to 150ms

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

Change 495680 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Move getPreviewType form gateway to model

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

Lea_WMDE renamed this task from Change delay for ReferencePreviews to 150ms to Change delay for appearance of ReferencePreviews to 150ms .Mar 12 2019, 4:16 PM
Lea_WMDE updated the task description. (Show Details)
thiemowmde updated the task description. (Show Details)Mar 13 2019, 8:33 AM
Lea_WMDE closed this task as Resolved.Mar 20 2019, 2:42 PM
Lea_WMDE moved this task from Demo to Done on the WMDE-QWERTY-Sprint-2019-03-06 board.