HomePhabricator

Smarter setting of the "gravity" of tooltips

Authored by WMDE-leszek on Jul 22 2016, 1:00 PM.

Description

Smarter setting of the "gravity" of tooltips

This adjusts the position of the tooltip depending on what is the
position of the related revision bar in the plot, and on the
size of the contents of the tooltip.

This change makes the tooltip be always displayed below
the revision plot, so it is visible to the user no matter if there is
enough (visible) space above the plot.
Also now it is checked if there is enough space on the left and right
side of the browser window to display the tooltip centered horizontally.
If not, this adjusts the horizontal position of the tooltip so that
it does not get shown outside of the window.
The latter in particular improves displaying of longer edit
summaries in RTL mode. Apparently LTR-centered browsers took care
of not showing the tooltip outside the right edge of the window
but in the case of left edge the tooltip could run outside of the window
leaving a part of summary not visible to the user without scrolling.

Bug: T141071
Bug: T141093
Change-Id: I8d519c5fd42d8403b527fa97d72a5c46991fc27b

Details

Committed
WMDE-leszekJul 25 2016, 10:14 AM
Parents
rERSL23348bae7457: Fix naming issues in some messages
Branches
Unknown
Tags
Unknown
References
refs/changes/41/300541/2
ChangeId
I8d519c5fd42d8403b527fa97d72a5c46991fc27b