1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2024-11-10 00:42:41 +01:00

Remove flavor text for action buttons

Summary: A small but appreciable number of users find flavor on buttons confusing. Remove this flavor. This retains flavor in headers, error messages, etc., which doesn't cause confusion.

Test Plan: Looked at a revision, task, paste, macro, etc.

Reviewers: chad, btrahan

Reviewed By: btrahan

Subscribers: epriestley

Differential Revision: https://secure.phabricator.com/D8812
This commit is contained in:
epriestley 2014-04-18 17:51:46 -07:00
parent ba956711a5
commit f1245f4f34
15 changed files with 27 additions and 81 deletions

View file

@ -638,13 +638,6 @@ return array(
'https' => true, 'https' => true,
), ),
// By default, Phabricator includes some silly nonsense in the UI, such as
// a submit button called "Clowncopterize" in Differential and a call to
// "Leap Into Action". If you'd prefer more traditional UI strings like
// "Submit", you can set this flag to disable most of the jokes and easter
// eggs.
'phabricator.serious-business' => false,
// Should Phabricator show beta applications on the homepage // Should Phabricator show beta applications on the homepage
'phabricator.show-beta-applications' => false, 'phabricator.show-beta-applications' => false,

View file

@ -103,8 +103,6 @@ class AphrontDefaultApplicationConfiguration
return $response; return $response;
} }
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$user = $request->getUser(); $user = $request->getUser();
if (!$user) { if (!$user) {
// If we hit an exception very early, we won't have a user. // If we hit an exception very early, we won't have a user.
@ -175,9 +173,9 @@ class AphrontDefaultApplicationConfiguration
->appendChild($content); ->appendChild($content);
if ($this->getRequest()->isAjax()) { if ($this->getRequest()->isAjax()) {
$dialog->addCancelButton('/', 'Close'); $dialog->addCancelButton('/', pht('Close'));
} else { } else {
$dialog->addCancelButton('/', $is_serious ? 'OK' : 'Away With Thee'); $dialog->addCancelButton('/', pht('OK'));
} }
$response = new AphrontDialogResponse(); $response = new AphrontDialogResponse();

View file

@ -112,11 +112,11 @@ final class PhabricatorCoreConfigOptions
pht("Should Phabricator be serious?")) pht("Should Phabricator be serious?"))
->setDescription( ->setDescription(
pht( pht(
"By default, Phabricator includes some silly nonsense in the UI, ". 'By default, Phabricator includes some flavor text in the UI, '.
"such as a submit button called 'Clowncopterize' in Differential ". 'like a prompt to "Weigh In" rather than "Add Comment" in '.
"and a call to 'Leap Into Action'. If you'd prefer more ". 'Maniphest. If you\'d prefer more traditional UI strings like '.
"traditional UI strings like 'Submit', you can set this flag to ". '"Add Comment", you can set this flag to disable most of the '.
"disable most of the jokes and easter eggs.")), 'extra flavor.')),
$this->newOption('environment.append-paths', 'list<string>', $paths) $this->newOption('environment.append-paths', 'list<string>', $paths)
->setSummary( ->setSummary(
pht("These paths get appended to your \$PATH envrionment variable.")) pht("These paths get appended to your \$PATH envrionment variable."))

View file

