Page MenuHomePhabricator

Improve pointer alignment of reference preview popup
Closed, ResolvedPublic2 Estimated Story Points

Description

Motivation
Currently, the pointer of the referencePreviews popup seems to align with the location of the cursor upon hovering a link. In page previews, this makes sense because links can be long (and I assume it would feel weird if the pointer element was just pointing to the middle of the word, rather than near your cursor). However in the case of reference previews, where the link is typically quite short, we get situations like this:

refpreviewspointer.png (1×944 px, 329 KB)

Acceptance Criteria

  • The popup pointer always clearly indicates which link it is pointing to, even if the link is small and followed by another small link

Ideas how to solve this:

  • If a link-to-be-previewed is smaller than TODO (I would expect roughly the size of brackets with a 2 or 3 digit number in it), the pointer of the popup is centered on the link.
  • Find a better balance (if there is) between cursor gravity and link-center gravity

Notes
There was already a ticket about that topic, with general fixing: T215194: [Bug] Pointer is incorrectly aligned for some references

Event Timeline

WMDE-Fisch set the point value for this task to 5.Mar 6 2019, 1:25 PM

Change 496765 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/Popups@master] Improve popup pointer positioning

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

Change 496765 had a related patch set uploaded (by Andrew-WMDE; owner: Andrew-WMDE):
[mediawiki/extensions/Popups@master] Improve popup pointer positioning

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

WMDE-Fisch changed the point value for this task from 5 to 2.

Change 496765 merged by jenkins-bot:
[mediawiki/extensions/Popups@master] Improve popup pointer positioning

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