@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.

Add app icons to search typeahead

Summary: Seems likely reasonable.

Test Plan:
Search for apps and other stuff, seems good.

{F166279}

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: epriestley, Korvin

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

+41 -20
+16 -16
resources/celerity/map.php
··· 7 7 return array( 8 8 'names' => 9 9 array( 10 - 'core.pkg.css' => '6cdd937e', 11 - 'core.pkg.js' => '8335fe3f', 10 + 'core.pkg.css' => 'a8d8a51c', 11 + 'core.pkg.js' => '07b01d4f', 12 12 'darkconsole.pkg.js' => 'ca8671ce', 13 13 'differential.pkg.css' => '4a93db37', 14 14 'differential.pkg.js' => 'eca39a2c', ··· 36 36 'rsrc/css/aphront/two-column.css' => '16ab3ad2', 37 37 'rsrc/css/aphront/typeahead.css' => 'a989b5b3', 38 38 'rsrc/css/application/auth/auth.css' => '1e655982', 39 - 'rsrc/css/application/base/main-menu-view.css' => '72d1d2ef', 39 + 'rsrc/css/application/base/main-menu-view.css' => 'b597e539', 40 40 'rsrc/css/application/base/notification-menu.css' => 'cbff1b94', 41 41 'rsrc/css/application/base/phabricator-application-launch-view.css' => '8b7e271d', 42 42 'rsrc/css/application/base/standard-page-view.css' => '517cdfb1', ··· 464 464 'rsrc/js/core/behavior-remarkup-preview.js' => 'f7379f45', 465 465 'rsrc/js/core/behavior-reorder-applications.js' => 'a8e3795d', 466 466 'rsrc/js/core/behavior-reveal-content.js' => '8f24abfc', 467 - 'rsrc/js/core/behavior-search-typeahead.js' => '86549ee3', 467 + 'rsrc/js/core/behavior-search-typeahead.js' => 'fbeabd1e', 468 468 'rsrc/js/core/behavior-select-on-click.js' => '0e34ca02', 469 469 'rsrc/js/core/behavior-toggle-class.js' => 'a82a7769', 470 470 'rsrc/js/core/behavior-tokenizer.js' => 'b3a4b884', ··· 605 605 'javelin-behavior-phabricator-oncopy' => 'c3e218fe', 606 606 'javelin-behavior-phabricator-remarkup-assist' => 'ba22863c', 607 607 'javelin-behavior-phabricator-reveal-content' => '8f24abfc', 608 - 'javelin-behavior-phabricator-search-typeahead' => '86549ee3', 608 + 'javelin-behavior-phabricator-search-typeahead' => 'fbeabd1e', 609 609 'javelin-behavior-phabricator-show-all-transactions' => '7c273581', 610 610 'javelin-behavior-phabricator-tooltips' => '48db4145', 611 611 'javelin-behavior-phabricator-transaction-comment-form' => '9084a36f', ··· 706 706 'phabricator-hovercard-view-css' => 'cae6e28f', 707 707 'phabricator-keyboard-shortcut' => '1ae869f2', 708 708 'phabricator-keyboard-shortcut-manager' => 'ad7a69ca', 709 - 'phabricator-main-menu-view' => '72d1d2ef', 709 + 'phabricator-main-menu-view' => 'b597e539', 710 710 'phabricator-nav-view-css' => '9283c2df', 711 711 'phabricator-notification' => '0c6946e7', 712 712 'phabricator-notification-css' => 'ef2c9b34', ··· 1442 1442 1 => 'javelin-dom', 1443 1443 2 => 'javelin-reactor-dom', 1444 1444 ), 1445 - '86549ee3' => 1446 - array( 1447 - 0 => 'javelin-behavior', 1448 - 1 => 'javelin-typeahead-ondemand-source', 1449 - 2 => 'javelin-typeahead', 1450 - 3 => 'javelin-dom', 1451 - 4 => 'javelin-uri', 1452 - 5 => 'javelin-util', 1453 - 6 => 'javelin-stratcom', 1454 - ), 1455 1445 '8a3ed18b' => 1456 1446 array( 1457 1447 0 => 'javelin-magical-init', ··· 2057 2047 array( 2058 2048 0 => 'phabricator-busy', 2059 2049 1 => 'javelin-behavior', 2050 + ), 2051 + 'fbeabd1e' => 2052 + array( 2053 + 0 => 'javelin-behavior', 2054 + 1 => 'javelin-typeahead-ondemand-source', 2055 + 2 => 'javelin-typeahead', 2056 + 3 => 'javelin-dom', 2057 + 4 => 'javelin-uri', 2058 + 5 => 'javelin-util', 2059 + 6 => 'javelin-stratcom', 2060 2060 ), 2061 2061 'fe2e0ba4' => 2062 2062 array(
+7 -4
src/applications/typeahead/controller/PhabricatorTypeaheadCommonDatasourceController.php
··· 315 315 $packages = id(new PhabricatorOwnersPackage())->loadAll(); 316 316 foreach ($packages as $package) { 317 317 $results[] = id(new PhabricatorTypeaheadResult()) 318 - ->setIcon('pl-testplan') 318 + ->setIcon('fa-list-alt bluegrey') 319 319 ->setName($package->getName()) 320 320 ->setURI('/owners/package/'.$package->getID().'/') 321 321 ->setPHID($package->getPHID()); ··· 339 339 continue; 340 340 } 341 341 $name = $application->getName().' '.$application->getShortDescription(); 342 - 342 + $img = 'apps-'.$application->getIconName().'-dark-large'; 343 343 $results[] = id(new PhabricatorTypeaheadResult()) 344 344 ->setName($name) 345 345 ->setURI($uri) ··· 348 348 ->setDisplayName($application->getName()) 349 349 ->setDisplayType($application->getShortDescription()) 350 350 ->setImageuRI($application->getIconURI()) 351 - ->setPriorityType('apps'); 351 + ->setPriorityType('apps') 352 + ->setImageSprite('phabricator-search-icon sprite-apps-large '.$img); 352 353 } 353 354 } 354 355 ··· 424 425 'Display Type', 425 426 'Image URI', 426 427 'Priority Type', 428 + 'Sprite Class', 427 429 )); 428 430 429 431 $panel = new AphrontPanelView(); ··· 433 435 return $this->buildStandardPageResponse( 434 436 $panel, 435 437 array( 436 - 'title' => 'Typeahead Results', 438 + 'title' => pht('Typeahead Results'), 439 + 'device' => true 437 440 )); 438 441 } 439 442
+7
src/applications/typeahead/storage/PhabricatorTypeaheadResult.php
··· 10 10 private $displayType; 11 11 private $imageURI; 12 12 private $priorityType; 13 + private $imageSprite; 13 14 private $icon; 14 15 private $closed; 15 16 ··· 58 59 return $this; 59 60 } 60 61 62 + public function setImageSprite($image_sprite) { 63 + $this->imageSprite = $image_sprite; 64 + return $this; 65 + } 66 + 61 67 public function setClosed($closed) { 62 68 $this->closed = $closed; 63 69 return $this; ··· 75 81 $this->priorityType, 76 82 $this->icon, 77 83 $this->closed, 84 + $this->imageSprite ? (string)$this->imageSprite : null, 78 85 ); 79 86 while (end($data) === null) { 80 87 array_pop($data);
+10
webroot/rsrc/css/application/base/main-menu-view.css
··· 201 201 margin-left: 40px; 202 202 } 203 203 204 + .phabricator-main-search-typeahead-result .phabricator-search-icon { 205 + display: inline-block; 206 + width: 28px; 207 + height: 28px; 208 + position: absolute; 209 + top: 9px; 210 + left: 9px; 211 + } 212 + 204 213 .phabricator-main-search-typeahead-result { 205 214 display: block; 206 215 padding: 6px 8px 8px 44px; 207 216 background-position: 8px; 208 217 background-size: 30px 30px; 209 218 background-repeat: no-repeat; 219 + position: relative; 210 220 } 211 221 212 222 .phabricator-main-search-typeahead-result .result-name {
+1
webroot/rsrc/js/core/behavior-search-typeahead.js
··· 26 26 'span', 27 27 attr, 28 28 [ 29 + JX.$N('span', {className: object[10]}), 29 30 JX.$N('span', {className: 'result-name'}, object[4] || object[0]), 30 31 JX.$N('span', {className: 'result-type'}, object[5]) 31 32 ]);