@ -133,7 +133,6 @@ final class ConpherenceViewController extends
$update_uri = $this->getApplicationURI('update/'.$conpherence->getID().'/'); $update_uri = $this->getApplicationURI('update/'.$conpherence->getID().'/');
$this->initBehavior('conpherence-pontificate'); $this->initBehavior('conpherence-pontificate');
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$form = $form =
id(new AphrontFormView()) id(new AphrontFormView())
@ -149,10 +148,7 @@ final class ConpherenceViewController extends
->setValue($draft->getDraft())) ->setValue($draft->getDraft()))
->appendChild( ->appendChild(
id(new AphrontFormSubmitControl()) id(new AphrontFormSubmitControl())
->setValue( ->setValue(pht('Send Message')))
$is_serious
? pht('Send')
: pht('Pontificate')))
->appendChild( ->appendChild(
javelin_tag( javelin_tag(
'input', 'input',

View file

@ -52,9 +52,6 @@ final class DifferentialAddCommentView extends AphrontView {
public function render() { public function render() {
$this->requireResource('differential-revision-add-comment-css'); $this->requireResource('differential-revision-add-comment-css');
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$revision = $this->revision; $revision = $this->revision;
$action = null; $action = null;
@ -109,7 +106,7 @@ final class DifferentialAddCommentView extends AphrontView {
->setUser($this->user)) ->setUser($this->user))
->appendChild( ->appendChild(
id(new AphrontFormSubmitControl()) id(new AphrontFormSubmitControl())
->setValue($is_serious ? pht('Submit') : pht('Clowncopterize'))); ->setValue(pht('Submit')));
Javelin::initBehavior( Javelin::initBehavior(
'differential-add-reviewers-and-ccs', 'differential-add-reviewers-and-ccs',
@ -157,8 +154,13 @@ final class DifferentialAddCommentView extends AphrontView {
'inline' => 'inline-comment-preview', 'inline' => 'inline-comment-preview',
)); ));
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$header_text = $is_serious
? pht('Add Comment')
: pht('Leap Into Action');
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
->setHeader($is_serious ? pht('Add Comment') : pht('Leap Into Action')); ->setHeader($header_text);
$anchor = id(new PhabricatorAnchorView()) $anchor = id(new PhabricatorAnchorView())
->setAnchorName('comment') ->setAnchorName('comment')

View file

@ -764,7 +764,7 @@ final class DiffusionCommitController extends DiffusionController {
->setUser($user)) ->setUser($user))
->appendChild( ->appendChild(
id(new AphrontFormSubmitControl()) id(new AphrontFormSubmitControl())
->setValue($is_serious ? pht('Submit') : pht('Cook the Books'))); ->setValue(pht('Submit')));
$header = new PHUIHeaderView(); $header = new PHUIHeaderView();
$header->setHeader( $header->setHeader(

View file

@ -99,10 +99,6 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
? pht('Add Comment') ? pht('Add Comment')
: pht('Question File Integrity'); : pht('Question File Integrity');
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Debate the Bits');
$draft = PhabricatorDraft::newFromUserAndKey($user, $file->getPHID()); $draft = PhabricatorDraft::newFromUserAndKey($user, $file->getPHID());
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) $add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
@ -111,7 +107,7 @@ final class PhabricatorFileInfoController extends PhabricatorFileController {
->setDraft($draft) ->setDraft($draft)
->setHeaderText($add_comment_header) ->setHeaderText($add_comment_header)
->setAction($this->getApplicationURI('/comment/'.$file->getID().'/')) ->setAction($this->getApplicationURI('/comment/'.$file->getID().'/'))
->setSubmitButtonName($submit_button_name); ->setSubmitButtonName(pht('Add Comment'));
return array( return array(
$timeline, $timeline,

View file

@ -210,17 +210,13 @@ final class LegalpadDocumentViewController extends LegalpadController {
? pht('Add Comment') ? pht('Add Comment')
: pht('Debate Legislation'); : pht('Debate Legislation');
$button_name = $is_serious
? pht('Add Comment')
: pht('Commence Filibuster');
$form = id(new PhabricatorApplicationTransactionCommentView()) $form = id(new PhabricatorApplicationTransactionCommentView())
->setUser($user) ->setUser($user)
->setObjectPHID($document->getPHID()) ->setObjectPHID($document->getPHID())
->setFormID($comment_form_id) ->setFormID($comment_form_id)
->setHeaderText($title) ->setHeaderText($title)
->setDraft($draft) ->setDraft($draft)
->setSubmitButtonName($button_name) ->setSubmitButtonName(pht('Add Comment'))
->setAction($this->getApplicationURI('/comment/'.$document->getID().'/')) ->setAction($this->getApplicationURI('/comment/'.$document->getID().'/'))
->setRequestURI($this->getRequest()->getRequestURI()); ->setRequestURI($this->getRequest()->getRequestURI());

View file

@ -87,10 +87,6 @@ final class PhabricatorMacroViewController
? pht('Add Comment') ? pht('Add Comment')
: pht('Grovel in Awe'); : pht('Grovel in Awe');
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Lavish Praise');
$draft = PhabricatorDraft::newFromUserAndKey($user, $macro->getPHID()); $draft = PhabricatorDraft::newFromUserAndKey($user, $macro->getPHID());
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) $add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
@ -99,7 +95,7 @@ final class PhabricatorMacroViewController
->setDraft($draft) ->setDraft($draft)
->setHeaderText($comment_header) ->setHeaderText($comment_header)
->setAction($this->getApplicationURI('/comment/'.$macro->getID().'/')) ->setAction($this->getApplicationURI('/comment/'.$macro->getID().'/'))
->setSubmitButtonName($submit_button_name); ->setSubmitButtonName(pht('Add Comment'));
$object_box = id(new PHUIObjectBoxView()) $object_box = id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)

View file

@ -205,16 +205,6 @@ final class ManiphestTaskDetailController extends ManiphestController {
$draft_text = null; $draft_text = null;
} }
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$submit_text = $is_serious
? pht('Submit')
: pht('Avast!');
$close_text = $is_serious
? pht('Close Task')
: pht('Scuttle Task');
$submit_control = id(new PHUIFormMultiSubmitControl()); $submit_control = id(new PHUIFormMultiSubmitControl());
if (!$task->isClosed()) { if (!$task->isClosed()) {
$close_image = id(new PHUIIconView()) $close_image = id(new PHUIIconView())
@ -224,11 +214,11 @@ final class ManiphestTaskDetailController extends ManiphestController {
id(new PHUIButtonView()) id(new PHUIButtonView())
->setColor(PHUIButtonView::GREY) ->setColor(PHUIButtonView::GREY)
->setIcon($close_image) ->setIcon($close_image)
->setText($close_text) ->setText(pht('Close Task'))
->setName('scuttle') ->setName('scuttle')
->addSigil('alternate-submit-button')); ->addSigil('alternate-submit-button'));
} }
$submit_control->addSubmitButton($submit_text); $submit_control->addSubmitButton(pht('Submit'));
$comment_form = new AphrontFormView(); $comment_form = new AphrontFormView();
$comment_form $comment_form
@ -343,6 +333,7 @@ final class ManiphestTaskDetailController extends ManiphestController {
)); ));
} }
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$comment_header = $is_serious $comment_header = $is_serious
? pht('Add Comment') ? pht('Add Comment')
: pht('Weigh In'); : pht('Weigh In');

View file

@ -118,10 +118,6 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
? pht('Add Comment') ? pht('Add Comment')
: pht('Debate Paste Accuracy'); : pht('Debate Paste Accuracy');
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Pity the Fool');
$draft = PhabricatorDraft::newFromUserAndKey($user, $paste->getPHID()); $draft = PhabricatorDraft::newFromUserAndKey($user, $paste->getPHID());
$add_comment_form = id(new PhabricatorApplicationTransactionCommentView()) $add_comment_form = id(new PhabricatorApplicationTransactionCommentView())
@ -130,7 +126,7 @@ final class PhabricatorPasteViewController extends PhabricatorPasteController {
->setDraft($draft) ->setDraft($draft)
->setHeaderText($add_comment_header) ->setHeaderText($add_comment_header)
->setAction($this->getApplicationURI('/comment/'.$paste->getID().'/')) ->setAction($this->getApplicationURI('/comment/'.$paste->getID().'/'))
->setSubmitButtonName($submit_button_name); ->setSubmitButtonName(pht('Add Comment'));
return $this->buildApplicationPage( return $this->buildApplicationPage(
array( array(

View file

@ -235,22 +235,17 @@ final class PholioMockViewController extends PholioController {
$draft = PhabricatorDraft::newFromUserAndKey($user, $mock->getPHID()); $draft = PhabricatorDraft::newFromUserAndKey($user, $mock->getPHID());
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$title = $is_serious $title = $is_serious
? pht('Add Comment') ? pht('Add Comment')
: pht('History Beckons'); : pht('History Beckons');
$button_name = $is_serious
? pht('Add Comment')
: pht('Answer The Call');
$form = id(new PhabricatorApplicationTransactionCommentView()) $form = id(new PhabricatorApplicationTransactionCommentView())
->setUser($user) ->setUser($user)
->setObjectPHID($mock->getPHID()) ->setObjectPHID($mock->getPHID())
->setFormID($comment_form_id) ->setFormID($comment_form_id)
->setDraft($draft) ->setDraft($draft)
->setHeaderText($title) ->setHeaderText($title)
->setSubmitButtonName($button_name) ->setSubmitButtonName(pht('Add Comment'))
->setAction($this->getApplicationURI('/comment/'.$mock->getID().'/')) ->setAction($this->getApplicationURI('/comment/'.$mock->getID().'/'))
->setRequestURI($this->getRequest()->getRequestURI()); ->setRequestURI($this->getRequest()->getRequestURI());

View file

@ -15,7 +15,6 @@ final class PhrictionMoveController
public function processRequest() { public function processRequest() {
$request = $this->getRequest(); $request = $this->getRequest();
$user = $request->getUser(); $user = $request->getUser();
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
if ($this->id) { if ($this->id) {
$document = id(new PhrictionDocument())->load($this->id); $document = id(new PhrictionDocument())->load($this->id);
@ -114,9 +113,6 @@ final class PhrictionMoveController
->setErrors($errors); ->setErrors($errors);
} }
$descr_caption = $is_serious ? pht('A reason for the move.') :
pht('You better give a good reason for this.');
$form = id(new PHUIFormLayoutView()) $form = id(new PHUIFormLayoutView())
->setUser($user) ->setUser($user)
->appendChild( ->appendChild(
@ -135,8 +131,7 @@ final class PhrictionMoveController
->setLabel(pht('Edit Notes')) ->setLabel(pht('Edit Notes'))
->setValue($content->getDescription()) ->setValue($content->getDescription())
->setError(null) ->setError(null)
->setName('description') ->setName('description'));
->setCaption($descr_caption));
$dialog = id(new AphrontDialogView()) $dialog = id(new AphrontDialogView())
->setUser($user) ->setUser($user)

View file

@ -17,8 +17,6 @@ final class PonderAddAnswerView extends AphrontView {
} }
public function render() { public function render() {
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business');
$question = $this->question; $question = $this->question;
$header = id(new PHUIHeaderView()) $header = id(new PHUIHeaderView())
@ -39,9 +37,7 @@ final class PonderAddAnswerView extends AphrontView {
->setUser($this->user)) ->setUser($this->user))
->appendChild( ->appendChild(
id(new AphrontFormSubmitControl()) id(new AphrontFormSubmitControl())
->setValue($is_serious ? ->setValue(pht('Add Answer')));
pht('Add Answer') :
pht('Bequeath Wisdom')));
return id(new PHUIObjectBoxView()) return id(new PHUIObjectBoxView())
->setHeader($header) ->setHeader($header)

View file

@ -164,10 +164,6 @@ final class PhabricatorSlowvotePollController
? pht('Add Comment') ? pht('Add Comment')
: pht('Enter Deliberations'); : pht('Enter Deliberations');
$submit_button_name = $is_serious
? pht('Add Comment')
: pht('Perhaps');
$draft = PhabricatorDraft::newFromUserAndKey($viewer, $poll->getPHID()); $draft = PhabricatorDraft::newFromUserAndKey($viewer, $poll->getPHID());
return id(new PhabricatorApplicationTransactionCommentView()) return id(new PhabricatorApplicationTransactionCommentView())
@ -176,7 +172,7 @@ final class PhabricatorSlowvotePollController
->setDraft($draft) ->setDraft($draft)
->setHeaderText($add_comment_header) ->setHeaderText($add_comment_header)
->setAction($this->getApplicationURI('/comment/'.$poll->getID().'/')) ->setAction($this->getApplicationURI('/comment/'.$poll->getID().'/'))
->setSubmitButtonName($submit_button_name); ->setSubmitButtonName(pht('Add Comment'));
} }