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

Show repositories in global autocomplete dropdown

Summary: Fixes T9523.

Test Plan: {F1059225}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T9523

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

+40 -19
+13 -13
resources/celerity/map.php
··· 8 8 return array( 9 9 'names' => array( 10 10 'core.pkg.css' => '1eed0b4f', 11 - 'core.pkg.js' => '57dff7df', 11 + 'core.pkg.js' => '6ae03393', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', 14 14 'differential.pkg.js' => '64e69521', ··· 492 492 'rsrc/js/core/behavior-reorder-applications.js' => '76b9fc3e', 493 493 'rsrc/js/core/behavior-reveal-content.js' => '60821bc7', 494 494 'rsrc/js/core/behavior-scrollbar.js' => '834a1173', 495 - 'rsrc/js/core/behavior-search-typeahead.js' => '048330fa', 495 + 'rsrc/js/core/behavior-search-typeahead.js' => '0b7a4f6e', 496 496 'rsrc/js/core/behavior-select-on-click.js' => '4e3e79a6', 497 497 'rsrc/js/core/behavior-time-typeahead.js' => 'f80d6bf0', 498 498 'rsrc/js/core/behavior-toggle-class.js' => '5d7c9f33', ··· 640 640 'javelin-behavior-phabricator-oncopy' => '2926fff2', 641 641 'javelin-behavior-phabricator-remarkup-assist' => 'b60b6d9b', 642 642 'javelin-behavior-phabricator-reveal-content' => '60821bc7', 643 - 'javelin-behavior-phabricator-search-typeahead' => '048330fa', 643 + 'javelin-behavior-phabricator-search-typeahead' => '0b7a4f6e', 644 644 'javelin-behavior-phabricator-show-older-transactions' => 'dbbf48b6', 645 645 'javelin-behavior-phabricator-tooltips' => '3ee3408b', 646 646 'javelin-behavior-phabricator-transaction-comment-form' => 'b23b49e6', ··· 878 878 'javelin-behavior-device', 879 879 'phabricator-title', 880 880 ), 881 - '048330fa' => array( 882 - 'javelin-behavior', 883 - 'javelin-typeahead-ondemand-source', 884 - 'javelin-typeahead', 885 - 'javelin-dom', 886 - 'javelin-uri', 887 - 'javelin-util', 888 - 'javelin-stratcom', 889 - 'phabricator-prefab', 890 - ), 891 881 '05270951' => array( 892 882 'javelin-util', 893 883 'javelin-magical-init', ··· 914 904 'javelin-workflow', 915 905 'javelin-dom', 916 906 'javelin-router', 907 + ), 908 + '0b7a4f6e' => array( 909 + 'javelin-behavior', 910 + 'javelin-typeahead-ondemand-source', 911 + 'javelin-typeahead', 912 + 'javelin-dom', 913 + 'javelin-uri', 914 + 'javelin-util', 915 + 'javelin-stratcom', 916 + 'phabricator-prefab', 917 917 ), 918 918 '0f764c35' => array( 919 919 'javelin-install',
+20 -2
src/applications/diffusion/typeahead/DiffusionRepositoryDatasource.php
··· 24 24 ->withDatasourceQuery($raw_query); 25 25 $repos = $this->executeQuery($query); 26 26 27 + $type_icon = id(new PhabricatorRepositoryRepositoryPHIDType()) 28 + ->getTypeIcon(); 29 + 30 + $image_sprite = 31 + "phabricator-search-icon phui-font-fa phui-icon-view {$type_icon}"; 32 + 27 33 $results = array(); 28 34 foreach ($repos as $repo) { 35 + $display_name = $repo->getMonogram().' '.$repo->getName(); 36 + 37 + $name = $display_name; 38 + $slug = $repo->getRepositorySlug(); 39 + if (strlen($slug)) { 40 + $name = "{$name} {$slug}"; 41 + } 42 + 29 43 $results[] = id(new PhabricatorTypeaheadResult()) 30 - ->setName($repo->getMonogram().' '.$repo->getName()) 44 + ->setName($name) 45 + ->setDisplayName($display_name) 31 46 ->setURI($repo->getURI()) 32 47 ->setPHID($repo->getPHID()) 33 - ->setPriorityString($repo->getMonogram()); 48 + ->setPriorityString($repo->getMonogram()) 49 + ->setPriorityType('repo') 50 + ->setImageSprite($image_sprite) 51 + ->setDisplayType(pht('Repository')); 34 52 } 35 53 36 54 return $results;
+1 -1
src/applications/repository/phid/PhabricatorRepositoryRepositoryPHIDType.php
··· 10 10 } 11 11 12 12 public function getTypeIcon() { 13 - return 'fa-database'; 13 + return 'fa-code'; 14 14 } 15 15 16 16 public function newObject() {
+3 -2
src/applications/repository/query/PhabricatorRepositoryQuery.php
··· 606 606 } 607 607 $where[] = qsprintf( 608 608 $conn, 609 - 'r.name LIKE %> OR r.callsign LIKE %>', 609 + 'r.name LIKE %> OR r.callsign LIKE %> OR r.repositorySlug LIKE %>', 610 610 $query, 611 - $callsign); 611 + $callsign, 612 + $query); 612 613 } 613 614 614 615 if ($this->slugs !== null) {
+1
src/applications/search/typeahead/PhabricatorSearchDatasource.php
··· 21 21 new PhabricatorProjectDatasource(), 22 22 new PhabricatorApplicationDatasource(), 23 23 new PhabricatorTypeaheadMonogramDatasource(), 24 + new DiffusionRepositoryDatasource(), 24 25 new DiffusionSymbolDatasource(), 25 26 ); 26 27 }
+2 -1
webroot/rsrc/js/core/behavior-search-typeahead.js
··· 54 54 'apps' : 2, 55 55 'proj' : 3, 56 56 'user' : 4, 57 - 'symb' : 5 57 + 'repo' : 5, 58 + 'symb' : 6 58 59 }; 59 60 60 61 var tokens = this.tokenize(value);