1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-22 23:02:42 +01:00

Keep hovercards on screen a little harder

Summary: Ref T8980. This calculation was not quite right and you could sneak one off screen if you tried carefully.

Test Plan: Couldn't sneak one off screen anymore.

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T8980

Differential Revision: https://secure.phabricator.com/D14880
This commit is contained in:
epriestley 2015-12-24 12:33:13 -08:00
parent e88dbbe1b1
commit 8025bc6432
3 changed files with 14 additions and 13 deletions

View file

@ -8,7 +8,7 @@
return array(
'names' => array(
'core.pkg.css' => 'a419cf4b',
'core.pkg.js' => '3c8757c8',
'core.pkg.js' => '2a50ac55',
'darkconsole.pkg.js' => 'e7393ebb',
'differential.pkg.css' => '2de124c9',
'differential.pkg.js' => '64e69521',
@ -452,7 +452,7 @@ return array(
'rsrc/js/core/DragAndDropFileUpload.js' => 'ad10aeac',
'rsrc/js/core/DraggableList.js' => 'a16ec1c6',
'rsrc/js/core/FileUpload.js' => '477359c8',
'rsrc/js/core/Hovercard.js' => 'cb696bed',
'rsrc/js/core/Hovercard.js' => '88e3466d',
'rsrc/js/core/KeyboardShortcut.js' => '1ae869f2',
'rsrc/js/core/KeyboardShortcutManager.js' => 'c1700f6f',
'rsrc/js/core/MultirowRowManager.js' => 'b5d57730',
@ -747,7 +747,7 @@ return array(
'phabricator-file-upload' => '477359c8',
'phabricator-filetree-view-css' => 'fccf9f82',
'phabricator-flag-css' => '5337623f',
'phabricator-hovercard' => 'cb696bed',
'phabricator-hovercard' => '88e3466d',
'phabricator-hovercard-view-css' => '1239cd52',
'phabricator-keyboard-shortcut' => '1ae869f2',
'phabricator-keyboard-shortcut-manager' => 'c1700f6f',
@ -1461,6 +1461,13 @@ return array(
'javelin-stratcom',
'javelin-dom',
),
'88e3466d' => array(
'javelin-install',
'javelin-dom',
'javelin-vector',
'javelin-request',
'javelin-uri',
),
'88f0c5b3' => array(
'javelin-behavior',
'javelin-dom',
@ -1812,13 +1819,6 @@ return array(
'javelin-stratcom',
'phabricator-phtize',
),
'cb696bed' => array(
'javelin-install',
'javelin-dom',
'javelin-vector',
'javelin-request',
'javelin-uri',
),
'ccf1cbf8' => array(
'javelin-install',
'javelin-dom',

View file

@ -265,7 +265,8 @@ final class ManiphestTaskDetailController extends ManiphestController {
->execute();
foreach ($commit_phids as $phid) {
$revisions_commits[$phid] = $handles->renderHandle($phid);
$revisions_commits[$phid] = $handles->renderHandle($phid)
->setShowHovercard(true);
$revision_phid = key($drev_edges[$phid][$commit_drev]);
$revision_handle = $handles->getHandleIfExists($revision_phid);
if ($revision_handle) {
@ -273,7 +274,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
unset($edges[$task_drev][$revision_phid]);
$revisions_commits[$phid] = hsprintf(
'%s / %s',
$revision_handle->renderLink($revision_handle->getName()),
$revision_handle->renderHovercardLink($revision_handle->getName()),
$revisions_commits[$phid]);
}
}

View file

@ -109,7 +109,7 @@ JX.install('Hovercard', {
// If the card is near the top of the window, show it beneath the
// link we're hovering over instead.
if ((y + margin) < s.y) {
if ((y - margin) < s.y) {
y = p.y + d.y + margin;
self._alignment = 'south';
}