@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

Don't show the "file tree" view on tablets/phones

Summary: Ref T13516. Hide this UI on devices without the screen width to reasonably support it.

Test Plan: Viewed a revision at various window widths, saw the elements vanish at device widths and reappear at desktop widths.

Maniphest Tasks: T13516

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

+41 -4
+2 -2
resources/celerity/map.php
··· 155 155 'rsrc/css/phui/phui-fontkit.css' => '1ec937e5', 156 156 'rsrc/css/phui/phui-form-view.css' => '01b796c0', 157 157 'rsrc/css/phui/phui-form.css' => '1f177cb7', 158 - 'rsrc/css/phui/phui-formation-view.css' => '9a1eff7e', 158 + 'rsrc/css/phui/phui-formation-view.css' => '1e6b744b', 159 159 'rsrc/css/phui/phui-head-thing.css' => 'd7f293df', 160 160 'rsrc/css/phui/phui-header-view.css' => '36c86a58', 161 161 'rsrc/css/phui/phui-hovercard.css' => '6ca90fa0', ··· 846 846 'phui-fontkit-css' => '1ec937e5', 847 847 'phui-form-css' => '1f177cb7', 848 848 'phui-form-view-css' => '01b796c0', 849 - 'phui-formation-view-css' => '9a1eff7e', 849 + 'phui-formation-view-css' => '1e6b744b', 850 850 'phui-head-thing-view-css' => 'd7f293df', 851 851 'phui-header-view-css' => '36c86a58', 852 852 'phui-hovercard' => '074f0783',
+1
src/applications/differential/engine/DifferentialFileTreeEngine.php
··· 56 56 ->setIsResizable(true) 57 57 ->setIsFixed(true) 58 58 ->setIsVisible($is_visible) 59 + ->setIsDesktopOnly(true) 59 60 ->setWidth($width) 60 61 ->setMinimumWidth($this->getMinimumWidth()) 61 62 ->setMaximumWidth($this->getMaximumWidth());
+10
src/view/formation/PHUIFormationColumnView.php
··· 4 4 extends AphrontAutoIDView { 5 5 6 6 private $item; 7 + private $isDesktopOnly; 7 8 8 9 final public function setColumnItem(PHUIFormationColumnItem $item) { 9 10 $this->item = $item; ··· 52 53 53 54 public function getExpanderTooltip() { 54 55 return null; 56 + } 57 + 58 + public function setIsDesktopOnly($is_desktop_only) { 59 + $this->isDesktopOnly = $is_desktop_only; 60 + return $this; 61 + } 62 + 63 + public function getIsDesktopOnly() { 64 + return $this->isDesktopOnly; 55 65 } 56 66 57 67 }
+8 -2
src/view/formation/PHUIFormationView.php
··· 50 50 $style[] = 'display: none;'; 51 51 } 52 52 53 + $classes = array(); 54 + if ($column->getIsDesktopOnly()) { 55 + $classes[] = 'phui-formation-desktop-only'; 56 + } 57 + 53 58 $cells[] = phutil_tag( 54 59 'td', 55 60 array( 56 61 'id' => $item->getID(), 57 62 'style' => implode(' ', $style), 63 + 'class' => implode(' ', $classes), 58 64 ), 59 65 array( 60 66 $column, ··· 145 151 $resizer_item = $this->newResizerItem(); 146 152 $item->setResizerItem($resizer_item); 147 153 148 - $resizer_item 149 - ->getColumn() 154 + $resizer_item->getColumn() 155 + ->setIsDesktopOnly($column->getIsDesktopOnly()) 150 156 ->setIsVisible($column->getIsVisible()); 151 157 } 152 158
+20
webroot/rsrc/css/phui/phui-formation-view.css
··· 17 17 border-color: {$lightgreyborder}; 18 18 background: {$lightgreybackground}; 19 19 z-index: 4; 20 + 21 + display: none; 22 + } 23 + 24 + .device-desktop .phui-formation-view-expander { 25 + display: block; 26 + } 27 + 28 + .phui-formation-desktop-only { 29 + display: none; 30 + } 31 + 32 + .device-desktop .phui-formation-desktop-only { 33 + display: table-cell; 20 34 } 21 35 22 36 .phui-formation-view-expander-left { ··· 111 125 background-image: url(/rsrc/image/divot.png); 112 126 background-position: center; 113 127 background-repeat: no-repeat; 128 + 129 + display: none; 130 + } 131 + 132 + .device-desktop .phui-formation-resizer { 133 + display: block; 114 134 } 115 135 116 136 .phui-flank-view-fixed {