diff --git a/src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php b/src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php index aa3ceba478..c7acd1d44e 100644 --- a/src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephAuthorFieldSpecification.php @@ -3,27 +3,15 @@ final class ReleephAuthorFieldSpecification extends ReleephFieldSpecification { - private static $authorMap = array(); - public function getFieldKey() { return 'author'; } - public function bulkLoad(array $releeph_requests) { - foreach ($releeph_requests as $releeph_request) { - $commit = $releeph_request->loadPhabricatorRepositoryCommit(); - if ($commit) { - $author_phid = $commit->getAuthorPHID(); - self::$authorMap[$releeph_request->getPHID()] = $author_phid; - } - } - } - public function getName() { return 'Author'; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { $pull = $this->getReleephRequest(); $commit = $pull->loadPhabricatorRepositoryCommit(); if (!$commit) { diff --git a/src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php b/src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php index 1d0606060d..24def10c0f 100644 --- a/src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephBranchCommitFieldSpecification.php @@ -11,7 +11,7 @@ final class ReleephBranchCommitFieldSpecification return 'Commit'; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { $rr = $this->getReleephRequest(); if (!$rr->getInBranch()) { return null; diff --git a/src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php index 8af68bd444..5636e8f112 100644 --- a/src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephDependsOnFieldSpecification.php @@ -10,7 +10,7 @@ final class ReleephDependsOnFieldSpecification return pht('Depends On'); } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { $revision_phids = $this->getDependentRevisionPHIDs(); if (!$revision_phids) { return null; diff --git a/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php index 3e3b2cf835..43d1b024c4 100644 --- a/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephDiffChurnFieldSpecification.php @@ -16,7 +16,7 @@ final class ReleephDiffChurnFieldSpecification return 'Churn'; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { $diff_rev = $this->getReleephRequest()->loadDifferentialRevision(); if (!$diff_rev) { return null; diff --git a/src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php index e758a49a01..98c578361c 100644 --- a/src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephDiffMessageFieldSpecification.php @@ -11,15 +11,11 @@ final class ReleephDiffMessageFieldSpecification return 'Message'; } - public function renderLabelForHeaderView() { - return null; - } - public function getStyleForPropertyView() { return 'block'; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { return phutil_tag( 'div', array( diff --git a/src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php b/src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php index c8a6371569..6b201e9cda 100644 --- a/src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephDiffSizeFieldSpecification.php @@ -1,9 +1,5 @@ getReleephRequest()->loadDifferentialRevision(); if (!$diff_rev) { return ''; diff --git a/src/applications/releeph/field/specification/ReleephFieldSpecification.php b/src/applications/releeph/field/specification/ReleephFieldSpecification.php index c5219a0fdc..ea6a565d11 100644 --- a/src/applications/releeph/field/specification/ReleephFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephFieldSpecification.php @@ -22,7 +22,8 @@ abstract class ReleephFieldSpecification } public function renderPropertyViewValue(array $handles) { - $value = $this->renderValueForHeaderView(); + $key = $this->getRequiredStorageKey(); + $value = $this->getReleephRequest()->getDetail($key); if ($value === '') { return null; } @@ -102,22 +103,6 @@ abstract class ReleephFieldSpecification } -/* -( Header View )-------------------------------------------------------- */ - - /** - * Return a label for use in rendering the fields table. If you return null, - * the renderLabelForHeaderView data will span both columns. - */ - public function renderLabelForHeaderView() { - return $this->getName(); - } - - public function renderValueForHeaderView() { - $key = $this->getRequiredStorageKey(); - return $this->getReleephRequest()->getDetail($key); - } - - /* -( Conduit )------------------------------------------------------------ */ public function getKeyForConduit() { @@ -199,12 +184,6 @@ abstract class ReleephFieldSpecification return $this->user; } - -/* -( Bulk loading )------------------------------------------------------- */ - - public function bulkLoad(array $releeph_requests) { - } - /* -( Commit Messages )---------------------------------------------------- */ public function shouldAppearOnCommitMessage() { diff --git a/src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php b/src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php index 3f5565d982..504dd67a16 100644 --- a/src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephIntentFieldSpecification.php @@ -11,7 +11,7 @@ final class ReleephIntentFieldSpecification return 'Intent'; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { $pull = $this->getReleephRequest(); $intents = $pull->getUserIntents(); diff --git a/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php b/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php index 4d09cac45a..59899641fe 100644 --- a/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephLevelFieldSpecification.php @@ -23,7 +23,7 @@ abstract class ReleephLevelFieldSpecification throw new PhabricatorCustomFieldImplementationIncompleteException($this); } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { return $this->getNameForLevel($this->getValue()); } diff --git a/src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php b/src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php index 78c64ed129..b1cef1b5ba 100644 --- a/src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephOriginalCommitFieldSpecification.php @@ -11,7 +11,7 @@ final class ReleephOriginalCommitFieldSpecification return 'Commit'; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { $pull = $this->getReleephRequest(); return $this->slowlyLoadHandle($pull->getRequestCommitPHID())->renderLink(); } diff --git a/src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php b/src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php index 4a8f9e96f3..32e40c86a8 100644 --- a/src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephReasonFieldSpecification.php @@ -19,15 +19,11 @@ final class ReleephReasonFieldSpecification return 'block'; } - public function renderLabelForHeaderView() { - return null; - } - public function getIconForPropertyView() { return PHUIPropertyListView::ICON_SUMMARY; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { return phutil_tag( 'div', array( diff --git a/src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php b/src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php index 9bb4261470..93b7a0fac0 100644 --- a/src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephRequestorFieldSpecification.php @@ -11,7 +11,7 @@ final class ReleephRequestorFieldSpecification return 'Requestor'; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { $phid = $this->getReleephRequest()->getRequestUserPHID(); $handle = id(new PhabricatorHandleQuery()) ->setViewer($this->getUser()) diff --git a/src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php b/src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php index f7dc50ef1e..5455f6d6db 100644 --- a/src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php +++ b/src/applications/releeph/field/specification/ReleephRevisionFieldSpecification.php @@ -11,7 +11,7 @@ final class ReleephRevisionFieldSpecification return 'Revision'; } - public function renderValueForHeaderView() { + public function renderPropertyViewValue(array $handles) { $phid = $this ->getReleephRequest() ->loadRequestCommitDiffPHID();