mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-27 07:50:57 +01:00
Search and Replace calls to setShade
Summary: grep for setShade and update to setColor. Add deprecated warning. Test Plan: Diffusion, Workboards, Maniphest, Project tags, tokenizer, uiexamples Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin, O14 ATC Monitoring Differential Revision: https://secure.phabricator.com/D17995
This commit is contained in:
parent
3a0a086a09
commit
00400ae6f9
17 changed files with 26 additions and 20 deletions
|
@ -29,7 +29,7 @@ final class PHUIUserAvailabilityView
|
|||
|
||||
$away_tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade($color)
|
||||
->setColor($color)
|
||||
->setName($name)
|
||||
->setDotColor($color);
|
||||
|
||||
|
|
|
@ -71,7 +71,7 @@ abstract class ConpherenceController extends PhabricatorController {
|
|||
if (strlen($data['topic'])) {
|
||||
$topic = id(new PHUITagView())
|
||||
->setName($data['topic'])
|
||||
->setShade(PHUITagView::COLOR_VIOLET)
|
||||
->setColor(PHUITagView::COLOR_VIOLET)
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->addClass('conpherence-header-topic');
|
||||
$header->addTag($topic);
|
||||
|
|
|
@ -65,7 +65,7 @@ final class DifferentialRevisionStatus extends Phobject {
|
|||
$tag = id(new PHUITagView())
|
||||
->setName($status_name)
|
||||
->setIcon(self::getRevisionStatusIcon($status))
|
||||
->setShade(self::getRevisionStatusColor($status))
|
||||
->setColor(self::getRevisionStatusColor($status))
|
||||
->setType(PHUITagView::TYPE_SHADE);
|
||||
|
||||
return $tag;
|
||||
|
|
|
@ -44,7 +44,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
|
|||
if ($ttl !== null) {
|
||||
$ttl_tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade(PHUITagView::COLOR_YELLOW)
|
||||
->setColor(PHUITagView::COLOR_YELLOW)
|
||||
->setName(pht('Temporary'));
|
||||
$header->addTag($ttl_tag);
|
||||
}
|
||||
|
@ -53,7 +53,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
|
|||
if ($partial) {
|
||||
$partial_tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade(PHUITagView::COLOR_ORANGE)
|
||||
->setColor(PHUITagView::COLOR_ORANGE)
|
||||
->setName(pht('Partial Upload'));
|
||||
$header->addTag($partial_tag);
|
||||
}
|
||||
|
|
|
@ -56,7 +56,7 @@ final class HarbormasterUnitSummaryView extends AphrontView {
|
|||
|
||||
$tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade($tag_color)
|
||||
->setColor($tag_color)
|
||||
->setIcon($tag_icon)
|
||||
->setName($tag_text);
|
||||
|
||||
|
|
|
@ -97,7 +97,7 @@ final class ManiphestTaskStatus extends ManiphestConstants {
|
|||
->setName($name)
|
||||
->setIcon($icon)
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade($color);
|
||||
->setColor($color);
|
||||
|
||||
return $tag;
|
||||
}
|
||||
|
|
|
@ -64,7 +64,7 @@ final class PhabricatorOwnersHovercardEngineExtension
|
|||
if ($package->isArchived()) {
|
||||
$tag = id(new PHUITagView())
|
||||
->setName(pht('Archived'))
|
||||
->setShade(PHUITagView::COLOR_INDIGO)
|
||||
->setColor(PHUITagView::COLOR_INDIGO)
|
||||
->setType(PHUITagView::TYPE_OBJECT);
|
||||
$hovercard->addTag($tag);
|
||||
}
|
||||
|
|
|
@ -85,7 +85,7 @@ final class PhabricatorUserCardView extends AphrontTagView {
|
|||
->setType(PHUITagView::TYPE_SHADE);
|
||||
|
||||
if ($tag_shade !== null) {
|
||||
$tag->setShade($tag_shade);
|
||||
$tag->setColor($tag_shade);
|
||||
}
|
||||
|
||||
$body = array();
|
||||
|
|
|
@ -331,7 +331,7 @@ final class PhabricatorProjectBoardViewController
|
|||
|
||||
$count_tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade(PHUITagView::COLOR_BLUE)
|
||||
->setColor(PHUITagView::COLOR_BLUE)
|
||||
->addSigil('column-points')
|
||||
->setName(
|
||||
javelin_tag(
|
||||
|
|
|
@ -211,7 +211,7 @@ final class PhabricatorProjectSearchEngine
|
|||
$options[$color] = array(
|
||||
id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade($color)
|
||||
->setColor($color)
|
||||
->setName($name),
|
||||
);
|
||||
}
|
||||
|
|
|
@ -100,7 +100,7 @@ final class ProjectBoardTaskCard extends Phobject {
|
|||
if ($points !== null) {
|
||||
$points_tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade(PHUITagView::COLOR_GREY)
|
||||
->setColor(PHUITagView::COLOR_GREY)
|
||||
->setSlimShady(true)
|
||||
->setName($points)
|
||||
->addClass('phui-workcard-points');
|
||||
|
|
|
@ -64,7 +64,7 @@ final class PhabricatorFulltextToken extends Phobject {
|
|||
|
||||
$tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade($shade)
|
||||
->setColor($shade)
|
||||
->setName($token->getValue());
|
||||
|
||||
if ($tip !== null) {
|
||||
|
|
|
@ -187,12 +187,12 @@ final class PHUITagExample extends PhabricatorUIExample {
|
|||
foreach ($outlines as $outline) {
|
||||
$tags[] = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_OUTLINE)
|
||||
->setShade($outline)
|
||||
->setColor($outline)
|
||||
->setName($outline);
|
||||
$tags[] = hsprintf(' ');
|
||||
$tags[] = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_OUTLINE)
|
||||
->setShade($outline)
|
||||
->setColor($outline)
|
||||
->setSlimShady(true)
|
||||
->setName($outline);
|
||||
$tags[] = hsprintf('<br /><br />');
|
||||
|
|
|
@ -148,7 +148,7 @@ final class PHUIDiffInlineCommentDetailView
|
|||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setName(pht('Unsubmitted'))
|
||||
->setSlimShady(true)
|
||||
->setShade(PHUITagView::COLOR_RED)
|
||||
->setColor(PHUITagView::COLOR_RED)
|
||||
->addClass('mml inline-draft-text');
|
||||
}
|
||||
|
||||
|
@ -383,7 +383,7 @@ final class PHUIDiffInlineCommentDetailView
|
|||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setName(pht('Author'))
|
||||
->setSlimShady(true)
|
||||
->setShade(PHUITagView::COLOR_YELLOW)
|
||||
->setColor(PHUITagView::COLOR_YELLOW)
|
||||
->addClass('mml');
|
||||
}
|
||||
}
|
||||
|
|
|
@ -60,7 +60,7 @@ final class PhabricatorNavigationRemarkupRule extends PhutilRemarkupRule {
|
|||
|
||||
$tag = id(new PHUITagView())
|
||||
->setType(PHUITagView::TYPE_SHADE)
|
||||
->setShade($item_color)
|
||||
->setColor($item_color)
|
||||
->setName($item_name);
|
||||
|
||||
if ($item['icon']) {
|
||||
|
|
|
@ -131,7 +131,7 @@ final class PHUIHeaderView extends AphrontTagView {
|
|||
$tag = id(new PHUITagView())
|
||||
->setName($name)
|
||||
->setIcon($icon)
|
||||
->setShade($color)
|
||||
->setColor($color)
|
||||
->setType(PHUITagView::TYPE_SHADE);
|
||||
|
||||
return $this->addProperty(self::PROPERTY_STATUS, $tag);
|
||||
|
|
|
@ -57,8 +57,14 @@ final class PHUITagView extends AphrontTagView {
|
|||
return $this;
|
||||
}
|
||||
|
||||
/* Deprecated, use setColor */
|
||||
/**
|
||||
* This method has been deprecated, use @{method:setColor} instead.
|
||||
*
|
||||
* @deprecated
|
||||
*/
|
||||
public function setShade($shade) {
|
||||
phlog(
|
||||
pht('Deprecated call to setShade(), use setColor() instead.'));
|
||||
$this->color = $shade;
|
||||
return $this;
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue