mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
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
This commit is contained in:
parent
d2572f8b33
commit
4793bfcb7c
5 changed files with 41 additions and 4 deletions
|
@ -155,7 +155,7 @@ return array(
|
|||
'rsrc/css/phui/phui-fontkit.css' => '1ec937e5',
|
||||
'rsrc/css/phui/phui-form-view.css' => '01b796c0',
|
||||
'rsrc/css/phui/phui-form.css' => '1f177cb7',
|
||||
'rsrc/css/phui/phui-formation-view.css' => '9a1eff7e',
|
||||
'rsrc/css/phui/phui-formation-view.css' => '1e6b744b',
|
||||
'rsrc/css/phui/phui-head-thing.css' => 'd7f293df',
|
||||
'rsrc/css/phui/phui-header-view.css' => '36c86a58',
|
||||
'rsrc/css/phui/phui-hovercard.css' => '6ca90fa0',
|
||||
|
@ -846,7 +846,7 @@ return array(
|
|||
'phui-fontkit-css' => '1ec937e5',
|
||||
'phui-form-css' => '1f177cb7',
|
||||
'phui-form-view-css' => '01b796c0',
|
||||
'phui-formation-view-css' => '9a1eff7e',
|
||||
'phui-formation-view-css' => '1e6b744b',
|
||||
'phui-head-thing-view-css' => 'd7f293df',
|
||||
'phui-header-view-css' => '36c86a58',
|
||||
'phui-hovercard' => '074f0783',
|
||||
|
|
|
@ -56,6 +56,7 @@ final class DifferentialFileTreeEngine
|
|||
->setIsResizable(true)
|
||||
->setIsFixed(true)
|
||||
->setIsVisible($is_visible)
|
||||
->setIsDesktopOnly(true)
|
||||
->setWidth($width)
|
||||
->setMinimumWidth($this->getMinimumWidth())
|
||||
->setMaximumWidth($this->getMaximumWidth());
|
||||
|
|
|
@ -4,6 +4,7 @@ abstract class PHUIFormationColumnView
|
|||
extends AphrontAutoIDView {
|
||||
|
||||
private $item;
|
||||
private $isDesktopOnly;
|
||||
|
||||
final public function setColumnItem(PHUIFormationColumnItem $item) {
|
||||
$this->item = $item;
|
||||
|
@ -54,4 +55,13 @@ abstract class PHUIFormationColumnView
|
|||
return null;
|
||||
}
|
||||
|
||||
public function setIsDesktopOnly($is_desktop_only) {
|
||||
$this->isDesktopOnly = $is_desktop_only;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIsDesktopOnly() {
|
||||
return $this->isDesktopOnly;
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
@ -50,11 +50,17 @@ final class PHUIFormationView
|
|||
$style[] = 'display: none;';
|
||||
}
|
||||
|
||||
$classes = array();
|
||||
if ($column->getIsDesktopOnly()) {
|
||||
$classes[] = 'phui-formation-desktop-only';
|
||||
}
|
||||
|
||||
$cells[] = phutil_tag(
|
||||
'td',
|
||||
array(
|
||||
'id' => $item->getID(),
|
||||
'style' => implode(' ', $style),
|
||||
'class' => implode(' ', $classes),
|
||||
),
|
||||
array(
|
||||
$column,
|
||||
|
@ -145,8 +151,8 @@ final class PHUIFormationView
|
|||
$resizer_item = $this->newResizerItem();
|
||||
$item->setResizerItem($resizer_item);
|
||||
|
||||
$resizer_item
|
||||
->getColumn()
|
||||
$resizer_item->getColumn()
|
||||
->setIsDesktopOnly($column->getIsDesktopOnly())
|
||||
->setIsVisible($column->getIsVisible());
|
||||
}
|
||||
|
||||
|
|
|
@ -17,6 +17,20 @@
|
|||
border-color: {$lightgreyborder};
|
||||
background: {$lightgreybackground};
|
||||
z-index: 4;
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
.device-desktop .phui-formation-view-expander {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.phui-formation-desktop-only {
|
||||
display: none;
|
||||
}
|
||||
|
||||
.device-desktop .phui-formation-desktop-only {
|
||||
display: table-cell;
|
||||
}
|
||||
|
||||
.phui-formation-view-expander-left {
|
||||
|
@ -111,6 +125,12 @@
|
|||
background-image: url(/rsrc/image/divot.png);
|
||||
background-position: center;
|
||||
background-repeat: no-repeat;
|
||||
|
||||
display: none;
|
||||
}
|
||||
|
||||
.device-desktop .phui-formation-resizer {
|
||||
display: block;
|
||||
}
|
||||
|
||||
.phui-flank-view-fixed {
|
||||
|
|
Loading…
Reference in a new issue