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

Rename Advanced Search to Global Search and app searches

Summary:
* Remove the term "Advanced Search". Everything is an "Advanced Search" anyway, even cross-application search at https://we.phorge.it/search/query/advanced/ calls itself "Advanced Search".
* Call the Search provided by the Search application "Global Search" in the sidebar (previously called "Advanced Search" like everything) and in the breadcrumbs, so users have a chance to realize that application searches also exist. Similarly, rename the "Queries" heading in the sidebar to "Global Queries".
* Rename each application search from generic "Advanced Search" (which did not allow understanding that an application search is a different Advanced Search than the Advanced Search provided by the Search application) to "$application_name Search" (prefixing the actual name of the current application) to make its scope clear. Similarly, rename "Queries" in the sidebar to "$application_name Queries".
* In the Search Scope dropdown in the top bar, rename the "Search" heading to "Global Search" and rename the "Saved Queries" heading to "Global Saved Queries". Rename the "Advanced Search" item under "More Options" to "Global Search" (which may get removed in D26240).
* Rename "Global Saved Queries" to "System Saved Queries" not to use "global" with two different meanings (cross-application versus not by an individual user). This confusion is not new; https://we.phorge.it/book/phorge/article/search/ already called the Search in the Search application "global search" anyway.
* Update a sentence in the documentation.

Closes T16168

Test Plan:
* Go to http://phorge.localhost/search/query/advanced/, see "Global Search" in the sidebar and "Global Search" in breadcrumbs and title, still see "Queries" section heading in sidebar
* Go to http://phorge.localhost/feed/query/advanced/ or any other application, see "Feed Search" in the sidebar and "Search" in breadcrumbs and title (to avoid ugly repetition of the application name in the breadcrumbs), see "Feed Queries" section heading in sidebar
* Go to http://phorge.localhost, click the Search Scope dropdown in the top bar, see "Global Search" instead of "Advanced Search" under "More Options" (until D26240 gets merged)
* Go to http://phorge.localhost, click the Search Scope dropdown in the top bar, see "Global Search" instead of ""Search" and "Saved Global Queries" instead of "Saved Queries" section headings
* Go to http://phorge.localhost/diviner/, see that search button says "Diviner Search" instead of "Advanced Search"
* Go to http://phorge.localhost/search/query/edit/, see that "Global Saved Queries" is called "System Saved Queries"

Reviewers: O1 Blessed Committers, mainframe98

Reviewed By: O1 Blessed Committers, mainframe98

Subscribers: mainframe98, tobiaswiese, valerio.bozzolan, Matthew, Cigaryno

Maniphest Tasks: T16168

Differential Revision: https://we.phorge.it/D26242

