mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-27 09:12:41 +01:00
62131de8cd
Summary: Fixes T11274. When task titles are long, we currently wrap stuff and the trace graph renders real weird. Instead, prevent taks/revision titles from wrapping/overflowing. (This works in a slightly weird way, and `text-overflow: ellipsis;` has no apparent effect on any of the containers.) Test Plan: {F1712394} Reviewers: chad Reviewed By: chad Maniphest Tasks: T11274 Differential Revision: https://secure.phabricator.com/D16233
85 lines
1.8 KiB
PHP
85 lines
1.8 KiB
PHP
<?php
|
|
|
|
final class DifferentialRevisionGraph
|
|
extends PhabricatorObjectGraph {
|
|
|
|
protected function getEdgeTypes() {
|
|
return array(
|
|
DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST,
|
|
DifferentialRevisionDependedOnByRevisionEdgeType::EDGECONST,
|
|
);
|
|
}
|
|
|
|
protected function getParentEdgeType() {
|
|
return DifferentialRevisionDependsOnRevisionEdgeType::EDGECONST;
|
|
}
|
|
|
|
protected function newQuery() {
|
|
return new DifferentialRevisionQuery();
|
|
}
|
|
|
|
protected function isClosed($object) {
|
|
return $object->isClosed();
|
|
}
|
|
|
|
protected function newTableRow($phid, $object, $trace) {
|
|
$viewer = $this->getViewer();
|
|
|
|
if ($object) {
|
|
$status_icon = $object->getStatusIcon();
|
|
$status_name = $object->getStatusDisplayName();
|
|
|
|
$status = array(
|
|
id(new PHUIIconView())->setIcon($status_icon),
|
|
' ',
|
|
$status_name,
|
|
);
|
|
|
|
$author = $viewer->renderHandle($object->getAuthorPHID());
|
|
$link = phutil_tag(
|
|
'a',
|
|
array(
|
|
'href' => $object->getURI(),
|
|
),
|
|
$object->getTitle());
|
|
|
|
$link = array(
|
|
$object->getMonogram(),
|
|
' ',
|
|
$link,
|
|
);
|
|
} else {
|
|
$status = null;
|
|
$author = null;
|
|
$link = $viewer->renderHandle($phid);
|
|
}
|
|
|
|
$link = AphrontTableView::renderSingleDisplayLine($link);
|
|
|
|
return array(
|
|
$trace,
|
|
$status,
|
|
$author,
|
|
$link,
|
|
);
|
|
}
|
|
|
|
protected function newTable(AphrontTableView $table) {
|
|
return $table
|
|
->setHeaders(
|
|
array(
|
|
null,
|
|
pht('Status'),
|
|
pht('Author'),
|
|
pht('Revision'),
|
|
))
|
|
->setColumnClasses(
|
|
array(
|
|
'threads',
|
|
'graph-status',
|
|
null,
|
|
'wide pri object-link',
|
|
));
|
|
}
|
|
|
|
}
|