mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 22:10:55 +01:00
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
This commit is contained in:
parent
b85f8b91de
commit
e5e5974d9f
35 changed files with 140 additions and 3 deletions
|
@ -9,6 +9,10 @@ final class AlmanacInterfaceDatasource
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Interfaces');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type an interface name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class AlmanacServiceDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Services');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a service name...');
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@ final class DiffusionArcanistProjectDatasource
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Arcanist Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type an arcanist project name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class DiffusionAuditorDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Auditors');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a user, project or package name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class DiffusionRepositoryDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Repositories');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a repository name...');
|
||||
}
|
||||
|
|
|
@ -9,6 +9,10 @@ final class DiffusionSymbolDatasource
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Symbols');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a symbol name...');
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@ final class HarbormasterBuildDependencyDatasource
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Dependencies');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type another build step name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class HarbormasterBuildPlanDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Build Plans');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a build plan name...');
|
||||
}
|
||||
|
|
|
@ -7,6 +7,10 @@ final class LegalpadDocumentDatasource extends PhabricatorTypeaheadDatasource {
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Documents');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a document name...');
|
||||
}
|
||||
|
|
|
@ -6,6 +6,10 @@ final class PhabricatorMacroDatasource extends PhabricatorTypeaheadDatasource {
|
|||
return pht('Type a macro name...');
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Macros');
|
||||
}
|
||||
|
||||
public function getDatasourceApplicationClass() {
|
||||
return 'PhabricatorMacroApplication';
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorMailingListDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Mailing Lists');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a mailing list name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class ManiphestTaskPriorityDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Priorities');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a task priority name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class ManiphestTaskStatusDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Statuses');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a task status name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorApplicationDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Applications');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type an application name...');
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@ final class PhabricatorMetaMTAApplicationEmailDatasource
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Email Addresses');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type an application email address...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorMetaMTAMailableDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Subscribers');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a user, project, or mailing list name...');
|
||||
}
|
||||
|
|
|
@ -8,6 +8,10 @@ final class PhabricatorOwnersPackageDatasource
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Packages');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a package name...');
|
||||
}
|
||||
|
|
|
@ -15,6 +15,10 @@ final class PhabricatorPeopleDatasource
|
|||
return $this;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Users');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a username...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorViewerDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Viewer');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type viewer()...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorProjectDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a project name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorProjectLogicalAndDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a project name...');
|
||||
}
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
final class PhabricatorProjectLogicalDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a project name or selector...');
|
||||
return pht('Type a project name or function...');
|
||||
}
|
||||
|
||||
public function getDatasourceApplicationClass() {
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorProjectLogicalOrNotDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type any(<project>) or not(<project>)...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorProjectLogicalUserDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse User Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type projects(<user>)...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorProjectLogicalViewerDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Viewer Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type viewerprojects()...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorProjectMembersDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Members');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type members(<project>)...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorProjectNoProjectsDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Not In Any Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type "not in any projects"...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorProjectOrUserDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Users and Projects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a user or project name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorSearchDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Results');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type an object name...');
|
||||
}
|
||||
|
|
|
@ -225,7 +225,7 @@ final class PhabricatorTypeaheadModularDatasourceController
|
|||
return $this->newDialog()
|
||||
->setWidth(AphrontDialogView::WIDTH_FORM)
|
||||
->setRenderDialogAsDiv(true)
|
||||
->setTitle(get_class($source)) // TODO: Provide nice names.
|
||||
->setTitle($source->getBrowseTitle())
|
||||
->appendChild($browser)
|
||||
->addCancelButton('/', pht('Close'));
|
||||
}
|
||||
|
|
|
@ -88,6 +88,11 @@ abstract class PhabricatorTypeaheadDatasource extends Phobject {
|
|||
}
|
||||
|
||||
abstract public function getPlaceholderText();
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return get_class($this);
|
||||
}
|
||||
|
||||
abstract public function getDatasourceApplicationClass();
|
||||
abstract public function loadResults();
|
||||
|
||||
|
|
|
@ -10,6 +10,10 @@ final class PhabricatorTypeaheadMonogramDatasource
|
|||
return false;
|
||||
}
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Objects');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type an object name...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorTypeaheadNoOwnerDatasource
|
||||
extends PhabricatorTypeaheadDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse No Owner');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type "none"...');
|
||||
}
|
||||
|
|
|
@ -3,6 +3,10 @@
|
|||
final class PhabricatorTypeaheadOwnerDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Owners');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a user name or "none"...');
|
||||
}
|
||||
|
|
|
@ -3,8 +3,12 @@
|
|||
final class PhabricatorTypeaheadUserParameterizedDatasource
|
||||
extends PhabricatorTypeaheadCompositeDatasource {
|
||||
|
||||
public function getBrowseTitle() {
|
||||
return pht('Browse Users');
|
||||
}
|
||||
|
||||
public function getPlaceholderText() {
|
||||
return pht('Type a username or selector...');
|
||||
return pht('Type a username or function...');
|
||||
}
|
||||
|
||||
public function getComponentDatasources() {
|
||||
|
|
Loading…
Reference in a new issue