@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

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

+28 -30
+3 -3
resources/celerity/map.php
··· 9 9 'names' => array( 10 10 'conpherence.pkg.css' => 'e68cf1fa', 11 11 'conpherence.pkg.js' => 'b5b51108', 12 - 'core.pkg.css' => 'd6046dd9', 12 + 'core.pkg.css' => 'd9c9cfd0', 13 13 'core.pkg.js' => '5d80e0db', 14 14 'darkconsole.pkg.js' => '1f9a31bc', 15 15 'differential.pkg.css' => '45951e9e', ··· 127 127 'rsrc/css/layout/phabricator-source-code-view.css' => 'aea41829', 128 128 'rsrc/css/phui/button/phui-button-bar.css' => 'f1ff5494', 129 129 'rsrc/css/phui/button/phui-button-simple.css' => '8e1baf68', 130 - 'rsrc/css/phui/button/phui-button.css' => '3a744520', 130 + 'rsrc/css/phui/button/phui-button.css' => '3ca51caa', 131 131 'rsrc/css/phui/calendar/phui-calendar-day.css' => '572b1893', 132 132 'rsrc/css/phui/calendar/phui-calendar-list.css' => '576be600', 133 133 'rsrc/css/phui/calendar/phui-calendar-month.css' => '21154caf', ··· 825 825 'phui-big-info-view-css' => 'd13afcde', 826 826 'phui-box-css' => '745e881d', 827 827 'phui-button-bar-css' => 'f1ff5494', 828 - 'phui-button-css' => '3a744520', 828 + 'phui-button-css' => '3ca51caa', 829 829 'phui-button-simple-css' => '8e1baf68', 830 830 'phui-calendar-css' => 'f1ddf11c', 831 831 'phui-calendar-day-css' => '572b1893',
+1 -1
src/applications/search/controller/PhabricatorApplicationSearchController.php
··· 554 554 return id(new PHUIButtonView()) 555 555 ->setTag('a') 556 556 ->setHref('#') 557 - ->setText(pht('Use Results...')) 557 + ->setText(pht('Use Results')) 558 558 ->setIcon('fa-bars') 559 559 ->setDropdownMenu($action_list) 560 560 ->addClass('dropdown');
+23 -25
src/view/phui/PHUIButtonView.php
··· 134 134 Javelin::initBehavior('phui-dropdown-menu'); 135 135 136 136 $this->addSigil('phui-dropdown-menu'); 137 + $this->setDropdown(true); 137 138 $this->setMetadata($actions->getDropdownMenuMetadata()); 138 139 139 140 return $this; ··· 223 224 224 225 protected function getTagContent() { 225 226 226 - $icon = null; 227 - $text = $this->text; 228 - if ($this->icon) { 229 - $icon = $this->icon; 227 + $icon = $this->icon; 228 + $text = null; 229 + $subtext = null; 230 230 231 - $subtext = null; 232 - if ($this->subtext) { 233 - $subtext = phutil_tag( 234 - 'div', 235 - array( 236 - 'class' => 'phui-button-subtext', 237 - ), 238 - $this->subtext); 239 - } 231 + if ($this->subtext) { 232 + $subtext = phutil_tag( 233 + 'div', 234 + array( 235 + 'class' => 'phui-button-subtext', 236 + ), 237 + $this->subtext); 238 + } 240 239 241 - if ($this->text !== null) { 242 - $text = phutil_tag( 243 - 'div', 244 - array( 245 - 'class' => 'phui-button-text', 246 - ), 247 - array( 248 - $text, 249 - $subtext, 250 - )); 251 - } 240 + if ($this->text !== null) { 241 + $text = phutil_tag( 242 + 'div', 243 + array( 244 + 'class' => 'phui-button-text', 245 + ), 246 + array( 247 + $this->text, 248 + $subtext, 249 + )); 252 250 } 253 251 254 252 $caret = null; ··· 259 257 if ($this->iconFirst == true) { 260 258 return array($icon, $text, $caret); 261 259 } else { 262 - return array($text, $icon); 260 + return array($text, $icon, $caret); 263 261 } 264 262 } 265 263 }
+1 -1
webroot/rsrc/css/phui/button/phui-button.css
··· 270 270 } 271 271 272 272 .dropdown .phui-button-text { 273 - margin-right: 16px; 273 + margin-right: 8px; 274 274 } 275 275 276 276 .button.has-icon .phui-button-text {