1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-26 16:52:41 +01:00

Remove badge support from PHUIHeaderView

Summary: These are now unused.

Test Plan: grep, remove uiexamples

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18090
This commit is contained in:
Chad Little 2017-06-07 13:27:26 +00:00 committed by chad
parent 0700bb2aca
commit 7c955d795e
5 changed files with 8 additions and 49 deletions

View file

@ -9,7 +9,7 @@ return array(
'names' => array( 'names' => array(
'conpherence.pkg.css' => 'ff161f2d', 'conpherence.pkg.css' => 'ff161f2d',
'conpherence.pkg.js' => 'b5b51108', 'conpherence.pkg.js' => 'b5b51108',
'core.pkg.css' => '7e4901ea', 'core.pkg.css' => 'ab24402f',
'core.pkg.js' => '1475bd91', 'core.pkg.js' => '1475bd91',
'darkconsole.pkg.js' => '1f9a31bc', 'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '1ccbf3a9', 'differential.pkg.css' => '1ccbf3a9',
@ -157,7 +157,7 @@ return array(
'rsrc/css/phui/phui-form-view.css' => '6175808d', 'rsrc/css/phui/phui-form-view.css' => '6175808d',
'rsrc/css/phui/phui-form.css' => 'a5570f70', 'rsrc/css/phui/phui-form.css' => 'a5570f70',
'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f', 'rsrc/css/phui/phui-head-thing.css' => 'fd311e5f',
'rsrc/css/phui/phui-header-view.css' => '73edce66', 'rsrc/css/phui/phui-header-view.css' => 'e7de7ee2',
'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf', 'rsrc/css/phui/phui-hovercard.css' => 'f0592bcf',
'rsrc/css/phui/phui-icon-set-selector.css' => '87db8fee', 'rsrc/css/phui/phui-icon-set-selector.css' => '87db8fee',
'rsrc/css/phui/phui-icon.css' => '4c46b6ba', 'rsrc/css/phui/phui-icon.css' => '4c46b6ba',
@ -843,7 +843,7 @@ return array(
'phui-form-css' => 'a5570f70', 'phui-form-css' => 'a5570f70',
'phui-form-view-css' => '6175808d', 'phui-form-view-css' => '6175808d',
'phui-head-thing-view-css' => 'fd311e5f', 'phui-head-thing-view-css' => 'fd311e5f',
'phui-header-view-css' => '73edce66', 'phui-header-view-css' => 'e7de7ee2',
'phui-hovercard' => '1bd28176', 'phui-hovercard' => '1bd28176',
'phui-hovercard-view-css' => 'f0592bcf', 'phui-hovercard-view-css' => 'f0592bcf',
'phui-icon-set-selector-css' => '87db8fee', 'phui-icon-set-selector-css' => '87db8fee',

View file

@ -68,21 +68,10 @@ final class PHUIBoxExample extends PhabricatorUIExample {
->setText(pht('Such Wow')) ->setText(pht('Such Wow'))
->addClass(PHUI::MARGIN_SMALL_RIGHT); ->addClass(PHUI::MARGIN_SMALL_RIGHT);
$badge1 = id(new PHUIBadgeMiniView())
->setIcon('fa-bug')
->setHeader(pht('Bugmeister'));
$badge2 = id(new PHUIBadgeMiniView())
->setIcon('fa-heart')
->setHeader(pht('Funder'))
->setQuality(PhabricatorBadgesQuality::UNCOMMON);
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader(pht('Fancy Box')) ->setHeader(pht('Fancy Box'))
->addActionLink($button) ->addActionLink($button)
->setSubheader(pht('Much Features')) ->setSubheader(pht('Much Features'));
->addBadge($badge1)
->addBadge($badge2);
$obj4 = id(new PHUIObjectBoxView()) $obj4 = id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)
@ -116,7 +105,9 @@ final class PHUIBoxExample extends PhabricatorUIExample {
return phutil_tag( return phutil_tag(
'div', 'div',
array(), array(
'class' => 'ml',
),
array( array(
$head1, $head1,
$wrap1, $wrap1,

View file

@ -55,14 +55,6 @@ final class PHUIHovercardUIExample extends PhabricatorUIExample {
->addTag($tag)); ->addTag($tag));
$elements[] = $panel; $elements[] = $panel;
$badge1 = id(new PHUIBadgeMiniView())
->setIcon('fa-book')
->setHeader(pht('Documenter'));
$badge2 = id(new PHUIBadgeMiniView())
->setIcon('fa-star')
->setHeader(pht('Contributor'));
$user_handle = $this->createBasicDummyHandle( $user_handle = $this->createBasicDummyHandle(
'gwashington', 'gwashington',
PhabricatorPeopleUserPHIDType::TYPECONST, PhabricatorPeopleUserPHIDType::TYPECONST,
@ -75,8 +67,6 @@ final class PHUIHovercardUIExample extends PhabricatorUIExample {
->addField(pht('Status'), pht('Available')) ->addField(pht('Status'), pht('Available'))
->addField(pht('Member since'), '30. February 1750') ->addField(pht('Member since'), '30. February 1750')
->addAction(pht('Send a Message'), '/dev/null') ->addAction(pht('Send a Message'), '/dev/null')
->addBadge($badge1)
->addBadge($badge2)
->setUser($user)); ->setUser($user));
$elements[] = $panel; $elements[] = $panel;

View file

@ -21,7 +21,6 @@ final class PHUIHeaderView extends AphrontTagView {
private $policyObject; private $policyObject;
private $epoch; private $epoch;
private $actionItems = array(); private $actionItems = array();
private $badges = array();
private $href; private $href;
private $actionList; private $actionList;
private $actionListID; private $actionListID;
@ -46,11 +45,6 @@ final class PHUIHeaderView extends AphrontTagView {
return $this; return $this;
} }
public function addBadge(PHUIBadgeMiniView $badge) {
$this->badges[] = $badge;
return $this;
}
public function setImage($uri) { public function setImage($uri) {
$this->image = $uri; $this->image = $uri;
return $this; return $this;
@ -341,21 +335,13 @@ final class PHUIHeaderView extends AphrontTagView {
$header_content, $header_content,
)); ));
if ($this->subheader || $this->badges) { if ($this->subheader) {
$badges = null;
if ($this->badges) {
$badges = new PHUIBadgeBoxView();
$badges->addItems($this->badges);
$badges->setCollapsed(true);
}
$left[] = phutil_tag( $left[] = phutil_tag(
'div', 'div',
array( array(
'class' => 'phui-header-subheader', 'class' => 'phui-header-subheader',
), ),
array( array(
$badges,
$this->subheader, $this->subheader,
)); ));
} }

View file

@ -307,14 +307,6 @@ body .phui-header-shell.phui-bleed-header
text-decoration: underline; text-decoration: underline;
} }
.phui-header-subheader .phui-badge-flex-view {
display: inline;
margin-right: 4px;
}
.phui-header-subheader .phui-badge-flex-view:after {
display: inline;
}
/*** Profile Header ***********************************************************/ /*** Profile Header ***********************************************************/