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

Clean up dropdown carets

Summary: Adds dropdown carets to buttons more universally that are actually dropdowns.

Test Plan: Differential, Application Search, Diffusion. Mobile and Desktop.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18292
This commit is contained in:
Chad Little 2017-07-28 15:11:08 -07:00
parent ee884db1f9
commit ea0db5aa9d
4 changed files with 28 additions and 30 deletions

View file

@ -9,7 +9,7 @@ return array(
'names' => array( 'names' => array(
'conpherence.pkg.css' => 'e68cf1fa', 'conpherence.pkg.css' => 'e68cf1fa',
'conpherence.pkg.js' => 'b5b51108', 'conpherence.pkg.js' => 'b5b51108',
'core.pkg.css' => 'd6046dd9', 'core.pkg.css' => 'd9c9cfd0',
'core.pkg.js' => '5d80e0db', 'core.pkg.js' => '5d80e0db',
'darkconsole.pkg.js' => '1f9a31bc', 'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => '45951e9e', 'differential.pkg.css' => '45951e9e',
@ -127,7 +127,7 @@ return array(
'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829', 'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829',
'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494', 'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494',
'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68', 'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68',
'rsrc/css/phui/button/phui-button.css' => '3a744520', 'rsrc/css/phui/button/phui-button.css' => '3ca51caa',
'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893', 'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893',
'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600', 'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600',
'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf', 'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf',
@ -825,7 +825,7 @@ return array(
'phui-big-info-view-css' => 'd13afcde', 'phui-big-info-view-css' => 'd13afcde',
'phui-box-css' => '745e881d', 'phui-box-css' => '745e881d',
'phui-button-bar-css' => 'f1ff5494', 'phui-button-bar-css' => 'f1ff5494',
'phui-button-css' => '3a744520', 'phui-button-css' => '3ca51caa',
'phui-button-simple-css' => '8e1baf68', 'phui-button-simple-css' => '8e1baf68',
'phui-calendar-css' => 'f1ddf11c', 'phui-calendar-css' => 'f1ddf11c',
'phui-calendar-day-css' => '572b1893', 'phui-calendar-day-css' => '572b1893',

View file

@ -554,7 +554,7 @@ final class PhabricatorApplicationSearchController
return id(new PHUIButtonView()) return id(new PHUIButtonView())
->setTag('a') ->setTag('a')
->setHref('#') ->setHref('#')
->setText(pht('Use Results...')) ->setText(pht('Use Results'))
->setIcon('fa-bars') ->setIcon('fa-bars')
->setDropdownMenu($action_list) ->setDropdownMenu($action_list)
->addClass('dropdown'); ->addClass('dropdown');

View file

@ -134,6 +134,7 @@ final class PHUIButtonView extends AphrontTagView {
Javelin::initBehavior('phui-dropdown-menu'); Javelin::initBehavior('phui-dropdown-menu');
$this->addSigil('phui-dropdown-menu'); $this->addSigil('phui-dropdown-menu');
$this->setDropdown(true);
$this->setMetadata($actions->getDropdownMenuMetadata()); $this->setMetadata($actions->getDropdownMenuMetadata());
return $this; return $this;
@ -223,32 +224,29 @@ final class PHUIButtonView extends AphrontTagView {
protected function getTagContent() { protected function getTagContent() {
$icon = null; $icon = $this->icon;
$text = $this->text; $text = null;
if ($this->icon) { $subtext = null;
$icon = $this->icon;
$subtext = null; if ($this->subtext) {
if ($this->subtext) { $subtext = phutil_tag(
$subtext = phutil_tag( 'div',
'div', array(
array( 'class' => 'phui-button-subtext',
'class' => 'phui-button-subtext', ),
), $this->subtext);
$this->subtext); }
}
if ($this->text !== null) { if ($this->text !== null) {
$text = phutil_tag( $text = phutil_tag(
'div', 'div',
array( array(
'class' => 'phui-button-text', 'class' => 'phui-button-text',
), ),
array( array(
$text, $this->text,
$subtext, $subtext,
)); ));
}
} }
$caret = null; $caret = null;
@ -259,7 +257,7 @@ final class PHUIButtonView extends AphrontTagView {
if ($this->iconFirst == true) { if ($this->iconFirst == true) {
return array($icon, $text, $caret); return array($icon, $text, $caret);
} else { } else {
return array($text, $icon); return array($text, $icon, $caret);
} }
} }
} }

View file

@ -270,7 +270,7 @@ a.policy-control .phui-button-text {
} }
.dropdown .phui-button-text { .dropdown .phui-button-text {
margin-right: 16px; margin-right: 8px;
} }
.button.has-icon .phui-button-text { .button.has-icon .phui-button-text {