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

Remove "State Icons" from handles

Summary: Ref T13440. This feature is used in only one interface which I'm about to rewrite, so throw it away.

Test Plan: Grepped for all affected symbols, didn't find any hits anywhere.

Maniphest Tasks: T13440

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

+2 -106
-9
src/applications/differential/phid/DifferentialRevisionPHIDType.php
··· 44 44 if ($revision->isClosed()) { 45 45 $handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED); 46 46 } 47 - 48 - $icon = $revision->getStatusIcon(); 49 - $color = $revision->getStatusIconColor(); 50 - $name = $revision->getStatusDisplayName(); 51 - 52 - $handle 53 - ->setStateIcon($icon) 54 - ->setStateColor($color) 55 - ->setStateName($name); 56 47 } 57 48 } 58 49
+2 -4
src/applications/maniphest/controller/ManiphestTaskDetailController.php
··· 413 413 414 414 foreach ($commit_phids as $phid) { 415 415 $revisions_commits[$phid] = $handles->renderHandle($phid) 416 - ->setShowHovercard(true) 417 - ->setShowStateIcon(true); 416 + ->setShowHovercard(true); 418 417 $revision_phid = key($drev_edges[$phid][$commit_drev]); 419 418 $revision_handle = $handles->getHandleIfExists($revision_phid); 420 419 if ($revision_handle) { ··· 435 434 436 435 $edge_handles = $viewer->loadHandles(array_keys($edges[$edge_type])); 437 436 438 - $edge_list = $edge_handles->renderList() 439 - ->setShowStateIcons(true); 437 + $edge_list = $edge_handles->renderList(); 440 438 441 439 $view->addProperty($edge_name, $edge_list); 442 440 }
-53
src/applications/phid/PhabricatorObjectHandle.php
··· 33 33 private $commandLineObjectName; 34 34 private $mailStampName; 35 35 36 - private $stateIcon; 37 - private $stateColor; 38 - private $stateName; 39 - 40 36 public function setIcon($icon) { 41 37 $this->icon = $icon; 42 38 return $this; ··· 297 293 */ 298 294 public function isComplete() { 299 295 return $this->complete; 300 - } 301 - 302 - public function setStateIcon($state_icon) { 303 - $this->stateIcon = $state_icon; 304 - return $this; 305 - } 306 - 307 - public function getStateIcon() { 308 - return $this->stateIcon; 309 - } 310 - 311 - public function setStateColor($state_color) { 312 - $this->stateColor = $state_color; 313 - return $this; 314 - } 315 - 316 - public function getStateColor() { 317 - return $this->stateColor; 318 - } 319 - 320 - public function setStateName($state_name) { 321 - $this->stateName = $state_name; 322 - return $this; 323 - } 324 - 325 - public function getStateName() { 326 - return $this->stateName; 327 - } 328 - 329 - public function renderStateIcon() { 330 - $icon = $this->getStateIcon(); 331 - if ($icon === null) { 332 - $icon = 'fa-question-circle-o'; 333 - } 334 - 335 - $color = $this->getStateColor(); 336 - 337 - $name = $this->getStateName(); 338 - if ($name === null) { 339 - $name = pht('Unknown'); 340 - } 341 - 342 - return id(new PHUIIconView()) 343 - ->setIcon($icon, $color) 344 - ->addSigil('has-tooltip') 345 - ->setMetadata( 346 - array( 347 - 'tip' => $name, 348 - )); 349 296 } 350 297 351 298 public function renderLink($name = null) {
-15
src/applications/phid/view/PHUIHandleListView.php
··· 13 13 private $handleList; 14 14 private $asInline; 15 15 private $asText; 16 - private $showStateIcons; 17 16 private $glyphLimit; 18 17 19 18 public function setHandleList(PhabricatorHandleList $list) { ··· 39 38 return $this->asText; 40 39 } 41 40 42 - public function setShowStateIcons($show_state_icons) { 43 - $this->showStateIcons = $show_state_icons; 44 - return $this; 45 - } 46 - 47 - public function getShowStateIcons() { 48 - return $this->showStateIcons; 49 - } 50 - 51 41 public function setGlyphLimit($glyph_limit) { 52 42 $this->glyphLimit = $glyph_limit; 53 43 return $this; ··· 70 60 protected function getTagContent() { 71 61 $list = $this->handleList; 72 62 73 - $show_state_icons = $this->getShowStateIcons(); 74 63 $glyph_limit = $this->getGlyphLimit(); 75 64 76 65 $items = array(); ··· 78 67 $view = $list->renderHandle($handle->getPHID()) 79 68 ->setShowHovercard(true) 80 69 ->setAsText($this->getAsText()); 81 - 82 - if ($show_state_icons) { 83 - $view->setShowStateIcon(true); 84 - } 85 70 86 71 if ($glyph_limit) { 87 72 $view->setGlyphLimit($glyph_limit);
-15
src/applications/phid/view/PHUIHandleView.php
··· 17 17 private $asText; 18 18 private $useShortName; 19 19 private $showHovercard; 20 - private $showStateIcon; 21 20 private $glyphLimit; 22 21 23 22 public function setHandleList(PhabricatorHandleList $list) { ··· 48 47 public function setShowHovercard($hovercard) { 49 48 $this->showHovercard = $hovercard; 50 49 return $this; 51 - } 52 - 53 - public function setShowStateIcon($show_state_icon) { 54 - $this->showStateIcon = $show_state_icon; 55 - return $this; 56 - } 57 - 58 - public function getShowStateIcon() { 59 - return $this->showStateIcon; 60 50 } 61 51 62 52 public function setGlyphLimit($glyph_limit) { ··· 102 92 $link = $handle->renderHovercardLink($name); 103 93 } else { 104 94 $link = $handle->renderLink($name); 105 - } 106 - 107 - if ($this->showStateIcon) { 108 - $icon = $handle->renderStateIcon(); 109 - $link = array($icon, ' ', $link); 110 95 } 111 96 112 97 return $link;
-10
src/applications/repository/phid/PhabricatorRepositoryCommitPHIDType.php
··· 81 81 $handle->setFullName($full_name); 82 82 $handle->setURI($commit->getURI()); 83 83 $handle->setTimestamp($commit->getEpoch()); 84 - 85 - $status = $commit->getAuditStatusObject(); 86 - $icon = $status->getIcon(); 87 - $color = $status->getColor(); 88 - $name = $status->getName(); 89 - 90 - $handle 91 - ->setStateIcon($icon) 92 - ->setStateColor($color) 93 - ->setStateName($name); 94 84 } 95 85 } 96 86