Remove field selector on Diff view and Revision List View
Summary: Ref T2222. This has some minor functionality regressions: - The plain diff page no longer shows unit/test status. I want to give diffs separate custom fields for this. - It was technically possible to shove more data on the list view, although this doensn't affect the default config. Test Plan: Looked at list view, diff detail view. Grepped for changes. Reviewers: btrahan Reviewed By: btrahan CC: aran Maniphest Tasks: T2222 Differential Revision: https://secure.phabricator.com/D8470
This commit is contained in:
@@ -94,35 +94,10 @@ final class DifferentialDiffViewController extends DifferentialController {
|
||||
$diff->getID());
|
||||
$props = mpull($props, 'getData', 'getName');
|
||||
|
||||
$aux_fields = DifferentialFieldSelector::newSelector()
|
||||
->getFieldSpecifications();
|
||||
foreach ($aux_fields as $key => $aux_field) {
|
||||
if (!$aux_field->shouldAppearOnDiffView()) {
|
||||
unset($aux_fields[$key]);
|
||||
} else {
|
||||
$aux_field->setUser($this->getRequest()->getUser());
|
||||
}
|
||||
}
|
||||
|
||||
$dict = array();
|
||||
foreach ($aux_fields as $key => $aux_field) {
|
||||
$aux_field->setDiff($diff);
|
||||
$aux_field->setManualDiff($diff);
|
||||
$aux_field->setDiffProperties($props);
|
||||
$value = $aux_field->renderValueForDiffView();
|
||||
if (strlen($value)) {
|
||||
$label = rtrim($aux_field->renderLabelForDiffView(), ':');
|
||||
$dict[$label] = $value;
|
||||
}
|
||||
}
|
||||
|
||||
$property_head = id(new PHUIHeaderView())
|
||||
->setHeader(pht('Properties'));
|
||||
|
||||
$property_view = new PHUIPropertyListView();
|
||||
foreach ($dict as $key => $value) {
|
||||
$property_view->addProperty($key, $value);
|
||||
}
|
||||
|
||||
$changesets = $diff->loadChangesets();
|
||||
$changesets = msort($changesets, 'getSortKey');
|
||||
|
||||
@@ -30,8 +30,7 @@ final class DifferentialRevisionListController extends DifferentialController
|
||||
|
||||
$user = $this->getRequest()->getUser();
|
||||
$template = id(new DifferentialRevisionListView())
|
||||
->setUser($user)
|
||||
->setFields(DifferentialRevisionListView::getDefaultFields($user));
|
||||
->setUser($user);
|
||||
|
||||
$views = array();
|
||||
if ($query->getQueryKey() == 'active') {
|
||||
|
||||
@@ -766,7 +766,6 @@ final class DifferentialRevisionViewController extends DifferentialController {
|
||||
|
||||
$view = id(new DifferentialRevisionListView())
|
||||
->setRevisions($revisions)
|
||||
->setFields(DifferentialRevisionListView::getDefaultFields($user))
|
||||
->setUser($user);
|
||||
|
||||
$phids = $view->getRequiredHandlePHIDs();
|
||||
|
||||
Reference in New Issue
Block a user