diff --git a/src/applications/maniphest/controller/ManiphestTaskGraphController.php b/src/applications/maniphest/controller/ManiphestTaskGraphController.php index 2f342a2d0f..f4655d1835 100644 --- a/src/applications/maniphest/controller/ManiphestTaskGraphController.php +++ b/src/applications/maniphest/controller/ManiphestTaskGraphController.php @@ -30,6 +30,7 @@ final class ManiphestTaskGraphController ->setViewer($viewer) ->setSeedPHID($task->getPHID()) ->setLimit($graph_limit) + ->setIsStandalone(true) ->loadGraph(); if (!$task_graph->isEmpty()) { $parent_type = ManiphestTaskDependedOnByTaskEdgeType::EDGECONST; diff --git a/src/infrastructure/graph/ManiphestTaskGraph.php b/src/infrastructure/graph/ManiphestTaskGraph.php index 99191760dd..74a1fe8701 100644 --- a/src/infrastructure/graph/ManiphestTaskGraph.php +++ b/src/infrastructure/graph/ManiphestTaskGraph.php @@ -4,6 +4,7 @@ final class ManiphestTaskGraph extends PhabricatorObjectGraph { private $seedMaps = array(); + private $isStandalone; protected function getEdgeTypes() { return array( @@ -24,6 +25,15 @@ final class ManiphestTaskGraph return $object->isClosed(); } + public function setIsStandalone($is_standalone) { + $this->isStandalone = $is_standalone; + return $this; + } + + public function getIsStandalone() { + return $this->isStandalone; + } + protected function newTableRow($phid, $object, $trace) { $viewer = $this->getViewer(); @@ -132,6 +142,14 @@ final class ManiphestTaskGraph array( true, !$this->getRenderOnlyAdjacentNodes(), + )) + ->setDeviceVisibility( + array( + true, + + // 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(), )); }