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