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

Give typeahead browse dialogs sensible titles

Summary: Ref T4100. Let datasources specify a more meaningful title than the class name.

Test Plan: Browsed some sources.

Reviewers: btrahan, chad

Reviewed By: chad

Subscribers: chad, epriestley

Maniphest Tasks: T4100

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

+140 -3
+4
src/applications/almanac/typeahead/AlmanacInterfaceDatasource.php
··· 9 9 return false; 10 10 } 11 11 12 + public function getBrowseTitle() { 13 + return pht('Browse Interfaces'); 14 + } 15 + 12 16 public function getPlaceholderText() { 13 17 return pht('Type an interface name...'); 14 18 }
+4
src/applications/almanac/typeahead/AlmanacServiceDatasource.php
··· 3 3 final class AlmanacServiceDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Services'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a service name...'); 8 12 }
+4
src/applications/diffusion/typeahead/DiffusionArcanistProjectDatasource.php
··· 8 8 return false; 9 9 } 10 10 11 + public function getBrowseTitle() { 12 + return pht('Browse Arcanist Projects'); 13 + } 14 + 11 15 public function getPlaceholderText() { 12 16 return pht('Type an arcanist project name...'); 13 17 }
+4
src/applications/diffusion/typeahead/DiffusionAuditorDatasource.php
··· 3 3 final class DiffusionAuditorDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Auditors'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a user, project or package name...'); 8 12 }
+4
src/applications/diffusion/typeahead/DiffusionRepositoryDatasource.php
··· 3 3 final class DiffusionRepositoryDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Repositories'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a repository name...'); 8 12 }
+4
src/applications/diffusion/typeahead/DiffusionSymbolDatasource.php
··· 9 9 return false; 10 10 } 11 11 12 + public function getBrowseTitle() { 13 + return pht('Browse Symbols'); 14 + } 15 + 12 16 public function getPlaceholderText() { 13 17 return pht('Type a symbol name...'); 14 18 }
+4
src/applications/harbormaster/typeahead/HarbormasterBuildDependencyDatasource.php
··· 8 8 return false; 9 9 } 10 10 11 + public function getBrowseTitle() { 12 + return pht('Browse Dependencies'); 13 + } 14 + 11 15 public function getPlaceholderText() { 12 16 return pht('Type another build step name...'); 13 17 }
+4
src/applications/harbormaster/typeahead/HarbormasterBuildPlanDatasource.php
··· 3 3 final class HarbormasterBuildPlanDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Build Plans'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a build plan name...'); 8 12 }
+4
src/applications/legalpad/typeahead/LegalpadDocumentDatasource.php
··· 7 7 return false; 8 8 } 9 9 10 + public function getBrowseTitle() { 11 + return pht('Browse Documents'); 12 + } 13 + 10 14 public function getPlaceholderText() { 11 15 return pht('Type a document name...'); 12 16 }
+4
src/applications/macro/typeahead/PhabricatorMacroDatasource.php
··· 6 6 return pht('Type a macro name...'); 7 7 } 8 8 9 + public function getBrowseTitle() { 10 + return pht('Browse Macros'); 11 + } 12 + 9 13 public function getDatasourceApplicationClass() { 10 14 return 'PhabricatorMacroApplication'; 11 15 }
+4
src/applications/mailinglists/typeahead/PhabricatorMailingListDatasource.php
··· 3 3 final class PhabricatorMailingListDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Mailing Lists'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a mailing list name...'); 8 12 }
+4
src/applications/maniphest/typeahead/ManiphestTaskPriorityDatasource.php
··· 3 3 final class ManiphestTaskPriorityDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Priorities'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a task priority name...'); 8 12 }
+4
src/applications/maniphest/typeahead/ManiphestTaskStatusDatasource.php
··· 3 3 final class ManiphestTaskStatusDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Statuses'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a task status name...'); 8 12 }
+4
src/applications/meta/typeahead/PhabricatorApplicationDatasource.php
··· 3 3 final class PhabricatorApplicationDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Applications'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type an application name...'); 8 12 }
+4
src/applications/metamta/typeahead/PhabricatorMetaMTAApplicationEmailDatasource.php
··· 8 8 return false; 9 9 } 10 10 11 + public function getBrowseTitle() { 12 + return pht('Browse Email Addresses'); 13 + } 14 + 11 15 public function getPlaceholderText() { 12 16 return pht('Type an application email address...'); 13 17 }
+4
src/applications/metamta/typeahead/PhabricatorMetaMTAMailableDatasource.php
··· 3 3 final class PhabricatorMetaMTAMailableDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Subscribers'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a user, project, or mailing list name...'); 8 12 }
+4
src/applications/owners/typeahead/PhabricatorOwnersPackageDatasource.php
··· 8 8 return false; 9 9 } 10 10 11 + public function getBrowseTitle() { 12 + return pht('Browse Packages'); 13 + } 14 + 11 15 public function getPlaceholderText() { 12 16 return pht('Type a package name...'); 13 17 }
+4
src/applications/people/typeahead/PhabricatorPeopleDatasource.php
··· 15 15 return $this; 16 16 } 17 17 18 + public function getBrowseTitle() { 19 + return pht('Browse Users'); 20 + } 21 + 18 22 public function getPlaceholderText() { 19 23 return pht('Type a username...'); 20 24 }
+4
src/applications/people/typeahead/PhabricatorViewerDatasource.php
··· 3 3 final class PhabricatorViewerDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Viewer'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type viewer()...'); 8 12 }
+4
src/applications/project/typeahead/PhabricatorProjectDatasource.php
··· 3 3 final class PhabricatorProjectDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Projects'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a project name...'); 8 12 }
+4
src/applications/project/typeahead/PhabricatorProjectLogicalAndDatasource.php
··· 3 3 final class PhabricatorProjectLogicalAndDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Projects'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a project name...'); 8 12 }
+5 -1
src/applications/project/typeahead/PhabricatorProjectLogicalDatasource.php
··· 3 3 final class PhabricatorProjectLogicalDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Projects'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 - return pht('Type a project name or selector...'); 11 + return pht('Type a project name or function...'); 8 12 } 9 13 10 14 public function getDatasourceApplicationClass() {
+4
src/applications/project/typeahead/PhabricatorProjectLogicalOrNotDatasource.php
··· 3 3 final class PhabricatorProjectLogicalOrNotDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Projects'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type any(<project>) or not(<project>)...'); 8 12 }
+4
src/applications/project/typeahead/PhabricatorProjectLogicalUserDatasource.php
··· 3 3 final class PhabricatorProjectLogicalUserDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse User Projects'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type projects(<user>)...'); 8 12 }
+4
src/applications/project/typeahead/PhabricatorProjectLogicalViewerDatasource.php
··· 3 3 final class PhabricatorProjectLogicalViewerDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Viewer Projects'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type viewerprojects()...'); 8 12 }
+4
src/applications/project/typeahead/PhabricatorProjectMembersDatasource.php
··· 3 3 final class PhabricatorProjectMembersDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Members'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type members(<project>)...'); 8 12 }
+4
src/applications/project/typeahead/PhabricatorProjectNoProjectsDatasource.php
··· 3 3 final class PhabricatorProjectNoProjectsDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Not In Any Projects'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type "not in any projects"...'); 8 12 }
+4
src/applications/project/typeahead/PhabricatorProjectOrUserDatasource.php
··· 3 3 final class PhabricatorProjectOrUserDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Users and Projects'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a user or project name...'); 8 12 }
+4
src/applications/search/typeahead/PhabricatorSearchDatasource.php
··· 3 3 final class PhabricatorSearchDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Results'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type an object name...'); 8 12 }
+1 -1
src/applications/typeahead/controller/PhabricatorTypeaheadModularDatasourceController.php
··· 225 225 return $this->newDialog() 226 226 ->setWidth(AphrontDialogView::WIDTH_FORM) 227 227 ->setRenderDialogAsDiv(true) 228 - ->setTitle(get_class($source)) // TODO: Provide nice names. 228 + ->setTitle($source->getBrowseTitle()) 229 229 ->appendChild($browser) 230 230 ->addCancelButton('/', pht('Close')); 231 231 }
+5
src/applications/typeahead/datasource/PhabricatorTypeaheadDatasource.php
··· 88 88 } 89 89 90 90 abstract public function getPlaceholderText(); 91 + 92 + public function getBrowseTitle() { 93 + return get_class($this); 94 + } 95 + 91 96 abstract public function getDatasourceApplicationClass(); 92 97 abstract public function loadResults(); 93 98
+4
src/applications/typeahead/datasource/PhabricatorTypeaheadMonogramDatasource.php
··· 10 10 return false; 11 11 } 12 12 13 + public function getBrowseTitle() { 14 + return pht('Browse Objects'); 15 + } 16 + 13 17 public function getPlaceholderText() { 14 18 return pht('Type an object name...'); 15 19 }
+4
src/applications/typeahead/datasource/PhabricatorTypeaheadNoOwnerDatasource.php
··· 3 3 final class PhabricatorTypeaheadNoOwnerDatasource 4 4 extends PhabricatorTypeaheadDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse No Owner'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type "none"...'); 8 12 }
+4
src/applications/typeahead/datasource/PhabricatorTypeaheadOwnerDatasource.php
··· 3 3 final class PhabricatorTypeaheadOwnerDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Owners'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 11 return pht('Type a user name or "none"...'); 8 12 }
+5 -1
src/applications/typeahead/datasource/PhabricatorTypeaheadUserParameterizedDatasource.php
··· 3 3 final class PhabricatorTypeaheadUserParameterizedDatasource 4 4 extends PhabricatorTypeaheadCompositeDatasource { 5 5 6 + public function getBrowseTitle() { 7 + return pht('Browse Users'); 8 + } 9 + 6 10 public function getPlaceholderText() { 7 - return pht('Type a username or selector...'); 11 + return pht('Type a username or function...'); 8 12 } 9 13 10 14 public function getComponentDatasources() {