@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.

Update Maniphest for PHUITwoColumnView

Summary: Reworks Maniphest into a two column view. Moves priority and color to header, assignee to sidebar. quest points to header, and author to gutter. may be some confusion since priority only displays on open tickets.

Test Plan: with and without description, custom fields, points, tablet, mobile and desktop.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+180 -164
+9 -9
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => 'dd1447be', 10 + 'core.pkg.css' => 'db1cd0bd', 11 11 'core.pkg.js' => '7d8faf57', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 111 111 'rsrc/css/font/font-aleo.css' => '8bdb2835', 112 112 'rsrc/css/font/font-awesome.css' => 'c43323c5', 113 113 'rsrc/css/font/font-lato.css' => 'c7ccd872', 114 - 'rsrc/css/font/phui-font-icon-base.css' => 'ecbbb4c2', 114 + 'rsrc/css/font/phui-font-icon-base.css' => '6449bce8', 115 115 'rsrc/css/layout/phabricator-filetree-view.css' => 'fccf9f82', 116 116 'rsrc/css/layout/phabricator-side-menu-view.css' => '3a3d9f41', 117 117 'rsrc/css/layout/phabricator-source-code-view.css' => 'cbeef983', ··· 135 135 'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e', 136 136 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 137 137 'rsrc/css/phui/phui-head-thing.css' => '11731da0', 138 - 'rsrc/css/phui/phui-header-view.css' => 'fc4acf14', 138 + 'rsrc/css/phui/phui-header-view.css' => 'bfb9fed3', 139 139 'rsrc/css/phui/phui-hovercard.css' => 'de1a2119', 140 140 'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad', 141 141 'rsrc/css/phui/phui-icon.css' => '3f33ab57', ··· 153 153 'rsrc/css/phui/phui-segment-bar-view.css' => '46342871', 154 154 'rsrc/css/phui/phui-spacing.css' => '042804d6', 155 155 'rsrc/css/phui/phui-status.css' => '37309046', 156 - 'rsrc/css/phui/phui-tag-view.css' => '9d5d4400', 156 + 'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2', 157 157 'rsrc/css/phui/phui-timeline-view.css' => '2efceff8', 158 - 'rsrc/css/phui/phui-two-column-view.css' => 'd0ad8c10', 158 + 'rsrc/css/phui/phui-two-column-view.css' => '097630a3', 159 159 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7', 160 160 'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647', 161 161 'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96', ··· 815 815 'phui-document-view-css' => '9c71d2bf', 816 816 'phui-document-view-pro-css' => '92d5b648', 817 817 'phui-feed-story-css' => '04aec08f', 818 - 'phui-font-icon-base-css' => 'ecbbb4c2', 818 + 'phui-font-icon-base-css' => '6449bce8', 819 819 'phui-fontkit-css' => '9cda225e', 820 820 'phui-form-css' => 'aac1d51d', 821 821 'phui-form-view-css' => '4a1a0f5e', 822 822 'phui-head-thing-view-css' => '11731da0', 823 - 'phui-header-view-css' => 'fc4acf14', 823 + 'phui-header-view-css' => 'bfb9fed3', 824 824 'phui-hovercard' => '1bd28176', 825 825 'phui-hovercard-view-css' => 'de1a2119', 826 826 'phui-icon-set-selector-css' => '1ab67aad', ··· 840 840 'phui-segment-bar-view-css' => '46342871', 841 841 'phui-spacing-css' => '042804d6', 842 842 'phui-status-list-view-css' => '37309046', 843 - 'phui-tag-view-css' => '9d5d4400', 843 + 'phui-tag-view-css' => '6bbd83e2', 844 844 'phui-theme-css' => '027ba77e', 845 845 'phui-timeline-view-css' => '2efceff8', 846 - 'phui-two-column-view-css' => 'd0ad8c10', 846 + 'phui-two-column-view-css' => '097630a3', 847 847 'phui-workboard-color-css' => 'ac6fe6a7', 848 848 'phui-workboard-view-css' => 'e6d89647', 849 849 'phui-workcard-view-css' => '3646fb96',
+16 -23
src/applications/differential/constants/DifferentialRevisionStatus.php
··· 8 8 9 9 final class DifferentialRevisionStatus extends Phobject { 10 10 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'; 11 + const COLOR_STATUS_DEFAULT = 'bluegrey'; 12 + const COLOR_STATUS_DARK = 'indigo'; 13 + const COLOR_STATUS_BLUE = 'blue'; 14 + const COLOR_STATUS_GREEN = 'green'; 15 + const COLOR_STATUS_RED = 'red'; 15 16 16 17 public static function getRevisionStatusColor($status) { 17 18 $default = self::COLOR_STATUS_DEFAULT; ··· 30 31 ArcanistDifferentialRevisionStatus::ABANDONED => 31 32 self::COLOR_STATUS_DARK, 32 33 ArcanistDifferentialRevisionStatus::IN_PREPARATION => 33 - self::COLOR_STATUS_DARK, 34 + self::COLOR_STATUS_BLUE, 34 35 ); 35 36 return idx($map, $status, $default); 36 37 } ··· 42 43 ArcanistDifferentialRevisionStatus::NEEDS_REVIEW => 43 44 'fa-square-o bluegrey', 44 45 ArcanistDifferentialRevisionStatus::NEEDS_REVISION => 45 - 'fa-refresh red', 46 + 'fa-refresh', 46 47 ArcanistDifferentialRevisionStatus::CHANGES_PLANNED => 47 - 'fa-headphones red', 48 + 'fa-headphones', 48 49 ArcanistDifferentialRevisionStatus::ACCEPTED => 49 - 'fa-check green', 50 + 'fa-check', 50 51 ArcanistDifferentialRevisionStatus::CLOSED => 51 52 'fa-check-square-o', 52 53 ArcanistDifferentialRevisionStatus::ABANDONED => 53 - 'fa-check-square-o', 54 + 'fa-plane', 54 55 ArcanistDifferentialRevisionStatus::IN_PREPARATION => 55 - 'fa-question-circle blue', 56 + 'fa-question-circle', 56 57 ); 57 58 return idx($map, $status, $default); 58 59 } 59 60 60 61 public static function renderFullDescription($status) { 61 - $color = self::getRevisionStatusColor($status); 62 62 $status_name = 63 63 ArcanistDifferentialRevisionStatus::getNameForRevisionStatus($status); 64 64 65 - $img = id(new PHUIIconView()) 66 - ->setIcon(self::getRevisionStatusIcon($status)); 67 - 68 - $tag = phutil_tag( 69 - 'span', 70 - array( 71 - 'class' => 'phui-header-status phui-header-'.$color, 72 - ), 73 - array( 74 - $img, 75 - $status_name, 76 - )); 65 + $tag = id(new PHUITagView()) 66 + ->setName($status_name) 67 + ->setIcon(self::getRevisionStatusIcon($status)) 68 + ->setShade(self::getRevisionStatusColor($status)) 69 + ->setType(PHUITagView::TYPE_SHADE); 77 70 78 71 return $tag; 79 72 }
+3
src/applications/maniphest/config/PhabricatorManiphestConfigOptions.php
··· 77 77 'name.full' => pht('Closed, Resolved'), 78 78 'closed' => true, 79 79 'special' => ManiphestTaskStatus::SPECIAL_CLOSED, 80 + 'transaction.icon' => 'fa-check-circle', 80 81 'prefixes' => array( 81 82 'closed', 82 83 'closes', ··· 97 98 'wontfix' => array( 98 99 'name' => pht('Wontfix'), 99 100 'name.full' => pht('Closed, Wontfix'), 101 + 'transaction.icon' => 'fa-ban', 100 102 'closed' => true, 101 103 'prefixes' => array( 102 104 'wontfix', ··· 110 112 'invalid' => array( 111 113 'name' => pht('Invalid'), 112 114 'name.full' => pht('Closed, Invalid'), 115 + 'transaction.icon' => 'fa-minus-circle', 113 116 'closed' => true, 114 117 'claim' => false, 115 118 'prefixes' => array(
+12 -19
src/applications/maniphest/constants/ManiphestTaskStatus.php
··· 82 82 return self::getStatusAttribute($status, 'name', pht('Unknown Status')); 83 83 } 84 84 85 - public static function renderFullDescription($status) { 85 + public static function renderFullDescription($status, $priority) { 86 86 if (self::isOpenStatus($status)) { 87 - $color = 'status'; 88 - $icon_color = 'bluegrey'; 87 + $name = pht('%s, %s', self::getTaskStatusFullName($status), $priority); 88 + $color = 'grey'; 89 + $icon = 'fa-square-o'; 89 90 } else { 90 - $color = 'status-dark'; 91 - $icon_color = ''; 91 + $name = self::getTaskStatusFullName($status); 92 + $color = 'indigo'; 93 + $icon = 'fa-check-square-o'; 92 94 } 93 95 94 - $icon = self::getStatusIcon($status); 95 - 96 - $img = id(new PHUIIconView()) 97 - ->setIcon($icon.' '.$icon_color); 98 - 99 - $tag = phutil_tag( 100 - 'span', 101 - array( 102 - 'class' => 'phui-header-status phui-header-'.$color, 103 - ), 104 - array( 105 - $img, 106 - self::getTaskStatusFullName($status), 107 - )); 96 + $tag = id(new PHUITagView()) 97 + ->setName($name) 98 + ->setIcon($icon) 99 + ->setType(PHUITagView::TYPE_SHADE) 100 + ->setShade($color); 108 101 109 102 return $tag; 110 103 }
+80 -59
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 65 65 new ManiphestTransactionQuery(), 66 66 $engine); 67 67 68 - $actions = $this->buildActionView($task); 69 - 70 68 $monogram = $task->getMonogram(); 71 69 $crumbs = $this->buildApplicationCrumbs() 72 - ->addTextCrumb($monogram, '/'.$monogram); 70 + ->addTextCrumb($monogram) 71 + ->setBorder(true); 73 72 74 73 $header = $this->buildHeaderView($task); 75 - $properties = $this->buildPropertyView( 76 - $task, $field_list, $edges, $actions, $handles); 74 + $details = $this->buildPropertyView($task, $field_list, $edges, $handles); 77 75 $description = $this->buildDescriptionView($task, $engine); 78 - 79 - $object_box = id(new PHUIObjectBoxView()) 80 - ->setHeader($header) 81 - ->addPropertyList($properties); 82 - 83 - if ($description) { 84 - $object_box->addPropertyList($description); 85 - } 76 + $actions = $this->buildActionView($task); 77 + $properties = $this->buildPropertyListView($task, $handles); 86 78 87 79 $title = pht('%s %s', $monogram, $task->getTitle()); 88 80 ··· 93 85 $timeline->setQuoteRef($monogram); 94 86 $comment_view->setTransactionTimeline($timeline); 95 87 88 + $view = id(new PHUITwoColumnView()) 89 + ->setHeader($header) 90 + ->setMainColumn(array( 91 + $timeline, 92 + $comment_view, 93 + )) 94 + ->addPropertySection(pht('DETAILS'), $details) 95 + ->addPropertySection(pht('DESCRIPTION'), $description) 96 + ->setPropertyList($properties) 97 + ->setActionList($actions); 98 + 96 99 return $this->newPage() 97 100 ->setTitle($title) 98 101 ->setCrumbs($crumbs) ··· 102 105 )) 103 106 ->appendChild( 104 107 array( 105 - $object_box, 106 - $timeline, 107 - $comment_view, 108 - )); 108 + $view, 109 + )); 110 + 109 111 } 110 112 111 113 private function buildHeaderView(ManiphestTask $task) { ··· 114 116 ->setUser($this->getRequest()->getUser()) 115 117 ->setPolicyObject($task); 116 118 117 - $status = $task->getStatus(); 118 - $status_name = ManiphestTaskStatus::renderFullDescription($status); 119 + $priority_name = ManiphestTaskPriority::getTaskPriorityName( 120 + $task->getPriority()); 121 + $priority_color = ManiphestTaskPriority::getTaskPriorityColor( 122 + $task->getPriority()); 119 123 124 + $status = $task->getStatus(); 125 + $status_name = ManiphestTaskStatus::renderFullDescription( 126 + $status, $priority_name, $priority_color); 120 127 $view->addProperty(PHUIHeaderView::PROPERTY_STATUS, $status_name); 128 + 129 + $view->setHeaderIcon(ManiphestTaskStatus::getStatusIcon( 130 + $task->getStatus()).' '.$priority_color); 131 + 132 + if (ManiphestTaskPoints::getIsEnabled()) { 133 + $points = $task->getPoints(); 134 + if ($points !== null) { 135 + $points_name = pht('%s %s', 136 + $task->getPoints(), 137 + ManiphestTaskPoints::getPointsLabel()); 138 + $tag = id(new PHUITagView()) 139 + ->setName($points_name) 140 + ->setShade('blue') 141 + ->setType(PHUITagView::TYPE_SHADE); 142 + 143 + $view->addTag($tag); 144 + } 145 + } 121 146 122 147 return $view; 123 148 } ··· 198 223 ManiphestTask $task, 199 224 PhabricatorCustomFieldList $field_list, 200 225 array $edges, 201 - PhabricatorActionListView $actions, 202 226 $handles) { 203 227 204 228 $viewer = $this->getRequest()->getUser(); 205 - 206 229 $view = id(new PHUIPropertyListView()) 207 - ->setUser($viewer) 208 - ->setObject($task) 209 - ->setActionList($actions); 210 - 211 - $owner_phid = $task->getOwnerPHID(); 212 - if ($owner_phid) { 213 - $assigned_to = $handles 214 - ->renderHandle($owner_phid) 215 - ->setShowHovercard(true); 216 - } else { 217 - $assigned_to = phutil_tag('em', array(), pht('None')); 218 - } 219 - 220 - $view->addProperty(pht('Assigned To'), $assigned_to); 221 - 222 - $view->addProperty( 223 - pht('Priority'), 224 - ManiphestTaskPriority::getTaskPriorityName($task->getPriority())); 225 - 226 - $author = $handles 227 - ->renderHandle($task->getAuthorPHID()) 228 - ->setShowHovercard(true); 229 - 230 - $view->addProperty(pht('Author'), $author); 231 - 232 - if (ManiphestTaskPoints::getIsEnabled()) { 233 - $points = $task->getPoints(); 234 - if ($points !== null) { 235 - $view->addProperty( 236 - ManiphestTaskPoints::getPointsLabel(), 237 - $task->getPoints()); 238 - } 239 - } 230 + ->setUser($viewer); 240 231 241 232 $source = $task->getOriginalEmailSource(); 242 233 if ($source) { ··· 304 295 phutil_implode_html(phutil_tag('br'), $revisions_commits)); 305 296 } 306 297 307 - $view->invokeWillRenderEvent(); 308 - 309 298 $field_list->appendFieldsToPropertyList( 310 299 $task, 311 300 $viewer, 312 301 $view); 313 302 303 + if ($view->hasAnyProperties()) { 304 + return $view; 305 + } 306 + 307 + return null; 308 + } 309 + 310 + private function buildPropertyListView(ManiphestTask $task, $handles) { 311 + $viewer = $this->getRequest()->getUser(); 312 + $view = id(new PHUIPropertyListView()) 313 + ->setUser($viewer) 314 + ->setObject($task); 315 + 316 + $view->invokeWillRenderEvent(); 317 + 318 + $owner_phid = $task->getOwnerPHID(); 319 + if ($owner_phid) { 320 + $assigned_to = $handles 321 + ->renderHandle($owner_phid) 322 + ->setShowHovercard(true); 323 + } else { 324 + $assigned_to = phutil_tag('em', array(), pht('None')); 325 + } 326 + 327 + $view->addProperty(pht('Assigned To'), $assigned_to); 328 + 329 + $author_phid = $task->getAuthorPHID(); 330 + $author = $handles 331 + ->renderHandle($author_phid) 332 + ->setShowHovercard(true); 333 + 334 + $date = phabricator_datetime($task->getDateCreated(), $viewer); 335 + 336 + $view->addProperty(pht('Author'), $author); 337 + 314 338 return $view; 315 339 } 316 340 ··· 321 345 $section = null; 322 346 if (strlen($task->getDescription())) { 323 347 $section = new PHUIPropertyListView(); 324 - $section->addSectionHeader( 325 - pht('Description'), 326 - PHUIPropertyListView::ICON_SUMMARY); 327 348 $section->addTextContent( 328 349 phutil_tag( 329 350 'div',
+13 -25
src/view/phui/PHUIHeaderView.php
··· 116 116 } 117 117 118 118 public function setStatus($icon, $color, $name) { 119 - $header_class = 'phui-header-status'; 120 119 121 - if ($color) { 122 - $icon = $icon.' '.$color; 123 - $header_class = $header_class.'-'.$color; 120 + // TODO: Normalize "closed/archived" to constants. 121 + if ($color == 'dark') { 122 + $color = PHUITagView::COLOR_INDIGO; 124 123 } 125 124 126 - $img = id(new PHUIIconView()) 127 - ->setIcon($icon); 128 - 129 - $tag = phutil_tag( 130 - 'span', 131 - array( 132 - 'class' => "phui-header-status {$header_class}", 133 - ), 134 - array( 135 - $img, 136 - $name, 137 - )); 125 + $tag = id(new PHUITagView()) 126 + ->setName($name) 127 + ->setIcon($icon) 128 + ->setShade($color) 129 + ->setType(PHUITagView::TYPE_SHADE); 138 130 139 131 return $this->addProperty(self::PROPERTY_STATUS, $tag); 140 132 } ··· 285 277 $this->buttonBar); 286 278 } 287 279 288 - if ($this->actionIcons || $this->tags) { 280 + if ($this->actionIcons) { 289 281 $action_list = array(); 290 282 if ($this->actionIcons) { 291 283 foreach ($this->actionIcons as $icon) { ··· 296 288 ), 297 289 $icon); 298 290 } 299 - } 300 - if ($this->tags) { 301 - $action_list[] = phutil_tag( 302 - 'li', 303 - array( 304 - 'class' => 'phui-header-action-tag', 305 - ), 306 - array_interleave(' ', $this->tags)); 307 291 } 308 292 $right[] = phutil_tag( 309 293 'ul', ··· 377 361 378 362 if ($this->policyObject) { 379 363 $property_list[] = $this->renderPolicyProperty($this->policyObject); 364 + } 365 + 366 + if ($this->tags) { 367 + $property_list[] = $this->tags; 380 368 } 381 369 382 370 $left[] = phutil_tag(
+1 -1
webroot/rsrc/css/font/phui-font-icon-base.css
··· 148 148 } 149 149 .phui-icon-view.lightgreytext, 150 150 .phui-icon-view.grey { 151 - color: {$lightgreytext}; 151 + color: rgba({$alphagrey},0.3); 152 152 } 153 153 154 154 /* Hovers */
+11 -23
webroot/rsrc/css/phui/phui-header-view.css
··· 175 175 margin-top: 8px; 176 176 } 177 177 178 - .phui-header-subheader .phui-icon-view { 178 + .phui-header-subheader .phui-tag-view .phui-icon-view, 179 + .phui-header-subheader .policy-header-callout .phui-icon-view { 179 180 display: inline-block; 180 181 margin: -2px 4px -2px 0; 181 182 font-size: 15px; ··· 187 188 } 188 189 189 190 .policy-header-callout, 190 - .phui-header-subheader .phui-header-status { 191 + .phui-header-subheader .phui-tag-core { 191 192 padding: 3px 9px; 192 193 border-radius: 3px; 193 - background: rgba({$alphablue}, 0.08); 194 + background: rgba({$alphablue}, 0.1); 194 195 margin-right: 8px; 196 + -webkit-font-smoothing: auto; 197 + border-color: transparent; 198 + } 199 + 200 + .phui-header-subheader .phui-tag-type-shade .phui-tag-core { 201 + border: none; 202 + -webkit-font-smoothing: auto; 195 203 } 196 204 197 205 .policy-header-callout.policy-adjusted-weaker { ··· 219 227 .policy-header-callout.policy-adjusted-different .policy-link, 220 228 .policy-header-callout.policy-adjusted-different .phui-icon-view { 221 229 color: {$sh-orangetext}; 222 - } 223 - 224 - .phui-header-subheader .phui-header-status-dark { 225 - color: {$sh-indigotext}; 226 - background: {$sh-indigobackground}; 227 - margin-right: 8px; 228 - } 229 - 230 - .phui-header-subheader .phui-header-status-dark .phui-icon-view { 231 - color: {$sh-indigotext}; 232 - } 233 - 234 - .phui-header-subheader .phui-header-status-red { 235 - color: {$sh-redtext}; 236 - background: {$sh-redbackground}; 237 - } 238 - 239 - .phui-header-subheader .phui-header-status-green { 240 - color: {$sh-greentext}; 241 - background: {$sh-greenbackground}; 242 230 } 243 231 244 232 .phui-header-action-links .phui-mobile-menu {
+20
webroot/rsrc/css/phui/phui-tag-view.css
··· 257 257 border-color: {$sh-blueborder}; 258 258 } 259 259 260 + /* - Sky ------------------------------------------------------------------- */ 261 + 262 + .phui-tag-shade-sky .phui-tag-core, 263 + .jx-tokenizer-token.sky { 264 + background: #E0F0FA; 265 + border-color: {$sh-lightblueborder}; 266 + color: {$sh-bluetext}; 267 + } 268 + 269 + .phui-tag-shade-sky .phui-icon-view, 270 + .jx-tokenizer-token.sky .phui-icon-view, 271 + .jx-tokenizer-token.sky .jx-tokenizer-x { 272 + color: {$sh-blueicon}; 273 + } 274 + 275 + a.phui-tag-view:hover.phui-tag-shade-sky .phui-tag-core, 276 + .jx-tokenizer-token.sky:hover { 277 + border-color: {$sh-blueborder}; 278 + } 279 + 260 280 /* - Indigo ----------------------------------------------------------------- */ 261 281 262 282 .phui-tag-shade-indigo .phui-tag-core,
+15 -5
webroot/rsrc/css/phui/phui-two-column-view.css
··· 8 8 margin-bottom: 24px; 9 9 } 10 10 11 + .device .phui-two-column-view .phui-two-column-header { 12 + margin-bottom: 12px; 13 + } 14 + 11 15 .phui-two-column-view.with-subheader .phui-two-column-header { 12 16 margin-bottom: 0; 13 17 } ··· 99 103 margin: 0; 100 104 } 101 105 106 + .phui-main-column > .phui-timeline-view { 107 + border-top: 1px solid {$thinblueborder}; 108 + } 109 + 102 110 /* Main Column Properties */ 103 111 104 112 .device-desktop .phui-main-column .phui-property-list-key { ··· 144 152 padding: 0 4px; 145 153 } 146 154 147 - .device-desktop .phui-two-column-properties .phui-property-list-container { 155 + .device .phui-two-column-properties .phui-property-list-stacked 156 + .phui-property-list-properties .phui-property-list-value { 157 + margin-bottom: 12px; 158 + } 159 + 160 + .device-desktop .phui-two-column-properties .phui-property-list-container, 161 + .device .phui-two-column-properties .phui-property-list-container { 148 162 padding: 0; 149 163 } 150 164 ··· 153 167 margin: 12px 0 4px 0; 154 168 padding: 0; 155 169 border: none; 156 - } 157 - 158 - .device .phui-two-column-properties .phui-property-list-container { 159 - padding: 0 0 12px 0; 160 170 } 161 171 162 172 .device .phui-two-column-content .phui-two-column-properties.phui-object-box {