mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-25 16:22:43 +01:00
Hide curtainview on mobile if it's empty
Summary: If we don't have any panels, just an action list, we want to hide the entire box on mobile since it's just an empty line. Test Plan: Review Owners, Differential curtains on mobile, desktop. Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Differential Revision: https://secure.phabricator.com/D18350
This commit is contained in:
parent
83f66ce55e
commit
58db64c81f
3 changed files with 15 additions and 4 deletions
|
@ -9,7 +9,7 @@ return array(
|
||||||
'names' => array(
|
'names' => array(
|
||||||
'conpherence.pkg.css' => 'e68cf1fa',
|
'conpherence.pkg.css' => 'e68cf1fa',
|
||||||
'conpherence.pkg.js' => 'b5b51108',
|
'conpherence.pkg.js' => 'b5b51108',
|
||||||
'core.pkg.css' => 'cc0772c6',
|
'core.pkg.css' => '04da74af',
|
||||||
'core.pkg.js' => '5d80e0db',
|
'core.pkg.js' => '5d80e0db',
|
||||||
'darkconsole.pkg.js' => '1f9a31bc',
|
'darkconsole.pkg.js' => '1f9a31bc',
|
||||||
'differential.pkg.css' => '45951e9e',
|
'differential.pkg.css' => '45951e9e',
|
||||||
|
@ -149,7 +149,7 @@ return array(
|
||||||
'rsrc/css/phui/phui-comment-form.css' => 'ac68149f',
|
'rsrc/css/phui/phui-comment-form.css' => 'ac68149f',
|
||||||
'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad',
|
'rsrc/css/phui/phui-comment-panel.css' => 'f50152ad',
|
||||||
'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb',
|
'rsrc/css/phui/phui-crumbs-view.css' => '6ece3bbb',
|
||||||
'rsrc/css/phui/phui-curtain-view.css' => '55dd0e59',
|
'rsrc/css/phui/phui-curtain-view.css' => 'ca363f15',
|
||||||
'rsrc/css/phui/phui-document-pro.css' => '8af7ea27',
|
'rsrc/css/phui/phui-document-pro.css' => '8af7ea27',
|
||||||
'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf',
|
'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf',
|
||||||
'rsrc/css/phui/phui-document.css' => 'c32e8dec',
|
'rsrc/css/phui/phui-document.css' => 'c32e8dec',
|
||||||
|
@ -835,7 +835,7 @@ return array(
|
||||||
'phui-comment-form-css' => 'ac68149f',
|
'phui-comment-form-css' => 'ac68149f',
|
||||||
'phui-comment-panel-css' => 'f50152ad',
|
'phui-comment-panel-css' => 'f50152ad',
|
||||||
'phui-crumbs-view-css' => '6ece3bbb',
|
'phui-crumbs-view-css' => '6ece3bbb',
|
||||||
'phui-curtain-view-css' => '55dd0e59',
|
'phui-curtain-view-css' => 'ca363f15',
|
||||||
'phui-document-summary-view-css' => '9ca48bdf',
|
'phui-document-summary-view-css' => '9ca48bdf',
|
||||||
'phui-document-view-css' => 'c32e8dec',
|
'phui-document-view-css' => 'c32e8dec',
|
||||||
'phui-document-view-pro-css' => '8af7ea27',
|
'phui-document-view-pro-css' => '8af7ea27',
|
||||||
|
|
|
@ -46,10 +46,17 @@ final class PHUICurtainView extends AphrontTagView {
|
||||||
|
|
||||||
$panels = $this->renderPanels();
|
$panels = $this->renderPanels();
|
||||||
|
|
||||||
return id(new PHUIObjectBoxView())
|
$box = id(new PHUIObjectBoxView())
|
||||||
->appendChild($action_list)
|
->appendChild($action_list)
|
||||||
->appendChild($panels)
|
->appendChild($panels)
|
||||||
->addClass('phui-two-column-properties');
|
->addClass('phui-two-column-properties');
|
||||||
|
|
||||||
|
// We want to hide this UI on mobile if there are no child panels
|
||||||
|
if (!$panels) {
|
||||||
|
$box->addClass('curtain-no-panels');
|
||||||
|
}
|
||||||
|
|
||||||
|
return $box;
|
||||||
}
|
}
|
||||||
|
|
||||||
private function renderPanels() {
|
private function renderPanels() {
|
||||||
|
|
|
@ -46,3 +46,7 @@
|
||||||
.phui-side-column .phui-curtain-panel-body .phui-tag-view {
|
.phui-side-column .phui-curtain-panel-body .phui-tag-view {
|
||||||
white-space: pre-wrap;
|
white-space: pre-wrap;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.device .curtain-no-panels {
|
||||||
|
display: none;
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in a new issue