From 0ea5d668d1d40c5e605fa838545fd88a636d15ba Mon Sep 17 00:00:00 2001 From: epriestley Date: Wed, 4 Oct 2017 10:54:42 -0700 Subject: [PATCH] Enable hovercards for the "Task Graph" UI in Maniphest Summary: See PHI118. Enables hovercards to support peeking at tags and other details if you, e.g., create numerous identical subtasks of each task. Test Plan: {F5210816} Reviewers: amckinley Reviewed By: amckinley Differential Revision: https://secure.phabricator.com/D18681 --- src/infrastructure/graph/ManiphestTaskGraph.php | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) diff --git a/src/infrastructure/graph/ManiphestTaskGraph.php b/src/infrastructure/graph/ManiphestTaskGraph.php index 24e463e273..99191760dd 100644 --- a/src/infrastructure/graph/ManiphestTaskGraph.php +++ b/src/infrastructure/graph/ManiphestTaskGraph.php @@ -27,6 +27,8 @@ final class ManiphestTaskGraph protected function newTableRow($phid, $object, $trace) { $viewer = $this->getViewer(); + Javelin::initBehavior('phui-hovercards'); + if ($object) { $status = $object->getStatus(); $priority = $object->getPriority(); @@ -51,15 +53,16 @@ final class ManiphestTaskGraph $assigned = phutil_tag('em', array(), pht('None')); } - $full_title = $object->getTitle(); - - $link = phutil_tag( + $link = javelin_tag( 'a', array( 'href' => $object->getURI(), - 'title' => $full_title, + 'sigil' => 'hovercard', + 'meta' => array( + 'hoverPHID' => $object->getPHID(), + ), ), - $full_title); + $object->getTitle()); $link = array( phutil_tag(