Skip to content

Commit 26c2a1b

Browse files
author
epriestley
committedFeb 4, 2020
Move existing "Console" interfaces away from "setFixed(...)" on "TwoColumnView"
Summary: Depends on D20931. Ref T13362. Move all "Console"-style interfaces to use a consistent layout based on a new "LauncherView" which just centers the content. Test Plan: Viewed all affected interfaces. Subscribers: PHID-OPKG-gm6ozazyms6q6i22gyam Maniphest Tasks: T13362 Differential Revision: https://secure.phabricator.com/D20933
1 parent cb481f3 commit 26c2a1b

File tree

8 files changed

+55
-18
lines changed

8 files changed

+55
-18
lines changed
 

‎resources/celerity/map.php

+3-3
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
'names' => array(
1010
'conpherence.pkg.css' => '3c8a0668',
1111
'conpherence.pkg.js' => '020aebcf',
12-
'core.pkg.css' => 'ad8fc332',
12+
'core.pkg.css' => '6d9a0ba6',
1313
'core.pkg.js' => '705aec2c',
1414
'differential.pkg.css' => '607c84be',
1515
'differential.pkg.js' => '1b97518d',
@@ -176,7 +176,7 @@
176176
'rsrc/css/phui/phui-status.css' => 'e5ff8be0',
177177
'rsrc/css/phui/phui-tag-view.css' => '8519160a',
178178
'rsrc/css/phui/phui-timeline-view.css' => '1e348e4b',
179-
'rsrc/css/phui/phui-two-column-view.css' => '0a876b9e',
179+
'rsrc/css/phui/phui-two-column-view.css' => 'f96d319f',
180180
'rsrc/css/phui/workboards/phui-workboard-color.css' => 'e86de308',
181181
'rsrc/css/phui/workboards/phui-workboard.css' => '74fc9d98',
182182
'rsrc/css/phui/workboards/phui-workcard.css' => '913441b6',
@@ -873,7 +873,7 @@
873873
'phui-tag-view-css' => '8519160a',
874874
'phui-theme-css' => '35883b37',
875875
'phui-timeline-view-css' => '1e348e4b',
876-
'phui-two-column-view-css' => '0a876b9e',
876+
'phui-two-column-view-css' => 'f96d319f',
877877
'phui-workboard-color-css' => 'e86de308',
878878
'phui-workboard-view-css' => '74fc9d98',
879879
'phui-workcard-view-css' => '913441b6',

‎src/__phutil_library_map__.php

+2
Original file line numberDiff line numberDiff line change
@@ -2037,6 +2037,7 @@
20372037
'PHUIInfoView' => 'view/phui/PHUIInfoView.php',
20382038
'PHUIInvisibleCharacterTestCase' => 'view/phui/__tests__/PHUIInvisibleCharacterTestCase.php',
20392039
'PHUIInvisibleCharacterView' => 'view/phui/PHUIInvisibleCharacterView.php',
2040+
'PHUILauncherView' => 'view/phui/PHUILauncherView.php',
20402041
'PHUILeftRightExample' => 'applications/uiexample/examples/PHUILeftRightExample.php',
20412042
'PHUILeftRightView' => 'view/phui/PHUILeftRightView.php',
20422043
'PHUIListExample' => 'applications/uiexample/examples/PHUIListExample.php',
@@ -8236,6 +8237,7 @@
82368237
'PHUIInfoView' => 'AphrontTagView',
82378238
'PHUIInvisibleCharacterTestCase' => 'PhabricatorTestCase',
82388239
'PHUIInvisibleCharacterView' => 'AphrontView',
8240+
'PHUILauncherView' => 'AphrontTagView',
82398241
'PHUILeftRightExample' => 'PhabricatorUIExample',
82408242
'PHUILeftRightView' => 'AphrontTagView',
82418243
'PHUIListExample' => 'PhabricatorUIExample',

‎src/applications/almanac/controller/AlmanacConsoleController.php

+12-8
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,15 @@ public function handleRequest(AphrontRequest $request) {
1010
$viewer = $request->getViewer();
1111

1212
$menu = id(new PHUIObjectItemListView())
13-
->setUser($viewer);
13+
->setUser($viewer)
14+
->setBig(true);
1415

1516
$menu->addItem(
1617
id(new PHUIObjectItemView())
1718
->setHeader(pht('Devices'))
1819
->setHref($this->getApplicationURI('device/'))
1920
->setImageIcon('fa-server')
21+
->setClickable(true)
2022
->addAttribute(
2123
pht(
2224
'Create an inventory of physical and virtual hosts and '.
@@ -27,6 +29,7 @@ public function handleRequest(AphrontRequest $request) {
2729
->setHeader(pht('Services'))
2830
->setHref($this->getApplicationURI('service/'))
2931
->setImageIcon('fa-plug')
32+
->setClickable(true)
3033
->addAttribute(
3134
pht(
3235
'Create and update services, and map them to interfaces on '.
@@ -37,6 +40,7 @@ public function handleRequest(AphrontRequest $request) {
3740
->setHeader(pht('Networks'))
3841
->setHref($this->getApplicationURI('network/'))
3942
->setImageIcon('fa-globe')
43+
->setClickable(true)
4044
->addAttribute(
4145
pht(
4246
'Manage public and private networks.')));
@@ -46,6 +50,7 @@ public function handleRequest(AphrontRequest $request) {
4650
->setHeader(pht('Namespaces'))
4751
->setHref($this->getApplicationURI('namespace/'))
4852
->setImageIcon('fa-asterisk')
53+
->setClickable(true)
4954
->addAttribute(
5055
pht('Control who can create new named services and devices.')));
5156

@@ -57,24 +62,23 @@ public function handleRequest(AphrontRequest $request) {
5762
->setHeader(pht('Documentation'))
5863
->setHref($docs_uri)
5964
->setImageIcon('fa-book')
65+
->setClickable(true)
6066
->addAttribute(pht('Browse documentation for Almanac.')));
6167

6268
$crumbs = $this->buildApplicationCrumbs();
6369
$crumbs->addTextCrumb(pht('Console'));
6470
$crumbs->setBorder(true);
6571

6672
$box = id(new PHUIObjectBoxView())
73+
->setHeaderText(pht('Almanac Console'))
74+
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
6775
->setObjectList($menu);
6876

69-
$header = id(new PHUIHeaderView())
70-
->setHeader(pht('Almanac Console'))
71-
->setHeaderIcon('fa-server');
77+
$launcher_view = id(new PHUILauncherView())
78+
->appendChild($box);
7279

7380
$view = id(new PHUITwoColumnView())
74-
->setHeader($header)
75-
->setFooter(array(
76-
$box,
77-
));
81+
->setFooter($launcher_view);
7882

7983
return $this->newPage()
8084
->setTitle(pht('Almanac Console'))

‎src/applications/dashboard/controller/PhabricatorDashboardConsoleController.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -59,9 +59,11 @@ public function handleRequest(AphrontRequest $request) {
5959
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
6060
->setObjectList($menu);
6161

62+
$launch_view = id(new PHUILauncherView())
63+
->appendChild($box);
64+
6265
$view = id(new PHUITwoColumnView())
63-
->setFixed(true)
64-
->setFooter($box);
66+
->setFooter($launch_view);
6567

6668
return $this->newPage()
6769
->setTitle($title)

‎src/applications/diffusion/controller/DiffusionRepositoryEditController.php

+5-3
Original file line numberDiff line numberDiff line change
@@ -78,14 +78,16 @@ private function buildVCSTypeResponse() {
7878
->addClass('diffusion-create-repo')
7979
->appendChild($layout);
8080

81-
$view = id(new PHUITwoColumnView())
82-
->setFixed(true)
83-
->setFooter(
81+
$launcher_view = id(new PHUILauncherView())
82+
->appendChild(
8483
array(
8584
$layout,
8685
$hints,
8786
));
8887

88+
$view = id(new PHUITwoColumnView())
89+
->setFooter($launcher_view);
90+
8991
return $this->newPage()
9092
->setTitle($title)
9193
->setCrumbs($crumbs)

‎src/applications/drydock/controller/DrydockConsoleController.php

+4-2
Original file line numberDiff line numberDiff line change
@@ -76,9 +76,11 @@ public function handleRequest(AphrontRequest $request) {
7676
->setBackground(PHUIObjectBoxView::WHITE_CONFIG)
7777
->setObjectList($menu);
7878

79+
$launcher_view = id(new PHUILauncherView())
80+
->appendChild($box);
81+
7982
$view = id(new PHUITwoColumnView())
80-
->setFixed(true)
81-
->setFooter($box);
83+
->setFooter($launcher_view);
8284

8385
return $this->newPage()
8486
->setTitle($title)

‎src/view/phui/PHUILauncherView.php

+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
<?php
2+
3+
final class PHUILauncherView
4+
extends AphrontTagView {
5+
6+
protected function getTagName() {
7+
return 'div';
8+
}
9+
10+
protected function getTagAttributes() {
11+
$classes = array();
12+
13+
$classes[] = 'phui-launcher-view';
14+
15+
return array(
16+
'class' => implode(' ', $classes),
17+
);
18+
}
19+
20+
}

‎webroot/rsrc/css/phui/phui-two-column-view.css

+5
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22
* @provides phui-two-column-view-css
33
*/
44

5+
.phui-launcher-view {
6+
max-width: 1140px;
7+
margin: 0 auto;
8+
}
9+
510
.phui-two-column-fixed {
611
max-width: 1140px;
712
margin: 0 auto;

0 commit comments

Comments
 (0)
Failed to load comments.