@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

ObjectHeader Status icons

Summary: Adds status icons and colors to Maniphest and Differential. Also minor tweaks to them in hovercards. Probably some other stuff too.

Test Plan: Test many diff and task states.

Reviewers: epriestley, btrahan

Reviewed By: epriestley

CC: Korvin, aran

Differential Revision: https://secure.phabricator.com/D7098

+261 -123
+17 -2
resources/sprite/manifest/status.json
··· 154 154 "status-oh-closed" : { 155 155 "name" : "status-oh-closed", 156 156 "rule" : ".status-oh-closed", 157 - "hash" : "cbc6a0959ebad3e88cc3ac67743a7f3a" 157 + "hash" : "53dc3a09dc2fbd3a546e5f5619a03b30" 158 + }, 159 + "status-oh-closed-dark" : { 160 + "name" : "status-oh-closed-dark", 161 + "rule" : ".status-oh-closed-dark", 162 + "hash" : "fbe32ade82b9b23352bd81c1735371a5" 158 163 }, 159 164 "status-oh-open" : { 160 165 "name" : "status-oh-open", 161 166 "rule" : ".status-oh-open", 162 - "hash" : "e86f83bc40e77664c91c834b27816576" 167 + "hash" : "6ed5dd19324018203085c68155fae53a" 168 + }, 169 + "status-oh-open-green" : { 170 + "name" : "status-oh-open-green", 171 + "rule" : ".status-oh-open-green", 172 + "hash" : "01215f7ed2b6802049ac5c259231bbe7" 173 + }, 174 + "status-oh-open-red" : { 175 + "name" : "status-oh-open-red", 176 + "rule" : ".status-oh-open-red", 177 + "hash" : "fbac435cfbf49d05e7734fd6c786b0b7" 163 178 }, 164 179 "status-open-blue" : { 165 180 "name" : "status-open-blue",
resources/sprite/status_1x/oh-closed-dark.png

This is a binary file and will not be displayed.

resources/sprite/status_1x/oh-open-green.png

This is a binary file and will not be displayed.

resources/sprite/status_1x/oh-open-red.png

This is a binary file and will not be displayed.

resources/sprite/status_2x/oh-closed-dark.png

This is a binary file and will not be displayed.

resources/sprite/status_2x/oh-closed.png

This is a binary file and will not be displayed.

resources/sprite/status_2x/oh-open-green.png

This is a binary file and will not be displayed.

resources/sprite/status_2x/oh-open-red.png

This is a binary file and will not be displayed.

resources/sprite/status_2x/oh-open.png

This is a binary file and will not be displayed.

+51 -51
src/__celerity_resource_map__.php
··· 702 702 ), 703 703 '/rsrc/image/sprite-status-X2.png' => 704 704 array( 705 - 'hash' => 'b26f204c1b5ff01e3facbf78ccdc358b', 706 - 'uri' => '/res/b26f204c/rsrc/image/sprite-status-X2.png', 705 + 'hash' => 'a537049b4500a47af3fc27c626bbe865', 706 + 'uri' => '/res/a537049b/rsrc/image/sprite-status-X2.png', 707 707 'disk' => '/rsrc/image/sprite-status-X2.png', 708 708 'type' => 'png', 709 709 ), 710 710 '/rsrc/image/sprite-status.png' => 711 711 array( 712 - 'hash' => 'c1f9c28f3ab24a0f2d758331bb0f8a09', 713 - 'uri' => '/res/c1f9c28f/rsrc/image/sprite-status.png', 712 + 'hash' => '438db33426faa98f938b1ebabd196763', 713 + 'uri' => '/res/438db334/rsrc/image/sprite-status.png', 714 714 'disk' => '/rsrc/image/sprite-status.png', 715 715 'type' => 'png', 716 716 ), ··· 2996 2996 ), 2997 2997 'phabricator-action-header-view-css' => 2998 2998 array( 2999 - 'uri' => '/res/f7861fb7/rsrc/css/layout/phabricator-action-header-view.css', 2999 + 'uri' => '/res/cd8b4a61/rsrc/css/layout/phabricator-action-header-view.css', 3000 3000 'type' => 'css', 3001 3001 'requires' => 3002 3002 array( ··· 3461 3461 ), 3462 3462 'phabricator-timeline-view-css' => 3463 3463 array( 3464 - 'uri' => '/res/ae611a10/rsrc/css/layout/phabricator-timeline-view.css', 3464 + 'uri' => '/res/725f6b17/rsrc/css/layout/phabricator-timeline-view.css', 3465 3465 'type' => 'css', 3466 3466 'requires' => 3467 3467 array( ··· 3765 3765 ), 3766 3766 'phui-header-view-css' => 3767 3767 array( 3768 - 'uri' => '/res/7ce53631/rsrc/css/phui/phui-header-view.css', 3768 + 'uri' => '/res/2a60156a/rsrc/css/phui/phui-header-view.css', 3769 3769 'type' => 'css', 3770 3770 'requires' => 3771 3771 array( ··· 4125 4125 ), 4126 4126 'sprite-status-css' => 4127 4127 array( 4128 - 'uri' => '/res/d61bb845/rsrc/css/sprite-status.css', 4128 + 'uri' => '/res/26c51270/rsrc/css/sprite-status.css', 4129 4129 'type' => 'css', 4130 4130 'requires' => 4131 4131 array( ··· 4162 4162 ), array( 4163 4163 'packages' => 4164 4164 array( 4165 - 'b1d5e69b' => 4165 + 'c0b41cc6' => 4166 4166 array( 4167 4167 'name' => 'core.pkg.css', 4168 4168 'symbols' => ··· 4209 4209 39 => 'phabricator-property-list-view-css', 4210 4210 40 => 'phabricator-tag-view-css', 4211 4211 ), 4212 - 'uri' => '/res/pkg/b1d5e69b/core.pkg.css', 4212 + 'uri' => '/res/pkg/c0b41cc6/core.pkg.css', 4213 4213 'type' => 'css', 4214 4214 ), 4215 4215 '8977e356' => ··· 4399 4399 ), 4400 4400 'reverse' => 4401 4401 array( 4402 - 'aphront-dialog-view-css' => 'b1d5e69b', 4403 - 'aphront-error-view-css' => 'b1d5e69b', 4404 - 'aphront-list-filter-view-css' => 'b1d5e69b', 4405 - 'aphront-pager-view-css' => 'b1d5e69b', 4406 - 'aphront-panel-view-css' => 'b1d5e69b', 4407 - 'aphront-table-view-css' => 'b1d5e69b', 4408 - 'aphront-tokenizer-control-css' => 'b1d5e69b', 4409 - 'aphront-tooltip-css' => 'b1d5e69b', 4410 - 'aphront-typeahead-control-css' => 'b1d5e69b', 4402 + 'aphront-dialog-view-css' => 'c0b41cc6', 4403 + 'aphront-error-view-css' => 'c0b41cc6', 4404 + 'aphront-list-filter-view-css' => 'c0b41cc6', 4405 + 'aphront-pager-view-css' => 'c0b41cc6', 4406 + 'aphront-panel-view-css' => 'c0b41cc6', 4407 + 'aphront-table-view-css' => 'c0b41cc6', 4408 + 'aphront-tokenizer-control-css' => 'c0b41cc6', 4409 + 'aphront-tooltip-css' => 'c0b41cc6', 4410 + 'aphront-typeahead-control-css' => 'c0b41cc6', 4411 4411 'differential-changeset-view-css' => '44bfe40c', 4412 4412 'differential-core-view-css' => '44bfe40c', 4413 4413 'differential-inline-comment-editor' => '5e9e5c4e', ··· 4421 4421 'differential-table-of-contents-css' => '44bfe40c', 4422 4422 'diffusion-commit-view-css' => 'c8ce2d88', 4423 4423 'diffusion-icons-css' => 'c8ce2d88', 4424 - 'global-drag-and-drop-css' => 'b1d5e69b', 4424 + 'global-drag-and-drop-css' => 'c0b41cc6', 4425 4425 'inline-comment-summary-css' => '44bfe40c', 4426 4426 'javelin-aphlict' => '8977e356', 4427 4427 'javelin-behavior' => '9564fa17', ··· 4494 4494 'javelin-util' => '9564fa17', 4495 4495 'javelin-vector' => '9564fa17', 4496 4496 'javelin-workflow' => '9564fa17', 4497 - 'lightbox-attachment-css' => 'b1d5e69b', 4497 + 'lightbox-attachment-css' => 'c0b41cc6', 4498 4498 'maniphest-task-summary-css' => '49898640', 4499 - 'phabricator-action-list-view-css' => 'b1d5e69b', 4500 - 'phabricator-application-launch-view-css' => 'b1d5e69b', 4499 + 'phabricator-action-list-view-css' => 'c0b41cc6', 4500 + 'phabricator-application-launch-view-css' => 'c0b41cc6', 4501 4501 'phabricator-busy' => '8977e356', 4502 4502 'phabricator-content-source-view-css' => '44bfe40c', 4503 - 'phabricator-core-css' => 'b1d5e69b', 4504 - 'phabricator-crumbs-view-css' => 'b1d5e69b', 4503 + 'phabricator-core-css' => 'c0b41cc6', 4504 + 'phabricator-crumbs-view-css' => 'c0b41cc6', 4505 4505 'phabricator-drag-and-drop-file-upload' => '5e9e5c4e', 4506 4506 'phabricator-dropdown-menu' => '8977e356', 4507 4507 'phabricator-file-upload' => '8977e356', 4508 - 'phabricator-filetree-view-css' => 'b1d5e69b', 4509 - 'phabricator-flag-css' => 'b1d5e69b', 4508 + 'phabricator-filetree-view-css' => 'c0b41cc6', 4509 + 'phabricator-flag-css' => 'c0b41cc6', 4510 4510 'phabricator-hovercard' => '8977e356', 4511 - 'phabricator-jump-nav' => 'b1d5e69b', 4511 + 'phabricator-jump-nav' => 'c0b41cc6', 4512 4512 'phabricator-keyboard-shortcut' => '8977e356', 4513 4513 'phabricator-keyboard-shortcut-manager' => '8977e356', 4514 - 'phabricator-main-menu-view' => 'b1d5e69b', 4514 + 'phabricator-main-menu-view' => 'c0b41cc6', 4515 4515 'phabricator-menu-item' => '8977e356', 4516 - 'phabricator-nav-view-css' => 'b1d5e69b', 4516 + 'phabricator-nav-view-css' => 'c0b41cc6', 4517 4517 'phabricator-notification' => '8977e356', 4518 - 'phabricator-notification-css' => 'b1d5e69b', 4519 - 'phabricator-notification-menu-css' => 'b1d5e69b', 4518 + 'phabricator-notification-css' => 'c0b41cc6', 4519 + 'phabricator-notification-menu-css' => 'c0b41cc6', 4520 4520 'phabricator-object-selector-css' => '44bfe40c', 4521 4521 'phabricator-phtize' => '8977e356', 4522 4522 'phabricator-prefab' => '8977e356', 4523 4523 'phabricator-project-tag-css' => '49898640', 4524 - 'phabricator-property-list-view-css' => 'b1d5e69b', 4525 - 'phabricator-remarkup-css' => 'b1d5e69b', 4524 + 'phabricator-property-list-view-css' => 'c0b41cc6', 4525 + 'phabricator-remarkup-css' => 'c0b41cc6', 4526 4526 'phabricator-shaped-request' => '5e9e5c4e', 4527 - 'phabricator-side-menu-view-css' => 'b1d5e69b', 4528 - 'phabricator-standard-page-view' => 'b1d5e69b', 4529 - 'phabricator-tag-view-css' => 'b1d5e69b', 4527 + 'phabricator-side-menu-view-css' => 'c0b41cc6', 4528 + 'phabricator-standard-page-view' => 'c0b41cc6', 4529 + 'phabricator-tag-view-css' => 'c0b41cc6', 4530 4530 'phabricator-textareautils' => '8977e356', 4531 4531 'phabricator-tooltip' => '8977e356', 4532 - 'phabricator-transaction-view-css' => 'b1d5e69b', 4533 - 'phabricator-zindex-css' => 'b1d5e69b', 4534 - 'phui-button-css' => 'b1d5e69b', 4535 - 'phui-form-css' => 'b1d5e69b', 4536 - 'phui-form-view-css' => 'b1d5e69b', 4537 - 'phui-header-view-css' => 'b1d5e69b', 4538 - 'phui-icon-view-css' => 'b1d5e69b', 4539 - 'phui-object-item-list-view-css' => 'b1d5e69b', 4540 - 'phui-spacing-css' => 'b1d5e69b', 4541 - 'sprite-apps-large-css' => 'b1d5e69b', 4542 - 'sprite-gradient-css' => 'b1d5e69b', 4543 - 'sprite-icons-css' => 'b1d5e69b', 4544 - 'sprite-menu-css' => 'b1d5e69b', 4545 - 'syntax-highlighting-css' => 'b1d5e69b', 4532 + 'phabricator-transaction-view-css' => 'c0b41cc6', 4533 + 'phabricator-zindex-css' => 'c0b41cc6', 4534 + 'phui-button-css' => 'c0b41cc6', 4535 + 'phui-form-css' => 'c0b41cc6', 4536 + 'phui-form-view-css' => 'c0b41cc6', 4537 + 'phui-header-view-css' => 'c0b41cc6', 4538 + 'phui-icon-view-css' => 'c0b41cc6', 4539 + 'phui-object-item-list-view-css' => 'c0b41cc6', 4540 + 'phui-spacing-css' => 'c0b41cc6', 4541 + 'sprite-apps-large-css' => 'c0b41cc6', 4542 + 'sprite-gradient-css' => 'c0b41cc6', 4543 + 'sprite-icons-css' => 'c0b41cc6', 4544 + 'sprite-menu-css' => 'c0b41cc6', 4545 + 'syntax-highlighting-css' => 'c0b41cc6', 4546 4546 ), 4547 4547 ));
+52 -7
src/applications/differential/constants/DifferentialRevisionStatus.php
··· 8 8 9 9 final class DifferentialRevisionStatus { 10 10 11 - public static function getRevisionStatusTagColor($status) { 12 - $default = PhabricatorTagView::COLOR_GREY; 11 + const COLOR_STATUS_DEFAULT = 'status'; 12 + const COLOR_STATUS_DARK = 'status-dark'; 13 + const COLOR_STATUS_GREEN = 'status-green'; 14 + const COLOR_STATUS_RED = 'status-red'; 15 + 16 + public static function getRevisionStatusColor($status) { 17 + $default = self::COLOR_STATUS_DEFAULT; 13 18 14 19 $map = array( 15 20 ArcanistDifferentialRevisionStatus::NEEDS_REVIEW => 16 - PhabricatorTagView::COLOR_ORANGE, 21 + self::COLOR_STATUS_DEFAULT, 17 22 ArcanistDifferentialRevisionStatus::NEEDS_REVISION => 18 - PhabricatorTagView::COLOR_RED, 23 + self::COLOR_STATUS_RED, 24 + ArcanistDifferentialRevisionStatus::ACCEPTED => 25 + self::COLOR_STATUS_GREEN, 26 + ArcanistDifferentialRevisionStatus::CLOSED => 27 + self::COLOR_STATUS_DARK, 28 + ArcanistDifferentialRevisionStatus::ABANDONED => 29 + self::COLOR_STATUS_DARK, 30 + ); 31 + return idx($map, $status, $default); 32 + } 33 + 34 + public static function getRevisionStatusIcon($status) { 35 + $default = 'oh-open'; 36 + 37 + $map = array( 38 + ArcanistDifferentialRevisionStatus::NEEDS_REVIEW => 39 + 'oh-open', 40 + ArcanistDifferentialRevisionStatus::NEEDS_REVISION => 41 + 'oh-open-red', 19 42 ArcanistDifferentialRevisionStatus::ACCEPTED => 20 - PhabricatorTagView::COLOR_GREEN, 43 + 'oh-open-green', 21 44 ArcanistDifferentialRevisionStatus::CLOSED => 22 - PhabricatorTagView::COLOR_BLUE, 45 + 'oh-closed-dark', 23 46 ArcanistDifferentialRevisionStatus::ABANDONED => 24 - PhabricatorTagView::COLOR_BLACK, 47 + 'oh-closed-dark', 25 48 ); 26 49 return idx($map, $status, $default); 50 + } 51 + 52 + public static function renderFullDescription($status) { 53 + $color = self::getRevisionStatusColor($status); 54 + $status_name = 55 + ArcanistDifferentialRevisionStatus::getNameForRevisionStatus($status); 56 + 57 + $img = id(new PHUIIconView()) 58 + ->setSpriteSheet(PHUIIconView::SPRITE_STATUS) 59 + ->setSpriteIcon(self::getRevisionStatusIcon($status)); 60 + 61 + $tag = phutil_tag( 62 + 'span', 63 + array( 64 + 'class' => 'phui-header-'.$color, 65 + ), 66 + array( 67 + $img, 68 + $status_name, 69 + )); 70 + 71 + return $tag; 27 72 } 28 73 }
-1
src/applications/differential/events/DifferentialHovercardEventListener.php
··· 78 78 } 79 79 80 80 } 81 -
+1 -1
src/applications/differential/field/specification/DifferentialReviewersFieldSpecification.php
··· 70 70 $reviewer_map[$phid] = $this->getHandle($phid)->getFullName(); 71 71 } 72 72 return id(new AphrontFormTokenizerControl()) 73 - ->setLabel('Reviewers') 73 + ->setLabel(pht('Reviewers')) 74 74 ->setName('reviewers') 75 75 ->setUser($this->getUser()) 76 76 ->setDatasource('/typeahead/common/users/')
+1 -1
src/applications/differential/field/specification/DifferentialSummaryFieldSpecification.php
··· 21 21 22 22 public function renderEditControl() { 23 23 return id(new PhabricatorRemarkupControl()) 24 - ->setLabel('Summary') 24 + ->setLabel(pht('Summary')) 25 25 ->setName('summary') 26 26 ->setID($this->getControlID()) 27 27 ->setValue($this->summary);
+7 -5
src/applications/differential/view/DifferentialRevisionDetailView.php
··· 122 122 $view = id(new PHUIHeaderView()) 123 123 ->setHeader($revision->getTitle($revision)); 124 124 125 - $view->addTag(self::renderTagForRevision($revision)); 125 + $status = $revision->getStatus(); 126 + $status_name = 127 + DifferentialRevisionStatus::renderFullDescription($status); 128 + 129 + $view->addProperty(PHUIHeaderView::PROPERTY_STATUS, $status_name); 126 130 127 131 return $view; 128 132 } ··· 133 137 $status = $revision->getStatus(); 134 138 $status_name = 135 139 ArcanistDifferentialRevisionStatus::getNameForRevisionStatus($status); 136 - $status_color = 137 - DifferentialRevisionStatus::getRevisionStatusTagColor($status); 138 140 139 141 return id(new PhabricatorTagView()) 140 142 ->setType(PhabricatorTagView::TYPE_STATE) 141 - ->setName($status_name) 142 - ->setBackgroundColor($status_color); 143 + ->setName($status_name); 143 144 } 145 + 144 146 }
+68 -20
src/applications/maniphest/constants/ManiphestTaskStatus.php
··· 12 12 const STATUS_CLOSED_DUPLICATE = 4; 13 13 const STATUS_CLOSED_SPITE = 5; 14 14 15 + const COLOR_STATUS_OPEN = 'status'; 16 + const COLOR_STATUS_CLOSED = 'status-dark'; 17 + 15 18 public static function getTaskStatusMap() { 19 + $open = pht('Open'); 20 + $resolved = pht('Resolved'); 21 + $wontfix = pht('Wontfix'); 22 + $invalid = pht('Invalid'); 23 + $duplicate = pht('Duplicate'); 24 + $spite = pht('Spite'); 25 + 16 26 return array( 17 - self::STATUS_OPEN => 'Open', 18 - self::STATUS_CLOSED_RESOLVED => 'Resolved', 19 - self::STATUS_CLOSED_WONTFIX => 'Wontfix', 20 - self::STATUS_CLOSED_INVALID => 'Invalid', 21 - self::STATUS_CLOSED_DUPLICATE => 'Duplicate', 22 - self::STATUS_CLOSED_SPITE => 'Spite', 27 + self::STATUS_OPEN => $open, 28 + self::STATUS_CLOSED_RESOLVED => $resolved, 29 + self::STATUS_CLOSED_WONTFIX => $wontfix, 30 + self::STATUS_CLOSED_INVALID => $invalid, 31 + self::STATUS_CLOSED_DUPLICATE => $duplicate, 32 + self::STATUS_CLOSED_SPITE => $spite, 23 33 ); 24 34 } 25 35 26 36 public static function getTaskStatusFullName($status) { 37 + $open = pht('Open'); 38 + $resolved = pht('Closed, Resolved'); 39 + $wontfix = pht('Closed, Wontfix'); 40 + $invalid = pht('Closed, Invalid'); 41 + $duplicate = pht('Closed, Duplicate'); 42 + $spite = pht('Closed, Spite'); 43 + 27 44 $map = array( 28 - self::STATUS_OPEN => 'Open', 29 - self::STATUS_CLOSED_RESOLVED => 'Closed, Resolved', 30 - self::STATUS_CLOSED_WONTFIX => 'Closed, Wontfix', 31 - self::STATUS_CLOSED_INVALID => 'Closed, Invalid', 32 - self::STATUS_CLOSED_DUPLICATE => 'Closed, Duplicate', 33 - self::STATUS_CLOSED_SPITE => 'Closed out of Spite', 45 + self::STATUS_OPEN => $open, 46 + self::STATUS_CLOSED_RESOLVED => $resolved, 47 + self::STATUS_CLOSED_WONTFIX => $wontfix, 48 + self::STATUS_CLOSED_INVALID => $invalid, 49 + self::STATUS_CLOSED_DUPLICATE => $duplicate, 50 + self::STATUS_CLOSED_SPITE => $spite, 34 51 ); 35 52 return idx($map, $status, '???'); 36 53 } 37 54 38 - public static function getTaskStatusTagColor($status) { 39 - $default = PhabricatorTagView::COLOR_GREY; 55 + public static function getTaskStatusColor($status) { 56 + $default = self::COLOR_STATUS_OPEN; 40 57 41 58 $map = array( 42 - self::STATUS_OPEN => PhabricatorTagView::COLOR_ORANGE, 43 - self::STATUS_CLOSED_RESOLVED => PhabricatorTagView::COLOR_BLUE, 44 - self::STATUS_CLOSED_WONTFIX => PhabricatorTagView::COLOR_BLACK, 45 - self::STATUS_CLOSED_INVALID => PhabricatorTagView::COLOR_BLACK, 46 - self::STATUS_CLOSED_DUPLICATE => PhabricatorTagView::COLOR_BLACK, 47 - self::STATUS_CLOSED_SPITE => PhabricatorTagView::COLOR_INDIGO, 59 + self::STATUS_OPEN => self::COLOR_STATUS_OPEN, 60 + self::STATUS_CLOSED_RESOLVED => self::COLOR_STATUS_CLOSED, 61 + self::STATUS_CLOSED_WONTFIX => self::COLOR_STATUS_CLOSED, 62 + self::STATUS_CLOSED_INVALID => self::COLOR_STATUS_CLOSED, 63 + self::STATUS_CLOSED_DUPLICATE => self::COLOR_STATUS_CLOSED, 64 + self::STATUS_CLOSED_SPITE => self::COLOR_STATUS_CLOSED, 48 65 ); 49 66 return idx($map, $status, $default); 50 67 } 51 68 69 + public static function getIcon($status) { 70 + $default = 'oh-open'; 71 + $map = array( 72 + self::STATUS_OPEN => 'oh-open', 73 + self::STATUS_CLOSED_RESOLVED => 'oh-closed-dark', 74 + self::STATUS_CLOSED_WONTFIX => 'oh-closed-dark', 75 + self::STATUS_CLOSED_INVALID => 'oh-closed-dark', 76 + self::STATUS_CLOSED_DUPLICATE => 'oh-closed-dark', 77 + self::STATUS_CLOSED_SPITE => 'oh-closed-dark', 78 + ); 79 + return idx($map, $status, $default); 80 + } 52 81 82 + public static function renderFullDescription($status) { 83 + $color = self::getTaskStatusColor($status); 84 + 85 + $img = id(new PHUIIconView()) 86 + ->setSpriteSheet(PHUIIconView::SPRITE_STATUS) 87 + ->setSpriteIcon(self::getIcon($status)); 88 + 89 + $tag = phutil_tag( 90 + 'span', 91 + array( 92 + 'class' => 'phui-header-'.$color, 93 + ), 94 + array( 95 + $img, 96 + self::getTaskStatusFullName($status), 97 + )); 98 + 99 + return $tag; 100 + } 53 101 }
+4 -1
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 359 359 $view = id(new PHUIHeaderView()) 360 360 ->setHeader($task->getTitle()); 361 361 362 - $view->addTag(ManiphestView::renderTagForTask($task)); 362 + $status = $task->getStatus(); 363 + $status_name = ManiphestTaskStatus::renderFullDescription($status); 364 + 365 + $view->addProperty(PHUIHeaderView::PROPERTY_STATUS, $status_name); 363 366 364 367 return $view; 365 368 }
+1 -3
src/applications/maniphest/view/ManiphestView.php
··· 8 8 public static function renderTagForTask(ManiphestTask $task) { 9 9 $status = $task->getStatus(); 10 10 $status_name = ManiphestTaskStatus::getTaskStatusFullName($status); 11 - $status_color = ManiphestTaskStatus::getTaskStatusTagColor($status); 12 11 13 12 return id(new PhabricatorTagView()) 14 13 ->setType(PhabricatorTagView::TYPE_STATE) 15 - ->setName($status_name) 16 - ->setBackgroundColor($status_color); 14 + ->setName($status_name); 17 15 } 18 16 19 17 }
+7 -11
src/applications/people/event/PhabricatorPeopleHovercardEventListener.php
··· 33 33 nonempty($profile->getTitle(), 34 34 pht('No title was found befitting of this rare specimen')))); 35 35 36 - $hovercard->addField(pht('User since'), 37 - phabricator_date($user->getDateCreated(), $user)); 38 - 39 36 if ($user->getIsDisabled()) { 40 - $hovercard->addTag(id(new PhabricatorTagView()) 41 - ->setBackgroundColor(PhabricatorTagView::COLOR_BLACK) 42 - ->setName(pht('Disabled')) 43 - ->setType(PhabricatorTagView::TYPE_STATE)); 37 + $hovercard->addField(pht('Account'), pht('Disabled')); 44 38 } else { 45 39 $statuses = id(new PhabricatorUserStatus())->loadCurrentStatuses( 46 40 array($user->getPHID())); 47 41 if ($statuses) { 48 42 $current_status = reset($statuses); 43 + $dateto = phabricator_datetime($current_status->getDateTo(), $user); 49 44 $hovercard->addField(pht('Status'), 50 45 $current_status->getDescription()); 51 - $hovercard->addTag(id(new PhabricatorTagView()) 52 - ->setName($current_status->getHumanStatus()) 53 - ->setBackgroundColor(PhabricatorTagView::COLOR_BLUE) 54 - ->setType(PhabricatorTagView::TYPE_STATE)); 46 + $hovercard->addField(pht('Until'), 47 + $dateto); 55 48 } else { 56 49 $hovercard->addField(pht('Status'), pht('Available')); 57 50 } 58 51 } 52 + 53 + $hovercard->addField(pht('User since'), 54 + phabricator_date($user->getDateCreated(), $user)); 59 55 60 56 if ($profile->getBlurb()) { 61 57 $hovercard->addField(pht('Blurb'),
+1 -2
src/applications/uiexample/examples/PhabricatorHovercardExample.php
··· 38 38 39 39 $tag = id(new PhabricatorTagView()) 40 40 ->setType(PhabricatorTagView::TYPE_STATE) 41 - ->setBackgroundColor(PhabricatorTagView::COLOR_BLACK) 42 - ->setName('Abandoned (Really)'); 41 + ->setName('Closed, Resolved'); 43 42 $panel = $this->createPanel("Maniphest Hovercard"); 44 43 $panel->appendChild(id(new PhabricatorHovercardView()) 45 44 ->setObjectHandle($task_handle)
+2 -2
src/view/phui/PHUIHeaderView.php
··· 2 2 3 3 final class PHUIHeaderView extends AphrontView { 4 4 5 - const PROPERTY_STATE = 1; 5 + const PROPERTY_STATUS = 1; 6 6 7 7 private $objectName; 8 8 private $header; ··· 138 138 $property_list = array(); 139 139 foreach ($this->properties as $type => $property) { 140 140 switch ($type) { 141 - case self::PROPERTY_STATE: 141 + case self::PROPERTY_STATUS: 142 142 $property_list[] = $property; 143 143 break; 144 144 default:
+4
webroot/rsrc/css/layout/phabricator-action-header-view.css
··· 52 52 text-shadow: 0 -1px 1px rgba(0,0,0,.7); 53 53 } 54 54 55 + .phabricator-action-header-icon-list .phabricator-tag-view { 56 + font-weight: normal; 57 + } 58 + 55 59 .phabricator-action-header-title span { 56 60 float: left; 57 61 height: 16px;
+1 -1
webroot/rsrc/css/layout/phabricator-timeline-view.css
··· 137 137 138 138 .phabricator-timeline-icon { 139 139 position: absolute; 140 - left: 8px; 140 + left: 9px; 141 141 top: 8px; 142 142 height: 14px; 143 143 width: 14px;
+17
webroot/rsrc/css/phui/phui-header-view.css
··· 82 82 margin: -2px 4px -2px 0; 83 83 } 84 84 85 + .phui-header-subheader { 86 + color: {$bluetext}; 87 + } 88 + 85 89 .phui-header-subheader .policy-link { 86 90 color: {$darkbluetext}; 87 91 } 92 + 93 + .phui-header-subheader .phui-header-status-dark { 94 + color: #111; 95 + text-shadow: 0 1px #fff; 96 + } 97 + 98 + .phui-header-subheader .phui-header-status-red { 99 + color: {$red}; 100 + } 101 + 102 + .phui-header-subheader .phui-header-status-green { 103 + color: {$green}; 104 + }
+27 -15
webroot/rsrc/css/sprite-status.css
··· 87 87 } 88 88 89 89 .status-info-green { 90 - background-position: 0px -30px; 90 + background-position: -120px -15px; 91 91 } 92 92 93 93 .status-info-red { 94 - background-position: -15px -30px; 94 + background-position: 0px -30px; 95 95 } 96 96 97 97 .status-info-white { 98 - background-position: -30px -30px; 98 + background-position: -15px -30px; 99 99 } 100 100 101 101 .status-left-blue { 102 - background-position: -45px -30px; 102 + background-position: -30px -30px; 103 103 } 104 104 105 105 .status-left-dark { 106 - background-position: -60px -30px; 106 + background-position: -45px -30px; 107 107 } 108 108 109 109 .status-left-green { 110 - background-position: -75px -30px; 110 + background-position: -60px -30px; 111 111 } 112 112 113 113 .status-left-red { 114 - background-position: -90px -30px; 114 + background-position: -75px -30px; 115 115 } 116 116 117 117 .status-left-white { 118 - background-position: -105px -30px; 118 + background-position: -90px -30px; 119 119 } 120 120 121 121 .status-minus-blue { 122 - background-position: 0px -45px; 122 + background-position: -105px -30px; 123 123 } 124 124 125 125 .status-minus-dark { 126 - background-position: -15px -45px; 126 + background-position: -120px -30px; 127 127 } 128 128 129 129 .status-minus-green { 130 - background-position: -30px -45px; 130 + background-position: 0px -45px; 131 131 } 132 132 133 133 .status-minus-red { 134 + background-position: -15px -45px; 135 + } 136 + 137 + .status-minus-white { 138 + background-position: -30px -45px; 139 + } 140 + 141 + .status-oh-closed-dark { 134 142 background-position: -45px -45px; 135 143 } 136 144 137 - .status-minus-white { 145 + .status-oh-closed { 138 146 background-position: -60px -45px; 139 147 } 140 148 141 - .status-oh-closed { 149 + .status-oh-open-green { 142 150 background-position: -75px -45px; 143 151 } 144 152 145 - .status-oh-open { 153 + .status-oh-open-red { 146 154 background-position: -90px -45px; 147 155 } 148 156 149 - .status-open-blue { 157 + .status-oh-open { 150 158 background-position: -105px -45px; 159 + } 160 + 161 + .status-open-blue { 162 + background-position: -120px -45px; 151 163 } 152 164 153 165 .status-open-dark {
webroot/rsrc/image/sprite-status-X2.png

This is a binary file and will not be displayed.

webroot/rsrc/image/sprite-status.png

This is a binary file and will not be displayed.