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:
@@ -9,6 +9,14 @@ final class ManiphestEditEngine
|
|||||||
return pht('Maniphest Tasks');
|
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() {
|
public function getEngineApplicationClass() {
|
||||||
return 'PhabricatorManiphestApplication';
|
return 'PhabricatorManiphestApplication';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ final class PhabricatorOwnersPackageEditEngine
|
|||||||
return pht('Owners Packages');
|
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() {
|
public function getEngineApplicationClass() {
|
||||||
return 'PhabricatorOwnersApplication';
|
return 'PhabricatorOwnersApplication';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -9,6 +9,14 @@ final class PhabricatorPasteEditEngine
|
|||||||
return pht('Pastes');
|
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() {
|
public function getEngineApplicationClass() {
|
||||||
return 'PhabricatorPasteApplication';
|
return 'PhabricatorPasteApplication';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -13,6 +13,14 @@ final class PhameBlogEditEngine
|
|||||||
return 'PhabricatorPhameApplication';
|
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() {
|
protected function newEditableObject() {
|
||||||
return PhameBlog::initializeNewBlog($this->getViewer());
|
return PhameBlog::initializeNewBlog($this->getViewer());
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -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 )------------------------------------------ */
|
/* -( Edit Engine Configuration )------------------------------------------ */
|
||||||
|
|
||||||
|
|
||||||
@@ -1010,9 +1031,9 @@ abstract class PhabricatorEditEngine
|
|||||||
|
|
||||||
$action_button = id(new PHUIButtonView())
|
$action_button = id(new PHUIButtonView())
|
||||||
->setTag('a')
|
->setTag('a')
|
||||||
->setText(pht('Actions'))
|
->setText(pht('Configure Form'))
|
||||||
->setHref('#')
|
->setHref('#')
|
||||||
->setIconFont('fa-bars')
|
->setIconFont('fa-gear')
|
||||||
->setDropdownMenu($action_view);
|
->setDropdownMenu($action_view);
|
||||||
|
|
||||||
return $action_button;
|
return $action_button;
|
||||||
|
|||||||
@@ -30,6 +30,16 @@ final class PhabricatorEditEngineConfigurationEditEngine
|
|||||||
return pht('Edit Configurations');
|
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() {
|
public function getEngineApplicationClass() {
|
||||||
return 'PhabricatorTransactionsApplication';
|
return 'PhabricatorTransactionsApplication';
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -65,9 +65,14 @@ final class PhabricatorEditEngineSearchEngine
|
|||||||
$engine_key = $engine->getEngineKey();
|
$engine_key = $engine->getEngineKey();
|
||||||
$query_uri = "/transactions/editengine/{$engine_key}/";
|
$query_uri = "/transactions/editengine/{$engine_key}/";
|
||||||
|
|
||||||
|
$application = $engine->getApplication();
|
||||||
|
$app_icon = $application->getFontIcon();
|
||||||
|
|
||||||
$item = id(new PHUIObjectItemView())
|
$item = id(new PHUIObjectItemView())
|
||||||
->setHeader($engine->getEngineName())
|
->setHeader($engine->getSummaryHeader())
|
||||||
->setHref($query_uri);
|
->setHref($query_uri)
|
||||||
|
->setStatusIcon($app_icon)
|
||||||
|
->addAttribute($engine->getSummaryText());
|
||||||
|
|
||||||
$list->addItem($item);
|
$list->addItem($item);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user