mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 21:02:41 +01:00
Remove "Next Step" Differential custom field
Summary: Ref T12027. This is purely a UI hint for new users that I'd like to integrate into "Land Revision" in the future instead. Test Plan: Grepped for removed class, browsed Differential. Reviewers: chad Reviewed By: chad Maniphest Tasks: T12027 Differential Revision: https://secure.phabricator.com/D17076
This commit is contained in:
parent
5ea071f658
commit
c57c39f5d2
3 changed files with 0 additions and 69 deletions
|
@ -473,7 +473,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialMailView' => 'applications/differential/mail/DifferentialMailView.php',
|
||||
'DifferentialManiphestTasksField' => 'applications/differential/customfield/DifferentialManiphestTasksField.php',
|
||||
'DifferentialModernHunk' => 'applications/differential/storage/DifferentialModernHunk.php',
|
||||
'DifferentialNextStepField' => 'applications/differential/customfield/DifferentialNextStepField.php',
|
||||
'DifferentialParentRevisionsField' => 'applications/differential/customfield/DifferentialParentRevisionsField.php',
|
||||
'DifferentialParseCacheGarbageCollector' => 'applications/differential/garbagecollector/DifferentialParseCacheGarbageCollector.php',
|
||||
'DifferentialParseCommitMessageConduitAPIMethod' => 'applications/differential/conduit/DifferentialParseCommitMessageConduitAPIMethod.php',
|
||||
|
@ -5128,7 +5127,6 @@ phutil_register_library_map(array(
|
|||
'DifferentialMailView' => 'Phobject',
|
||||
'DifferentialManiphestTasksField' => 'DifferentialCoreCustomField',
|
||||
'DifferentialModernHunk' => 'DifferentialHunk',
|
||||
'DifferentialNextStepField' => 'DifferentialCustomField',
|
||||
'DifferentialParentRevisionsField' => 'DifferentialCustomField',
|
||||
'DifferentialParseCacheGarbageCollector' => 'PhabricatorGarbageCollector',
|
||||
'DifferentialParseCommitMessageConduitAPIMethod' => 'DifferentialConduitAPIMethod',
|
||||
|
|
|
@ -25,8 +25,6 @@ final class PhabricatorDifferentialConfigOptions
|
|||
$custom_field_type = 'custom:PhabricatorCustomFieldConfigOptionType';
|
||||
|
||||
$fields = array(
|
||||
new DifferentialNextStepField(),
|
||||
|
||||
new DifferentialTitleField(),
|
||||
new DifferentialSummaryField(),
|
||||
new DifferentialTestPlanField(),
|
||||
|
|
|
@ -1,65 +0,0 @@
|
|||
<?php
|
||||
|
||||
final class DifferentialNextStepField
|
||||
extends DifferentialCustomField {
|
||||
|
||||
public function getFieldKey() {
|
||||
return 'differential:next-step';
|
||||
}
|
||||
|
||||
public function getFieldName() {
|
||||
return pht('Next Step');
|
||||
}
|
||||
|
||||
public function getFieldDescription() {
|
||||
return pht('Provides a hint for the next step to take.');
|
||||
}
|
||||
|
||||
public function shouldAppearInPropertyView() {
|
||||
return true;
|
||||
}
|
||||
|
||||
public function renderPropertyViewLabel() {
|
||||
return $this->getFieldName();
|
||||
}
|
||||
|
||||
public function renderPropertyViewValue(array $handles) {
|
||||
$revision = $this->getObject();
|
||||
$diff = $revision->getActiveDiff();
|
||||
|
||||
$status = $revision->getStatus();
|
||||
if ($status != ArcanistDifferentialRevisionStatus::ACCEPTED) {
|
||||
return null;
|
||||
}
|
||||
|
||||
$local_vcs = $diff->getSourceControlSystem();
|
||||
switch ($local_vcs) {
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_MERCURIAL:
|
||||
$bookmark = $diff->getBookmark();
|
||||
if (strlen($bookmark)) {
|
||||
$next_step = csprintf('arc land %R', $bookmark);
|
||||
} else {
|
||||
$next_step = csprintf('arc land');
|
||||
}
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_GIT:
|
||||
$branch = $diff->getBranch();
|
||||
if (strlen($branch)) {
|
||||
$next_step = csprintf('arc land %R', $branch);
|
||||
} else {
|
||||
$next_step = csprintf('arc land');
|
||||
}
|
||||
break;
|
||||
case PhabricatorRepositoryType::REPOSITORY_TYPE_SVN:
|
||||
$next_step = csprintf('arc commit');
|
||||
break;
|
||||
default:
|
||||
return null;
|
||||
}
|
||||
|
||||
$next_step = phutil_tag('tt', array(), (string)$next_step);
|
||||
|
||||
return $next_step;
|
||||
}
|
||||
|
||||
}
|
Loading…
Reference in a new issue