@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
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Build LauncherButton for PHUIObjectItemView

Summary: There are a handful of places I've been wanting to use a button here. Adds that ability and uses in app launcher.

Test Plan:
Test Applicatons->Launcher at desktop, mobile, tablet breakpoints

{F780453}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D14059

+58 -30
+9 -9
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '994de4ed', 10 + 'core.pkg.css' => 'a40c0b28', 11 11 'core.pkg.js' => '47dc9ebb', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 93 93 'rsrc/css/application/policy/policy-edit.css' => '815c66f7', 94 94 'rsrc/css/application/policy/policy-transaction-detail.css' => '82100a43', 95 95 'rsrc/css/application/policy/policy.css' => '957ea14c', 96 - 'rsrc/css/application/ponder/ponder-view.css' => 'bef48f86', 96 + 'rsrc/css/application/ponder/ponder-view.css' => '7b0df4da', 97 97 'rsrc/css/application/projects/project-icon.css' => '4e3eaa5a', 98 98 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 99 99 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', ··· 104 104 'rsrc/css/application/tokens/tokens.css' => '3d0f239e', 105 105 'rsrc/css/application/uiexample/example.css' => '528b19de', 106 106 'rsrc/css/core/core.css' => 'a76cefc9', 107 - 'rsrc/css/core/remarkup.css' => '73fc4395', 107 + 'rsrc/css/core/remarkup.css' => 'ef286a6e', 108 108 'rsrc/css/core/syntax.css' => '9fd11da8', 109 109 'rsrc/css/core/z-index.css' => '57ddcaa2', 110 110 'rsrc/css/diviner/diviner-shared.css' => '5a337049', ··· 138 138 'rsrc/css/phui/phui-info-view.css' => '5b16bac6', 139 139 'rsrc/css/phui/phui-list.css' => '125599df', 140 140 'rsrc/css/phui/phui-object-box.css' => '407eaf5a', 141 - 'rsrc/css/phui/phui-object-item-list-view.css' => 'ab1bf393', 141 + 'rsrc/css/phui/phui-object-item-list-view.css' => '26c30d3f', 142 142 'rsrc/css/phui/phui-pager.css' => 'bea33d23', 143 143 'rsrc/css/phui/phui-pinboard-view.css' => '2495140e', 144 - 'rsrc/css/phui/phui-property-list-view.css' => '318d4dea', 144 + 'rsrc/css/phui/phui-property-list-view.css' => '03904f6b', 145 145 'rsrc/css/phui/phui-remarkup-preview.css' => '867f85b3', 146 146 'rsrc/css/phui/phui-spacing.css' => '042804d6', 147 147 'rsrc/css/phui/phui-status.css' => '888cedb8', ··· 737 737 'phabricator-object-selector-css' => '85ee8ce6', 738 738 'phabricator-phtize' => 'd254d646', 739 739 'phabricator-prefab' => '6920d200', 740 - 'phabricator-remarkup-css' => '73fc4395', 740 + 'phabricator-remarkup-css' => 'ef286a6e', 741 741 'phabricator-search-results-css' => '7dea472c', 742 742 'phabricator-shaped-request' => '7cbe244b', 743 743 'phabricator-side-menu-view-css' => 'bec2458e', ··· 791 791 'phui-inline-comment-view-css' => '0fdb3667', 792 792 'phui-list-view-css' => '125599df', 793 793 'phui-object-box-css' => '407eaf5a', 794 - 'phui-object-item-list-view-css' => 'ab1bf393', 794 + 'phui-object-item-list-view-css' => '26c30d3f', 795 795 'phui-pager-css' => 'bea33d23', 796 796 'phui-pinboard-view-css' => '2495140e', 797 - 'phui-property-list-view-css' => '318d4dea', 797 + 'phui-property-list-view-css' => '03904f6b', 798 798 'phui-remarkup-preview-css' => '867f85b3', 799 799 'phui-spacing-css' => '042804d6', 800 800 'phui-status-list-view-css' => '888cedb8', ··· 811 811 'policy-css' => '957ea14c', 812 812 'policy-edit-css' => '815c66f7', 813 813 'policy-transaction-detail-css' => '82100a43', 814 - 'ponder-view-css' => 'bef48f86', 814 + 'ponder-view-css' => '7b0df4da', 815 815 'project-icon-css' => '4e3eaa5a', 816 816 'raphael-core' => '51ee6b43', 817 817 'raphael-g' => '40dde778',
+18 -21
src/applications/meta/query/PhabricatorAppSearchEngine.php
··· 226 226 ), 227 227 ''); 228 228 229 - $description = phutil_tag( 230 - 'div', 231 - array( 232 - 'style' => 'white-space: nowrap; '. 233 - 'overflow: hidden; '. 234 - 'text-overflow: ellipsis;', 235 - ), 236 - $application->getShortDescription()); 229 + $description = $application->getShortDescription(); 230 + 231 + $configure = id(new PHUIButtonView()) 232 + ->setTag('a') 233 + ->setHref('/applications/view/'.get_class($application).'/') 234 + ->setText(pht('Configure')) 235 + ->setColor(PHUIButtonView::GREY); 236 + 237 + $name = $application->getName(); 238 + if ($application->isPrototype()) { 239 + $name = $name.' '.pht('(Prototype)'); 240 + } 237 241 238 242 $item = id(new PHUIObjectItemView()) 239 - ->setHeader($application->getName()) 243 + ->setHeader($name) 240 244 ->setImageIcon($icon_view) 241 - ->addAttribute($description) 242 - ->addAction( 243 - id(new PHUIListItemView()) 244 - ->setName(pht('Help/Options')) 245 - ->setIcon('fa-cog') 246 - ->setHref('/applications/view/'.get_class($application).'/')); 245 + ->setSubhead($description) 246 + ->setLaunchButton($configure); 247 247 248 248 if ($application->getBaseURI() && $application->isInstalled()) { 249 249 $item->setHref($application->getBaseURI()); 250 250 } 251 251 252 252 if (!$application->isInstalled()) { 253 - $item->addIcon('fa-times', pht('Uninstalled')); 254 - } 255 - 256 - if ($application->isPrototype()) { 257 - $item->addIcon('fa-bomb grey', pht('Prototype')); 253 + $item->addAttribute(pht('Uninstalled')); 254 + $item->setDisabled(true); 258 255 } 259 256 260 257 if (!$application->isFirstParty()) { 261 - $item->addIcon('fa-puzzle-piece', pht('Extension')); 258 + $item->addAttribute(pht('Extension')); 262 259 } 263 260 264 261 $list->addItem($item);
+18
src/view/phui/PHUIObjectItemView.php
··· 26 26 private $badge; 27 27 private $countdownNum; 28 28 private $countdownNoun; 29 + private $launchButton; 29 30 30 31 const AGE_FRESH = 'fresh'; 31 32 const AGE_STALE = 'stale'; ··· 257 258 if (!empty($attribute)) { 258 259 $this->attributes[] = $attribute; 259 260 } 261 + return $this; 262 + } 263 + 264 + public function setLaunchButton(PHUIButtonView $button) { 265 + $button->setSize(PHUIButtonView::SMALL); 266 + $this->launchButton = $button; 260 267 return $this; 261 268 } 262 269 ··· 649 656 array( 650 657 $icons, 651 658 $bylines, 659 + )); 660 + } 661 + 662 + if ($this->launchButton) { 663 + $column2 = phutil_tag( 664 + 'div', 665 + array( 666 + 'class' => 'phui-object-item-col2 phui-object-item-launch-button', 667 + ), 668 + array( 669 + $this->launchButton, 652 670 )); 653 671 } 654 672
+13
webroot/rsrc/css/phui/phui-object-item-list-view.css
··· 747 747 .phui-object-item-with-image .phui-object-item-content-box { 748 748 margin-left: 46px; 749 749 } 750 + 751 + /* - Launcher Button -------------------------------------------------------- */ 752 + 753 + .phui-object-item-col2.phui-object-item-launch-button { 754 + text-align: right; 755 + vertical-align: middle; 756 + padding-right: 4px; 757 + } 758 + 759 + .device-phone .phui-object-item-col2.phui-object-item-launch-button { 760 + padding: 0 8px 8px; 761 + text-align: left; 762 + }