From 133263cec85a58f198d9f5b9889c783cb75ffb1a Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 21 Jun 2015 10:24:30 +0100 Subject: [PATCH] [Redesign] Render full priority names on Maniphest icons Summary: Ref T8099, Adds more infomation to the icon in Maniphest Task Lists. Test Plan: Hover over icons in a Maniphest Task Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T8099 Differential Revision: https://secure.phabricator.com/D13367 --- src/applications/maniphest/view/ManiphestTaskListView.php | 8 +++++++- src/view/phui/PHUIObjectItemView.php | 2 +- 2 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/applications/maniphest/view/ManiphestTaskListView.php b/src/applications/maniphest/view/ManiphestTaskListView.php index 799bb0ae38..dc1e5288ce 100644 --- a/src/applications/maniphest/view/ManiphestTaskListView.php +++ b/src/applications/maniphest/view/ManiphestTaskListView.php @@ -50,6 +50,7 @@ final class ManiphestTaskListView extends ManiphestView { $status_map = ManiphestTaskStatus::getTaskStatusMap(); $color_map = ManiphestTaskPriority::getColorMap(); + $priority_map = ManiphestTaskPriority::getTaskPriorityMap(); if ($this->showBatchControls) { Javelin::initBehavior('maniphest-list-editor'); @@ -69,6 +70,10 @@ final class ManiphestTaskListView extends ManiphestView { } $status = $task->getStatus(); + $pri = idx($priority_map, $task->getPriority()); + $status_name = idx($status_map, $task->getStatus()); + $tooltip = pht('%s, %s', $status_name, $pri); + // TODO: redesign-2015 move icon map to maniphest.statuses $icon = 'fa-exclamation-circle '; $icon .= idx($color_map, $task->getPriority(), 'grey'); @@ -76,7 +81,8 @@ final class ManiphestTaskListView extends ManiphestView { $item->setDisabled(true); $icon = 'fa-check-square-o grey'; } - $item->setStatusIcon($icon, idx($status_map, $task->getStatus())); + + $item->setStatusIcon($icon, $tooltip); $item->addIcon( 'none', diff --git a/src/view/phui/PHUIObjectItemView.php b/src/view/phui/PHUIObjectItemView.php index ba0998e282..b545aa1cd6 100644 --- a/src/view/phui/PHUIObjectItemView.php +++ b/src/view/phui/PHUIObjectItemView.php @@ -672,7 +672,7 @@ final class PHUIObjectItemView extends AphrontTagView { if (strlen($label)) { $options['sigil'] = 'has-tooltip'; - $options['meta'] = array('tip' => $label); + $options['meta'] = array('tip' => $label, 'size' => 300); } return javelin_tag('div', $options, $icon);