mirror of
https://we.phorge.it/source/phorge.git
synced 2025-02-22 19:49:02 +01:00
Simplify Differential field selector
Summary: If I use my own selector then it doesn't respect Phabricator config. Also I hated this method. Test Plan: Used default selector, displayed revision. Reviewers: epriestley Reviewed By: epriestley CC: aran, Korvin Differential Revision: https://secure.phabricator.com/D3307
This commit is contained in:
parent
470057c1a3
commit
84d0a6ac2d
4 changed files with 26 additions and 42 deletions
|
@ -23,45 +23,29 @@ final class DifferentialDefaultFieldSelector
|
|||
$fields = array(
|
||||
new DifferentialTitleFieldSpecification(),
|
||||
new DifferentialSummaryFieldSpecification(),
|
||||
new DifferentialTestPlanFieldSpecification(),
|
||||
new DifferentialRevisionStatusFieldSpecification(),
|
||||
new DifferentialAuthorFieldSpecification(),
|
||||
new DifferentialReviewersFieldSpecification(),
|
||||
new DifferentialReviewedByFieldSpecification(),
|
||||
new DifferentialCCsFieldSpecification(),
|
||||
new DifferentialLintFieldSpecification(),
|
||||
new DifferentialUnitFieldSpecification(),
|
||||
new DifferentialCommitsFieldSpecification(),
|
||||
new DifferentialDependenciesFieldSpecification(),
|
||||
new DifferentialManiphestTasksFieldSpecification(),
|
||||
new DifferentialHostFieldSpecification(),
|
||||
new DifferentialPathFieldSpecification(),
|
||||
new DifferentialBranchFieldSpecification(),
|
||||
new DifferentialArcanistProjectFieldSpecification(),
|
||||
new DifferentialApplyPatchFieldSpecification(),
|
||||
new DifferentialRevisionIDFieldSpecification(),
|
||||
new DifferentialGitSVNIDFieldSpecification(),
|
||||
new DifferentialDateModifiedFieldSpecification(),
|
||||
new DifferentialDateCreatedFieldSpecification(),
|
||||
new DifferentialAuditorsFieldSpecification(),
|
||||
);
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('differential.show-test-plan-field')) {
|
||||
$fields[] = new DifferentialTestPlanFieldSpecification();
|
||||
}
|
||||
|
||||
$fields = array_merge(
|
||||
$fields,
|
||||
array(
|
||||
new DifferentialRevisionStatusFieldSpecification(),
|
||||
new DifferentialAuthorFieldSpecification(),
|
||||
new DifferentialReviewersFieldSpecification(),
|
||||
new DifferentialReviewedByFieldSpecification(),
|
||||
new DifferentialCCsFieldSpecification(),
|
||||
new DifferentialLintFieldSpecification(),
|
||||
new DifferentialUnitFieldSpecification(),
|
||||
new DifferentialCommitsFieldSpecification(),
|
||||
new DifferentialDependenciesFieldSpecification(),
|
||||
new DifferentialManiphestTasksFieldSpecification(),
|
||||
));
|
||||
|
||||
if (PhabricatorEnv::getEnvConfig('differential.show-host-field')) {
|
||||
$fields[] = new DifferentialHostFieldSpecification();
|
||||
$fields[] = new DifferentialPathFieldSpecification();
|
||||
}
|
||||
|
||||
$fields = array_merge(
|
||||
$fields,
|
||||
array(
|
||||
new DifferentialBranchFieldSpecification(),
|
||||
new DifferentialArcanistProjectFieldSpecification(),
|
||||
new DifferentialApplyPatchFieldSpecification(),
|
||||
new DifferentialRevisionIDFieldSpecification(),
|
||||
new DifferentialGitSVNIDFieldSpecification(),
|
||||
new DifferentialDateModifiedFieldSpecification(),
|
||||
new DifferentialDateCreatedFieldSpecification(),
|
||||
new DifferentialAuditorsFieldSpecification(),
|
||||
));
|
||||
|
||||
return $fields;
|
||||
}
|
||||
|
||||
|
|
|
@ -1,7 +1,7 @@
|
|||
<?php
|
||||
|
||||
/*
|
||||
* Copyright 2011 Facebook, Inc.
|
||||
* Copyright 2012 Facebook, Inc.
|
||||
*
|
||||
* Licensed under the Apache License, Version 2.0 (the "License");
|
||||
* you may not use this file except in compliance with the License.
|
||||
|
@ -20,7 +20,7 @@ final class DifferentialHostFieldSpecification
|
|||
extends DifferentialFieldSpecification {
|
||||
|
||||
public function shouldAppearOnRevisionView() {
|
||||
return true;
|
||||
return PhabricatorEnv::getEnvConfig('differential.show-host-field');
|
||||
}
|
||||
|
||||
public function renderLabelForRevisionView() {
|
||||
|
|
|
@ -20,7 +20,7 @@ final class DifferentialPathFieldSpecification
|
|||
extends DifferentialFieldSpecification {
|
||||
|
||||
public function shouldAppearOnRevisionView() {
|
||||
return true;
|
||||
return PhabricatorEnv::getEnvConfig('differential.show-host-field');
|
||||
}
|
||||
|
||||
public function renderLabelForRevisionView() {
|
||||
|
|
|
@ -25,7 +25,7 @@ final class DifferentialTestPlanFieldSpecification
|
|||
private $error = false;
|
||||
|
||||
public function shouldAppearOnEdit() {
|
||||
return true;
|
||||
return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
|
||||
}
|
||||
|
||||
protected function didSetRevision() {
|
||||
|
@ -69,7 +69,7 @@ final class DifferentialTestPlanFieldSpecification
|
|||
}
|
||||
|
||||
public function shouldAppearOnCommitMessage() {
|
||||
return true;
|
||||
return PhabricatorEnv::getEnvConfig('differential.show-test-plan-field');
|
||||
}
|
||||
|
||||
public function getCommitMessageKey() {
|
||||
|
|
Loading…
Add table
Reference in a new issue