mirror of
https://we.phorge.it/source/phorge.git
synced 2025-01-10 14:51:06 +01:00
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
This commit is contained in:
parent
97bed35085
commit
b0d9f89c95
6 changed files with 2 additions and 106 deletions
|
@ -44,15 +44,6 @@ final class DifferentialRevisionPHIDType extends PhabricatorPHIDType {
|
|||
if ($revision->isClosed()) {
|
||||
$handle->setStatus(PhabricatorObjectHandle::STATUS_CLOSED);
|
||||
}
|
||||
|
||||
$icon = $revision->getStatusIcon();
|
||||
$color = $revision->getStatusIconColor();
|
||||
$name = $revision->getStatusDisplayName();
|
||||
|
||||
$handle
|
||||
->setStateIcon($icon)
|
||||
->setStateColor($color)
|
||||
->setStateName($name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
@ -413,8 +413,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
|||
|
||||
foreach ($commit_phids as $phid) {
|
||||
$revisions_commits[$phid] = $handles->renderHandle($phid)
|
||||
->setShowHovercard(true)
|
||||
->setShowStateIcon(true);
|
||||
->setShowHovercard(true);
|
||||
$revision_phid = key($drev_edges[$phid][$commit_drev]);
|
||||
$revision_handle = $handles->getHandleIfExists($revision_phid);
|
||||
if ($revision_handle) {
|
||||
|
@ -435,8 +434,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
|
|||
|
||||
$edge_handles = $viewer->loadHandles(array_keys($edges[$edge_type]));
|
||||
|
||||
$edge_list = $edge_handles->renderList()
|
||||
->setShowStateIcons(true);
|
||||
$edge_list = $edge_handles->renderList();
|
||||
|
||||
$view->addProperty($edge_name, $edge_list);
|
||||
}
|
||||
|
|
|
@ -33,10 +33,6 @@ final class PhabricatorObjectHandle
|
|||
private $commandLineObjectName;
|
||||
private $mailStampName;
|
||||
|
||||
private $stateIcon;
|
||||
private $stateColor;
|
||||
private $stateName;
|
||||
|
||||
public function setIcon($icon) {
|
||||
$this->icon = $icon;
|
||||
return $this;
|
||||
|
@ -299,55 +295,6 @@ final class PhabricatorObjectHandle
|
|||
return $this->complete;
|
||||
}
|
||||
|
||||
public function setStateIcon($state_icon) {
|
||||
$this->stateIcon = $state_icon;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getStateIcon() {
|
||||
return $this->stateIcon;
|
||||
}
|
||||
|
||||
public function setStateColor($state_color) {
|
||||
$this->stateColor = $state_color;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getStateColor() {
|
||||
return $this->stateColor;
|
||||
}
|
||||
|
||||
public function setStateName($state_name) {
|
||||
$this->stateName = $state_name;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getStateName() {
|
||||
return $this->stateName;
|
||||
}
|
||||
|
||||
public function renderStateIcon() {
|
||||
$icon = $this->getStateIcon();
|
||||
if ($icon === null) {
|
||||
$icon = 'fa-question-circle-o';
|
||||
}
|
||||
|
||||
$color = $this->getStateColor();
|
||||
|
||||
$name = $this->getStateName();
|
||||
if ($name === null) {
|
||||
$name = pht('Unknown');
|
||||
}
|
||||
|
||||
return id(new PHUIIconView())
|
||||
->setIcon($icon, $color)
|
||||
->addSigil('has-tooltip')
|
||||
->setMetadata(
|
||||
array(
|
||||
'tip' => $name,
|
||||
));
|
||||
}
|
||||
|
||||
public function renderLink($name = null) {
|
||||
return $this->renderLinkWithAttributes($name, array());
|
||||
}
|
||||
|
|
|
@ -13,7 +13,6 @@ final class PHUIHandleListView
|
|||
private $handleList;
|
||||
private $asInline;
|
||||
private $asText;
|
||||
private $showStateIcons;
|
||||
private $glyphLimit;
|
||||
|
||||
public function setHandleList(PhabricatorHandleList $list) {
|
||||
|
@ -39,15 +38,6 @@ final class PHUIHandleListView
|
|||
return $this->asText;
|
||||
}
|
||||
|
||||
public function setShowStateIcons($show_state_icons) {
|
||||
$this->showStateIcons = $show_state_icons;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getShowStateIcons() {
|
||||
return $this->showStateIcons;
|
||||
}
|
||||
|
||||
public function setGlyphLimit($glyph_limit) {
|
||||
$this->glyphLimit = $glyph_limit;
|
||||
return $this;
|
||||
|
@ -70,7 +60,6 @@ final class PHUIHandleListView
|
|||
protected function getTagContent() {
|
||||
$list = $this->handleList;
|
||||
|
||||
$show_state_icons = $this->getShowStateIcons();
|
||||
$glyph_limit = $this->getGlyphLimit();
|
||||
|
||||
$items = array();
|
||||
|
@ -79,10 +68,6 @@ final class PHUIHandleListView
|
|||
->setShowHovercard(true)
|
||||
->setAsText($this->getAsText());
|
||||
|
||||
if ($show_state_icons) {
|
||||
$view->setShowStateIcon(true);
|
||||
}
|
||||
|
||||
if ($glyph_limit) {
|
||||
$view->setGlyphLimit($glyph_limit);
|
||||
}
|
||||
|
|
|
@ -17,7 +17,6 @@ final class PHUIHandleView
|
|||
private $asText;
|
||||
private $useShortName;
|
||||
private $showHovercard;
|
||||
private $showStateIcon;
|
||||
private $glyphLimit;
|
||||
|
||||
public function setHandleList(PhabricatorHandleList $list) {
|
||||
|
@ -50,15 +49,6 @@ final class PHUIHandleView
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function setShowStateIcon($show_state_icon) {
|
||||
$this->showStateIcon = $show_state_icon;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getShowStateIcon() {
|
||||
return $this->showStateIcon;
|
||||
}
|
||||
|
||||
public function setGlyphLimit($glyph_limit) {
|
||||
$this->glyphLimit = $glyph_limit;
|
||||
return $this;
|
||||
|
@ -104,11 +94,6 @@ final class PHUIHandleView
|
|||
$link = $handle->renderLink($name);
|
||||
}
|
||||
|
||||
if ($this->showStateIcon) {
|
||||
$icon = $handle->renderStateIcon();
|
||||
$link = array($icon, ' ', $link);
|
||||
}
|
||||
|
||||
return $link;
|
||||
}
|
||||
|
||||
|
|
|
@ -81,16 +81,6 @@ final class PhabricatorRepositoryCommitPHIDType extends PhabricatorPHIDType {
|
|||
$handle->setFullName($full_name);
|
||||
$handle->setURI($commit->getURI());
|
||||
$handle->setTimestamp($commit->getEpoch());
|
||||
|
||||
$status = $commit->getAuditStatusObject();
|
||||
$icon = $status->getIcon();
|
||||
$color = $status->getColor();
|
||||
$name = $status->getName();
|
||||
|
||||
$handle
|
||||
->setStateIcon($icon)
|
||||
->setStateColor($color)
|
||||
->setStateName($name);
|
||||
}
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue