From 2ebbac86ded9ffe25d67138e81dfd6f23d2e5023 Mon Sep 17 00:00:00 2001 From: epriestley Date: Fri, 16 Dec 2016 09:41:43 -0800 Subject: [PATCH] Simplify Differential "Summary" field Summary: Ref T11114. Keep UI stuff and mail stuff, toss editing. Test Plan: Viewed and edited revision summaries. Reviewers: chad Reviewed By: chad Maniphest Tasks: T11114 Differential Revision: https://secure.phabricator.com/D17085 --- .../customfield/DifferentialSummaryField.php | 84 ------------------- 1 file changed, 84 deletions(-) diff --git a/src/applications/differential/customfield/DifferentialSummaryField.php b/src/applications/differential/customfield/DifferentialSummaryField.php index 5052e238e0..a11bebca6e 100644 --- a/src/applications/differential/customfield/DifferentialSummaryField.php +++ b/src/applications/differential/customfield/DifferentialSummaryField.php @@ -7,10 +7,6 @@ final class DifferentialSummaryField return 'differential:summary'; } - public function getFieldKeyForConduit() { - return 'summary'; - } - public function getFieldName() { return pht('Summary'); } @@ -27,69 +23,6 @@ final class DifferentialSummaryField return $revision->getSummary(); } - protected function writeValueToRevision( - DifferentialRevision $revision, - $value) { - $revision->setSummary($value); - } - - public function readValueFromRequest(AphrontRequest $request) { - $this->setValue($request->getStr($this->getFieldKey())); - } - - public function renderEditControl(array $handles) { - return id(new PhabricatorRemarkupControl()) - ->setUser($this->getViewer()) - ->setName($this->getFieldKey()) - ->setValue($this->getValue()) - ->setError($this->getFieldError()) - ->setLabel($this->getFieldName()); - } - - public function getApplicationTransactionTitle( - PhabricatorApplicationTransaction $xaction) { - $author_phid = $xaction->getAuthorPHID(); - $old = $xaction->getOldValue(); - $new = $xaction->getNewValue(); - - return pht( - '%s updated the summary for this revision.', - $xaction->renderHandleLink($author_phid)); - } - - public function getApplicationTransactionTitleForFeed( - PhabricatorApplicationTransaction $xaction) { - - $object_phid = $xaction->getObjectPHID(); - $author_phid = $xaction->getAuthorPHID(); - $old = $xaction->getOldValue(); - $new = $xaction->getNewValue(); - - return pht( - '%s updated the summary for %s.', - $xaction->renderHandleLink($author_phid), - $xaction->renderHandleLink($object_phid)); - } - - public function getApplicationTransactionHasChangeDetails( - PhabricatorApplicationTransaction $xaction) { - return true; - } - - public function getApplicationTransactionChangeDetails( - PhabricatorApplicationTransaction $xaction, - PhabricatorUser $viewer) { - return $xaction->renderTextCorpusChangeDetails( - $viewer, - $xaction->getOldValue(), - $xaction->getNewValue()); - } - - public function shouldHideInApplicationTransactions( - PhabricatorApplicationTransaction $xaction) { - return ($xaction->getOldValue() === null); - } - public function shouldAppearInGlobalSearch() { return true; } @@ -125,23 +58,6 @@ final class DifferentialSummaryField return new PHUIRemarkupView($this->getViewer(), $this->getValue()); } - public function getApplicationTransactionRemarkupBlocks( - PhabricatorApplicationTransaction $xaction) { - return array($xaction->getNewValue()); - } - - public function shouldAppearInCommitMessage() { - return true; - } - - public function shouldAppearInCommitMessageTemplate() { - return true; - } - - public function shouldOverwriteWhenCommitMessageIsEdited() { - return true; - } - public function shouldAppearInTransactionMail() { return true; }