From 9d3f8117e738dc43cc743f608a923217cfb91c4e Mon Sep 17 00:00:00 2001 From: Chad Little Date: Tue, 22 Apr 2014 14:24:36 -0700 Subject: [PATCH] More resilient timeline icon layout Summary: center aligns the icons in the fill area, removes some of the positioning jank. Also set new icons for maniphest custom. Test Plan: test desktop and mobile layouts, tested thin pins for proper centering. Reviewers: epriestley Reviewed By: epriestley Subscribers: epriestley, Korvin Maniphest Tasks: T4866 Differential Revision: https://secure.phabricator.com/D8839 --- resources/celerity/map.php | 4 ++-- .../storage/DifferentialTransaction.php | 6 +++--- .../config/PhabricatorManiphestConfigOptions.php | 6 +++--- .../maniphest/storage/ManiphestTransaction.php | 3 +-- webroot/rsrc/css/phui/phui-timeline-view.css | 14 +++++--------- 5 files changed, 14 insertions(+), 19 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 6c47792f4b..fd0da54843 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -144,7 +144,7 @@ return array( 'rsrc/css/phui/phui-status.css' => '2f562399', 'rsrc/css/phui/phui-tag-view.css' => '295d81c4', 'rsrc/css/phui/phui-text.css' => '23e9b4b7', - 'rsrc/css/phui/phui-timeline-view.css' => '66803fc3', + 'rsrc/css/phui/phui-timeline-view.css' => '7a502670', 'rsrc/css/phui/phui-workboard-view.css' => '84f2c272', 'rsrc/css/phui/phui-workpanel-view.css' => '97b69459', 'rsrc/css/sprite-actions.css' => '969ad0e5', @@ -764,7 +764,7 @@ return array( 'phui-status-list-view-css' => '2f562399', 'phui-tag-view-css' => '295d81c4', 'phui-text-css' => '23e9b4b7', - 'phui-timeline-view-css' => '66803fc3', + 'phui-timeline-view-css' => '7a502670', 'phui-workboard-view-css' => '84f2c272', 'phui-workpanel-view-css' => '97b69459', 'policy-css' => '957ea14c', diff --git a/src/applications/differential/storage/DifferentialTransaction.php b/src/applications/differential/storage/DifferentialTransaction.php index 3ab0752308..36b4556fd4 100644 --- a/src/applications/differential/storage/DifferentialTransaction.php +++ b/src/applications/differential/storage/DifferentialTransaction.php @@ -351,11 +351,11 @@ final class DifferentialTransaction extends PhabricatorApplicationTransaction { case self::TYPE_ACTION: switch ($this->getNewValue()) { case DifferentialAction::ACTION_CLOSE: - return 'fa-check-square-o'; - case DifferentialAction::ACTION_ACCEPT: return 'fa-check'; + case DifferentialAction::ACTION_ACCEPT: + return 'fa-check-circle'; case DifferentialAction::ACTION_REJECT: - return 'fa-times'; + return 'fa-times-circle'; case DifferentialAction::ACTION_ABANDON: return 'fa-plane'; case DifferentialAction::ACTION_RETHINK: diff --git a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php index e0dffc2c26..aaaa4e79ff 100644 --- a/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php +++ b/src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php @@ -102,7 +102,7 @@ final class PhabricatorManiphestConfigOptions 'duplicate' => array( 'name' => pht('Duplicate'), 'name.full' => pht('Closed, Duplicate'), - 'transaction.icon' => 'delete', + 'transaction.icon' => 'fa-times', 'special' => ManiphestTaskStatus::SPECIAL_DUPLICATE, 'closed' => true, ), @@ -110,7 +110,7 @@ final class PhabricatorManiphestConfigOptions 'name' => pht('Spite'), 'name.full' => pht('Closed, Spite'), 'name.action' => pht('Spited'), - 'transaction.icon' => 'dislike', + 'transaction.icon' => 'fa-thumbs-o-down', 'silly' => true, 'closed' => true, 'prefixes' => array( @@ -157,7 +157,7 @@ The keys you can provide in a specification are: and it must be a closed status. - `transaction.icon` //Optional string.// Allows you to choose a different icon to use for this status when showing status changes in the transaction - log. + log. Please see UIExamples, Icons and Images for a list. - `transaction.color` //Optional string.// Allows you to choose a different color to use for this status when showing status changes in the transaction log. diff --git a/src/applications/maniphest/storage/ManiphestTransaction.php b/src/applications/maniphest/storage/ManiphestTransaction.php index 721fa1f293..5ae50e38cb 100644 --- a/src/applications/maniphest/storage/ManiphestTransaction.php +++ b/src/applications/maniphest/storage/ManiphestTransaction.php @@ -263,7 +263,7 @@ final class ManiphestTransaction } if (ManiphestTaskStatus::isClosedStatus($new)) { - return 'fa-check-square-o'; + return 'fa-check'; } else { return 'fa-pencil'; } @@ -280,7 +280,6 @@ final class ManiphestTransaction case self::TYPE_PRIORITY: if ($old == ManiphestTaskPriority::getDefaultPriority()) { return 'fa-arrow-right'; - return pht('Triaged'); } else if ($old > $new) { return 'fa-arrow-down'; } else { diff --git a/webroot/rsrc/css/phui/phui-timeline-view.css b/webroot/rsrc/css/phui/phui-timeline-view.css index fac31ce139..be1b370a78 100644 --- a/webroot/rsrc/css/phui/phui-timeline-view.css +++ b/webroot/rsrc/css/phui/phui-timeline-view.css @@ -190,12 +190,13 @@ background-color: {$lightblueborder}; top: 0; left: 0; + text-align: center; } -.phui-timeline-icon { - position: absolute; - left: 9px; - top: -5px; +.phui-icon-view.phui-timeline-icon:before { + position: relative; + top: 4px; + margin: 0; } .phui-timeline-minor-event .phui-timeline-icon-fill { @@ -204,11 +205,6 @@ border-radius: 3px; } -.phui-timeline-minor-event .phui-timeline-icon { - top: -5px; - left: 7px; -} - .phui-timeline-extra, .phui-timeline-extra .phabricator-content-source-view { font-size: 11px;