+36 -11
+3
src/applications/base/controller/PhabricatorController.php
··· 323 323 return null; 324 324 } 325 325 326 + /** 327 + * @return PHUICrumbsView 328 + */ 326 329 protected function buildApplicationCrumbs() { 327 330 $crumbs = array(); 328 331
+1 -1
src/applications/diviner/controller/DivinerMainController.php
··· 20 20 $query_button = id(new PHUIButtonView()) 21 21 ->setTag('a') 22 22 ->setHref($this->getApplicationURI('query/')) 23 - ->setText(pht('Advanced Search')) 23 + ->setText(pht('Diviner Search')) 24 24 ->setIcon('fa-search'); 25 25 26 26 $header = id(new PHUIHeaderView())
+10 -2
src/applications/search/controller/PhabricatorApplicationSearchController.php
··· 211 211 if ($named_query) { 212 212 $title = $named_query->getQueryName(); 213 213 } else { 214 - $title = pht('Advanced Search'); 214 + $current_app = $this->getCurrentApplication()->getName(); 215 + $search_app = id(new PhabricatorSearchApplication())->getName(); 216 + if ($current_app === $search_app) { 217 + $title = pht('Global Search'); 218 + } else { 219 + $title = pht('Search'); 220 + } 215 221 } 216 222 217 223 $header = id(new PHUIHeaderView()) ··· 577 583 'items' => array(), 578 584 'edit' => true, 579 585 ), 586 + // The name 'global' is a remnant of the time this group was called 587 + // Global Saved Queries. See T16168. 580 588 'global' => array( 581 - 'name' => pht('Global Saved Queries'), 589 + 'name' => pht('System Saved Queries'), 582 590 'items' => array(), 583 591 'edit' => $can_global, 584 592 ),
+16 -2
src/applications/search/engine/PhabricatorApplicationSearchEngine.php
··· 492 492 public function addNavigationItems(PHUIListView $menu) { 493 493 $viewer = $this->requireViewer(); 494 494 495 - $menu->newLabel(pht('Queries')); 495 + $current_app = $this->getApplication()->getName(); 496 + $search_app = id(new PhabricatorSearchApplication())->getName(); 497 + 498 + if ($current_app === $search_app) { 499 + $menu->newLabel(pht('Global Queries')); 500 + } else { 501 + $menu->newLabel(pht('%s Queries', $current_app)); 502 + } 496 503 497 504 $named_queries = $this->loadEnabledNamedQueries(); 498 505 ··· 509 516 510 517 $menu->newLabel(pht('Search')); 511 518 $advanced_uri = $this->getQueryResultsPageURI('advanced'); 512 - $menu->newLink(pht('Advanced Search'), $advanced_uri, 'query/advanced'); 519 + if ($current_app === $search_app) { 520 + $menu->newLink(pht('Global Search'), $advanced_uri, 'query/advanced'); 521 + } else { 522 + $menu->newLink( 523 + pht('%s Search', $current_app), 524 + $advanced_uri, 525 + 'query/advanced'); 526 + } 513 527 514 528 foreach ($this->navigationItems as $extra_item) { 515 529 $menu->addMenuItem($extra_item);
+1 -1
src/docs/user/userguide/search.diviner
··· 51 51 supported commands, see @{article:Search User Guide: Shortcuts}. 52 52 53 53 After running a search, you can scroll up to add filters and refine the result 54 - set. You can also select **Advanced Search** from the dropdown menu to jump 54 + set. You can also select **Global Search** from the dropdown menu to jump 55 55 here immediately, or press return in the search box without entering a query. 56 56 57 57 This interface supports standard Phorge search and filtering features,
+1 -1
src/infrastructure/internationalization/translation/PhabricatorPirateEnglishTranslation.php
··· 13 13 'Review Code' => 'Inspect Riggins', 14 14 'Tasks and Bugs' => 'Bilge rats', 15 15 'Cancel' => 'Belay', 16 - 'Advanced Search' => 'Scour Hard', 16 + 'Global Search' => 'Scour Wide', 17 17 'No search results.' => 'We be finding nothin.', 18 18 'Send' => 'Aye!', 19 19 'Partial' => 'Parrtial',
+1 -1
src/infrastructure/internationalization/translation/PhabricatorVeryWowEnglishTranslation.php
··· 13 13 'Review Code' => 'Wow! Code Review! Wow!', 14 14 'Tasks and Bugs' => 'Much Bug! Very Bad!', 15 15 'Cancel' => 'Nope!', 16 - 'Advanced Search' => 'Much Search!', 16 + 'Global Search' => 'All The Search!', 17 17 'No search results.' => 'No results! Wow!', 18 18 'Send' => 'Bark Bark!', 19 19 'Partial' => 'Pawtial',
+3 -3
src/view/page/menu/PhabricatorMainMenuSearchView.php
··· 124 124 125 125 $items = array(); 126 126 $items[] = array( 127 - 'name' => pht('Search'), 127 + 'name' => pht('Global Search'), 128 128 ); 129 129 130 130 $items[] = array( ··· 147 147 } 148 148 149 149 $items[] = array( 150 - 'name' => pht('Saved Queries'), 150 + 'name' => pht('Saved Global Queries'), 151 151 ); 152 152 153 153 ··· 185 185 186 186 $items[] = array( 187 187 'icon' => 'fa-search-plus', 188 - 'name' => pht('Advanced Search'), 188 + 'name' => pht('Global Search'), 189 189 'href' => '/search/query/advanced/', 190 190 ); 191 191