mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-18 12:52:42 +01:00
In Task Graphs, provide a parent/child hint and fix weird strikethrough
Summary: Fixes T11386. Ref T4788. - Apparently fix weird strikethrough effect? Spooky! - Provide a little icon hint in the left column about which tasks are direct parents/children, vs just reachable somehow. I don't think this is super useful/important, but seems maybe nice? Test Plan: {F1740779} Reviewers: chad Reviewed By: chad Maniphest Tasks: T4788, T11386 Differential Revision: https://secure.phabricator.com/D16342
This commit is contained in:
parent
a372627fcd
commit
cebf4bbec6
4 changed files with 63 additions and 6 deletions
|
@ -7,7 +7,7 @@
|
|||
*/
|
||||
return array(
|
||||
'names' => array(
|
||||
'core.pkg.css' => 'efc0f11c',
|
||||
'core.pkg.css' => '8b87d014',
|
||||
'core.pkg.js' => '13c7e56a',
|
||||
'darkconsole.pkg.js' => 'e7393ebb',
|
||||
'differential.pkg.css' => '3fb7f532',
|
||||
|
@ -25,7 +25,7 @@ return array(
|
|||
'rsrc/css/aphront/notification.css' => '3f6c89c9',
|
||||
'rsrc/css/aphront/panel-view.css' => '8427b78d',
|
||||
'rsrc/css/aphront/phabricator-nav-view.css' => 'ac79a758',
|
||||
'rsrc/css/aphront/table-view.css' => '8df59783',
|
||||
'rsrc/css/aphront/table-view.css' => '832656fd',
|
||||
'rsrc/css/aphront/tokenizer.css' => '056da01b',
|
||||
'rsrc/css/aphront/tooltip.css' => '1a07aea8',
|
||||
'rsrc/css/aphront/typeahead-browse.css' => '8904346a',
|
||||
|
@ -537,7 +537,7 @@ return array(
|
|||
'aphront-list-filter-view-css' => '5d6f0526',
|
||||
'aphront-multi-column-view-css' => 'fd18389d',
|
||||
'aphront-panel-view-css' => '8427b78d',
|
||||
'aphront-table-view-css' => '8df59783',
|
||||
'aphront-table-view-css' => '832656fd',
|
||||
'aphront-tokenizer-control-css' => '056da01b',
|
||||
'aphront-tooltip-css' => '1a07aea8',
|
||||
'aphront-typeahead-control-css' => 'd4f16145',
|
||||
|
|
|
@ -3,6 +3,8 @@
|
|||
final class ManiphestTaskGraph
|
||||
extends PhabricatorObjectGraph {
|
||||
|
||||
private $seedMaps = array();
|
||||
|
||||
protected function getEdgeTypes() {
|
||||
return array(
|
||||
ManiphestTaskDependedOnByTaskEdgeType::EDGECONST,
|
||||
|
@ -57,7 +59,12 @@ final class ManiphestTaskGraph
|
|||
$object->getTitle());
|
||||
|
||||
$link = array(
|
||||
$object->getMonogram(),
|
||||
phutil_tag(
|
||||
'span',
|
||||
array(
|
||||
'class' => 'object-name',
|
||||
),
|
||||
$object->getMonogram()),
|
||||
' ',
|
||||
$link,
|
||||
);
|
||||
|
@ -67,9 +74,33 @@ final class ManiphestTaskGraph
|
|||
$link = $viewer->renderHandle($phid);
|
||||
}
|
||||
|
||||
|
||||
|
||||
if ($this->isParentTask($object)) {
|
||||
$marker = 'fa-chevron-circle-up bluegrey';
|
||||
$marker_tip = pht('Direct Parent');
|
||||
} else if ($this->isChildTask($object)) {
|
||||
$marker = 'fa-chevron-circle-down bluegrey';
|
||||
$marker_tip = pht('Direct Subtask');
|
||||
} else {
|
||||
$marker = null;
|
||||
}
|
||||
|
||||
if ($marker) {
|
||||
$marker = id(new PHUIIconView())
|
||||
->setIcon($marker)
|
||||
->addSigil('has-tooltip')
|
||||
->setMetadata(
|
||||
array(
|
||||
'tip' => $marker_tip,
|
||||
'align' => 'E',
|
||||
));
|
||||
}
|
||||
|
||||
$link = AphrontTableView::renderSingleDisplayLine($link);
|
||||
|
||||
return array(
|
||||
$marker,
|
||||
$trace,
|
||||
$status,
|
||||
$assigned,
|
||||
|
@ -81,6 +112,7 @@ final class ManiphestTaskGraph
|
|||
return $table
|
||||
->setHeaders(
|
||||
array(
|
||||
null,
|
||||
null,
|
||||
pht('Status'),
|
||||
pht('Assigned'),
|
||||
|
@ -88,6 +120,7 @@ final class ManiphestTaskGraph
|
|||
))
|
||||
->setColumnClasses(
|
||||
array(
|
||||
'nudgeright',
|
||||
'threads',
|
||||
'graph-status',
|
||||
null,
|
||||
|
@ -95,4 +128,24 @@ final class ManiphestTaskGraph
|
|||
));
|
||||
}
|
||||
|
||||
private function isParentTask(ManiphestTask $task) {
|
||||
$map = $this->getSeedMap(ManiphestTaskDependedOnByTaskEdgeType::EDGECONST);
|
||||
return isset($map[$task->getPHID()]);
|
||||
}
|
||||
|
||||
private function isChildTask(ManiphestTask $task) {
|
||||
$map = $this->getSeedMap(ManiphestTaskDependsOnTaskEdgeType::EDGECONST);
|
||||
return isset($map[$task->getPHID()]);
|
||||
}
|
||||
|
||||
private function getSeedMap($type) {
|
||||
if (!isset($this->seedMaps[$type])) {
|
||||
$maps = $this->getEdges($type);
|
||||
$phids = idx($maps, $this->getSeedPHID(), array());
|
||||
$phids = array_fuse($phids);
|
||||
$this->seedMaps[$type] = $phids;
|
||||
}
|
||||
|
||||
return $this->seedMaps[$type];
|
||||
}
|
||||
}
|
||||
|
|
|
@ -50,6 +50,10 @@ abstract class PhabricatorObjectGraph
|
|||
));
|
||||
}
|
||||
|
||||
final public function getSeedPHID() {
|
||||
return $this->seedPHID;
|
||||
}
|
||||
|
||||
final public function isEmpty() {
|
||||
return (count($this->getNodes()) <= 2);
|
||||
}
|
||||
|
|
|
@ -228,8 +228,8 @@ span.single-display-line-content {
|
|||
position: static;
|
||||
}
|
||||
|
||||
.aphront-table-view tr.closed td.object-link,
|
||||
.aphront-table-view tr.alt-closed td.object-link {
|
||||
.aphront-table-view tr.closed td.object-link .object-name,
|
||||
.aphront-table-view tr.alt-closed td.object-link .object-name {
|
||||
text-decoration: line-through;
|
||||
color: rgba({$alphablack}, 0.5);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue