@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Don't draw the task graph line image on devices by default

Summary:
See downstream <https://phabricator.wikimedia.org/T210482>.

On mobile, the task graph can take up most of the screen. Hide it on devices. Keep it on the standalone view if you're really dedicated and willing to rotate your phone or whatever to see the lines.

Test Plan: Dragged window real narrow, saw graph hide.

Reviewers: amckinley

Reviewed By: amckinley

Differential Revision: https://secure.phabricator.com/D20313

+19
+1
src/applications/maniphest/controller/ManiphestTaskGraphController.php
··· 30 30 ->setViewer($viewer) 31 31 ->setSeedPHID($task->getPHID()) 32 32 ->setLimit($graph_limit) 33 + ->setIsStandalone(true) 33 34 ->loadGraph(); 34 35 if (!$task_graph->isEmpty()) { 35 36 $parent_type = ManiphestTaskDependedOnByTaskEdgeType::EDGECONST;
+18
src/infrastructure/graph/ManiphestTaskGraph.php
··· 4 4 extends PhabricatorObjectGraph { 5 5 6 6 private $seedMaps = array(); 7 + private $isStandalone; 7 8 8 9 protected function getEdgeTypes() { 9 10 return array( ··· 22 23 23 24 protected function isClosed($object) { 24 25 return $object->isClosed(); 26 + } 27 + 28 + public function setIsStandalone($is_standalone) { 29 + $this->isStandalone = $is_standalone; 30 + return $this; 31 + } 32 + 33 + public function getIsStandalone() { 34 + return $this->isStandalone; 25 35 } 26 36 27 37 protected function newTableRow($phid, $object, $trace) { ··· 132 142 array( 133 143 true, 134 144 !$this->getRenderOnlyAdjacentNodes(), 145 + )) 146 + ->setDeviceVisibility( 147 + array( 148 + true, 149 + 150 + // On mobile, we only show the actual graph drawing if we're on the 151 + // standalone page, since it can take over the screen otherwise. 152 + $this->getIsStandalone(), 135 153 )); 136 154 } 137 155