1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-28 00:10:57 +01:00
phorge-phorge/webroot/rsrc/js/application
Anh Nhan Nguyen dbcd38aa88 Fix the attempt of graceful alignment for Hovercards
Summary:
Refs T1048; Fixes T2902 - (Probably) fixes @vrana's issue. I managed
to repro it on Ubuntu FF (though on Windows with 1.0GHz/512MB it's
really worse...).

This revises the approach to the graceful degradation for
`too-far-to-the-screen-edge-edge-case`.

I noticed that `x` could become very negative, up to about ~`-170px`.
This is due to the //"already-on-the-left-side"// nature of object tags.
`50 - 200 - 20` = `negative`. Adding `100px` (node.dimension.x / 4) to
that won't really help, as the hovercard would still be offscreen.

Instead, display them left-aligned with the object tags on the left edge
per default, and offer centerization in center cases. This is also better
for Pholio, Phriction, which have a way lower min-x than Maniphest,
Differential.

I also disabled placing the hovercard below the tag in case there's not
enough space on the north side. The hovercard would not display 99.99% of
the times after being hidden (and it retains the flickering behaviour).
Another reason is also our current hide-behaviour, which only assumes
north-side alignment. Adding south-side didn't really work (I'm bad with
JS), so I didn't bother with it. Disabling this is //acceptable//, since
it only really affects Pholio, Phriction. And nobody places object tags
in the first line, anyway. Except for my test pages, of course :/

Btw, this also removes the weird jaggy horizontal shifts for object of
various lengths (e.g. `{D4356}`, `{rP32ofhw0842obw}` etc.). I think
that's only good.

Test Plan:
Hovered in Pholio, Phriction in Chrome, FF. Did not touch
left screen border.

Hovered in Maniphest, Differential. Tags farther to the left were
aligned left, tags more in the center were pretty centered.

Reviewers: epriestley, vrana

Reviewed By: epriestley

CC: aran, Korvin

Maniphest Tasks: T1048, T2902

Differential Revision: https://secure.phabricator.com/D5612
2013-04-07 18:10:53 -07:00
..
aphlict Add loading state to notification menu. 2013-01-28 17:35:17 -08:00
conpherence Further corrections to Conpherence updates 2013-04-02 11:27:58 -07:00
core Fix the attempt of graceful alignment for Hovercards 2013-04-07 18:10:53 -07:00
countdown Make countdowns (internally) embeddable 2012-08-14 19:19:23 -07:00
differential Add a preference to completely disable the file tree 2013-02-04 17:00:27 -08:00
diffusion Load blame in Diffusion by AJAX 2013-03-06 07:44:45 -08:00
herald Clean up Login, Responsive Forms 2013-01-19 14:30:26 -08:00
maniphest Include "Add CCs" and "Remove CCs" to batch editor 2013-04-05 10:34:44 -07:00
owners Allow excluding paths from package 2012-12-07 16:33:16 -08:00
phame Modernize blog UI 2012-10-15 14:50:12 -07:00
pholio Remarkup allows to point a specific image in a Mock set 2013-03-14 09:38:56 -07:00
phortune Phortune v0.1: add payment methods 2013-03-28 09:11:42 -07:00
phriction Add a document preview to Phriction 2011-07-16 18:48:27 -07:00
ponder Simplify upvote/downvote implementation 2012-09-30 20:12:35 -07:00
projects Allow commits to be associated with projects and associated goodies 2012-08-08 10:03:41 -07:00
releeph Releeph (Phabricator part) 2013-03-15 11:28:43 +00:00
repository Allow double click and drag in crossreference 2013-02-21 09:56:27 -08:00
transactions Make control + enter submit forms if a textarea is focused 2013-01-28 14:11:32 -08:00
uiexample Add support for device swipe events 2013-03-09 13:53:15 -08:00