1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-12-19 12:00:55 +01:00

Improve UX for customizing EditEngine forms a little bit

Summary:
Ref T10004. Tweaks some of the UX a little to be more intuitive/inviting?

  - Button says "Configure Form" instead of "Actions".
  - Root list is less "developer-ey" and more "explain what this is for-ey".

Test Plan:
{F1028928}

{F1028929}

Reviewers: chad

Reviewed By: chad

Maniphest Tasks: T10004

Differential Revision: https://secure.phabricator.com/D14808
This commit is contained in:
epriestley 2015-12-17 07:25:42 -08:00
parent 5d76a4b0a2
commit 38e31375ea
7 changed files with 72 additions and 4 deletions

View file

@ -9,6 +9,14 @@ final class ManiphestEditEngine
return pht('Maniphest Tasks');
}
public function getSummaryHeader() {
return pht('Configure Maniphest Task Forms');
}
public function getSummaryText() {
return pht('Configure how users create and edit tasks.');
}
public function getEngineApplicationClass() {
return 'PhabricatorManiphestApplication';
}

View file

@ -9,6 +9,14 @@ final class PhabricatorOwnersPackageEditEngine
return pht('Owners Packages');
}
public function getSummaryHeader() {
return pht('Configure Owners Package Forms');
}
public function getSummaryText() {
return pht('Configure forms for creating and editing packages in Owners.');
}
public function getEngineApplicationClass() {
return 'PhabricatorOwnersApplication';
}

View file

@ -9,6 +9,14 @@ final class PhabricatorPasteEditEngine
return pht('Pastes');
}
public function getSummaryHeader() {
return pht('Configure Paste Forms');
}
public function getSummaryText() {
return pht('Configure creation and editing forms in Paste.');
}
public function getEngineApplicationClass() {
return 'PhabricatorPasteApplication';
}

View file

@ -13,6 +13,14 @@ final class PhameBlogEditEngine
return 'PhabricatorPhameApplication';
}
public function getSummaryHeader() {
return pht('Configure Phame Blog Forms');
}
public function getSummaryText() {
return pht('Configure how blogs in Phame are created and edited.');
}
protected function newEditableObject() {
return PhameBlog::initializeNewBlog($this->getViewer());
}

View file

@ -225,6 +225,27 @@ abstract class PhabricatorEditEngine
}
/**
* Return a human-readable header describing what this engine is used to do,
* like "Configure Maniphest Task Forms".
*
* @return string Human-readable description of the engine.
* @task text
*/
abstract public function getSummaryHeader();
/**
* Return a human-readable summary of what this engine is used to do.
*
* @return string Human-readable description of the engine.
* @task text
*/
abstract public function getSummaryText();
/* -( Edit Engine Configuration )------------------------------------------ */
@ -1010,9 +1031,9 @@ abstract class PhabricatorEditEngine
$action_button = id(new PHUIButtonView())
->setTag('a')
->setText(pht('Actions'))
->setText(pht('Configure Form'))
->setHref('#')
->setIconFont('fa-bars')
->setIconFont('fa-gear')
->setDropdownMenu($action_view);
return $action_button;

View file

@ -30,6 +30,16 @@ final class PhabricatorEditEngineConfigurationEditEngine
return pht('Edit Configurations');
}
public function getSummaryHeader() {
return pht('Configure Forms for Configuring Forms');
}
public function getSummaryText() {
return pht(
'Change how forms in other applications are created and edited. '.
'Advanced!');
}
public function getEngineApplicationClass() {
return 'PhabricatorTransactionsApplication';
}

View file

@ -65,9 +65,14 @@ final class PhabricatorEditEngineSearchEngine
$engine_key = $engine->getEngineKey();
$query_uri = "/transactions/editengine/{$engine_key}/";
$application = $engine->getApplication();
$app_icon = $application->getFontIcon();
$item = id(new PHUIObjectItemView())
->setHeader($engine->getEngineName())
->setHref($query_uri);
->setHeader($engine->getSummaryHeader())
->setHref($query_uri)
->setStatusIcon($app_icon)
->addAttribute($engine->getSummaryText());
$list->addItem($item);
}