mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-29 02:02:41 +01:00
Add a "Subtype" tag to the task graph view in Maniphest
Summary: See PHI1466. When an install defines task subtypes, show them on the task graph. Test Plan: - On desktop with subtypes defined, column is visible. - On desktop with subtypes not defined, column is hidden. - On mobile, column is hidden. {F6896845} Differential Revision: https://secure.phabricator.com/D20842
This commit is contained in:
parent
7a0090f4d0
commit
f004b76465
1 changed files with 23 additions and 0 deletions
|
@ -84,9 +84,18 @@ final class ManiphestTaskGraph
|
|||
' ',
|
||||
$link,
|
||||
);
|
||||
|
||||
$subtype_tag = null;
|
||||
|
||||
$subtype = $object->newSubtypeObject();
|
||||
if ($subtype && $subtype->hasTagView()) {
|
||||
$subtype_tag = $subtype->newTagView()
|
||||
->setSlimShady(true);
|
||||
}
|
||||
} else {
|
||||
$status = null;
|
||||
$assigned = null;
|
||||
$subtype_tag = null;
|
||||
$link = $viewer->renderHandle($phid);
|
||||
}
|
||||
|
||||
|
@ -115,18 +124,23 @@ final class ManiphestTaskGraph
|
|||
$marker,
|
||||
$trace,
|
||||
$status,
|
||||
$subtype_tag,
|
||||
$assigned,
|
||||
$link,
|
||||
);
|
||||
}
|
||||
|
||||
protected function newTable(AphrontTableView $table) {
|
||||
$subtype_map = id(new ManiphestTask())->newEditEngineSubtypeMap();
|
||||
$has_subtypes = ($subtype_map->getCount() > 1);
|
||||
|
||||
return $table
|
||||
->setHeaders(
|
||||
array(
|
||||
null,
|
||||
null,
|
||||
pht('Status'),
|
||||
pht('Subtype'),
|
||||
pht('Assigned'),
|
||||
pht('Task'),
|
||||
))
|
||||
|
@ -136,12 +150,15 @@ final class ManiphestTaskGraph
|
|||
'threads',
|
||||
'graph-status',
|
||||
null,
|
||||
null,
|
||||
'wide pri object-link',
|
||||
))
|
||||
->setColumnVisibility(
|
||||
array(
|
||||
true,
|
||||
!$this->getRenderOnlyAdjacentNodes(),
|
||||
true,
|
||||
$has_subtypes,
|
||||
))
|
||||
->setDeviceVisibility(
|
||||
array(
|
||||
|
@ -150,6 +167,11 @@ final class ManiphestTaskGraph
|
|||
// On mobile, we only show the actual graph drawing if we're on the
|
||||
// standalone page, since it can take over the screen otherwise.
|
||||
$this->getIsStandalone(),
|
||||
true,
|
||||
|
||||
// On mobile, don't show subtypes since they're relatively less
|
||||
// important and we're more pressured for space.
|
||||
false,
|
||||
));
|
||||
}
|
||||
|
||||
|
@ -180,6 +202,7 @@ final class ManiphestTaskGraph
|
|||
null,
|
||||
null,
|
||||
null,
|
||||
null,
|
||||
pht("\xC2\xB7 \xC2\xB7 \xC2\xB7"),
|
||||
);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue