From 7ec09d3924dee66724cc20f983f2125ae3128bb0 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Fri, 27 Jun 2014 08:28:33 -0700 Subject: [PATCH] Use ObjectBoxView for Config pages Summary: Doing to start to try to remove all the 'purple' PHUIHeaders around Phabricator and see what's left after. Test Plan: View each page {F171007} Reviewers: epriestley Reviewed By: epriestley Differential Revision: https://secure.phabricator.com/D9750 --- resources/celerity/map.php | 6 +++--- .../controller/PhabricatorConfigAllController.php | 7 +++---- .../controller/PhabricatorConfigGroupController.php | 11 +++++------ .../PhabricatorConfigIssueListController.php | 9 +++++---- .../controller/PhabricatorConfigListController.php | 9 ++++++++- webroot/rsrc/css/phui/phui-header-view.css | 2 +- 6 files changed, 25 insertions(+), 19 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 9159b4238d..12d8a8ea33 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,7 +7,7 @@ return array( 'names' => array( - 'core.pkg.css' => '4b1115ac', + 'core.pkg.css' => '2151ff22', 'core.pkg.js' => '834b4eda', 'darkconsole.pkg.js' => 'df001cab', 'differential.pkg.css' => '4a93db37', @@ -129,7 +129,7 @@ return array( 'rsrc/css/phui/phui-fontkit.css' => '8246e56e', 'rsrc/css/phui/phui-form-view.css' => 'ebac1b1d', 'rsrc/css/phui/phui-form.css' => 'b78ec020', - 'rsrc/css/phui/phui-header-view.css' => 'a2071a67', + 'rsrc/css/phui/phui-header-view.css' => '39594ac0', 'rsrc/css/phui/phui-icon.css' => 'd8526aa1', 'rsrc/css/phui/phui-image-mask.css' => '5a8b09c8', 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', @@ -775,7 +775,7 @@ return array( 'phui-fontkit-css' => '8246e56e', 'phui-form-css' => 'b78ec020', 'phui-form-view-css' => 'ebac1b1d', - 'phui-header-view-css' => 'a2071a67', + 'phui-header-view-css' => '39594ac0', 'phui-icon-view-css' => 'd8526aa1', 'phui-image-mask-css' => '5a8b09c8', 'phui-info-panel-css' => '27ea50a1', diff --git a/src/applications/config/controller/PhabricatorConfigAllController.php b/src/applications/config/controller/PhabricatorConfigAllController.php index 4bd7e54299..7e4dd092e9 100644 --- a/src/applications/config/controller/PhabricatorConfigAllController.php +++ b/src/applications/config/controller/PhabricatorConfigAllController.php @@ -39,7 +39,6 @@ final class PhabricatorConfigAllController ); } $table = id(new AphrontTableView($rows)) - ->setDeviceReadyTable(true) ->setColumnClasses( array( '', @@ -58,9 +57,9 @@ final class PhabricatorConfigAllController ->buildApplicationCrumbs() ->addTextCrumb($title); - $panel = new AphrontPanelView(); + $panel = new PHUIObjectBoxView(); + $panel->setHeaderText(pht('Current Settings')); $panel->appendChild($table); - $panel->setNoBackground(); $versions = $this->loadVersions(); @@ -71,7 +70,7 @@ final class PhabricatorConfigAllController } $object_box = id(new PHUIObjectBoxView()) - ->setHeaderText(pht('Current Settings')) + ->setHeaderText(pht('Current Version')) ->addPropertyList($version_property_list); $phabricator_root = dirname(phutil_get_library_root('phabricator')); diff --git a/src/applications/config/controller/PhabricatorConfigGroupController.php b/src/applications/config/controller/PhabricatorConfigGroupController.php index 3728f42365..1de05b9072 100644 --- a/src/applications/config/controller/PhabricatorConfigGroupController.php +++ b/src/applications/config/controller/PhabricatorConfigGroupController.php @@ -20,12 +20,12 @@ final class PhabricatorConfigGroupController } $title = pht('%s Configuration', $options->getName()); - - $header = id(new PHUIHeaderView()) - ->setHeader($title); - $list = $this->buildOptionList($options->getOptions()); + $box = id(new PHUIObjectBoxView()) + ->setHeaderText($title) + ->appendChild($list); + $crumbs = $this ->buildApplicationCrumbs() ->addTextCrumb(pht('Config'), $this->getApplicationURI()) @@ -34,8 +34,7 @@ final class PhabricatorConfigGroupController return $this->buildApplicationPage( array( $crumbs, - $header, - $list, + $box, ), array( 'title' => $title, diff --git a/src/applications/config/controller/PhabricatorConfigIssueListController.php b/src/applications/config/controller/PhabricatorConfigIssueListController.php index 155657cbfe..4abdfb81ca 100644 --- a/src/applications/config/controller/PhabricatorConfigIssueListController.php +++ b/src/applications/config/controller/PhabricatorConfigIssueListController.php @@ -16,14 +16,15 @@ final class PhabricatorConfigIssueListController $list = $this->buildIssueList($issues); $list->setNoDataString(pht('There are no open setup issues.')); + $list->setStackable(true); - $header = id(new PHUIHeaderView()) - ->setHeader(pht('Open Phabricator Setup Issues')); + $box = id(new PHUIObjectBoxView()) + ->setHeaderText(pht('Open Phabricator Setup Issues')) + ->appendChild($list); $nav->appendChild( array( - $header, - $list, + $box, )); $title = pht('Setup Issues'); diff --git a/src/applications/config/controller/PhabricatorConfigListController.php b/src/applications/config/controller/PhabricatorConfigListController.php index 7018aeb42e..69f062fa91 100644 --- a/src/applications/config/controller/PhabricatorConfigListController.php +++ b/src/applications/config/controller/PhabricatorConfigListController.php @@ -15,7 +15,14 @@ final class PhabricatorConfigListController $title = pht('Phabricator Configuration'); - $nav->appendChild($list); + $box = id(new PHUIObjectBoxView()) + ->setHeaderText($title) + ->appendChild($list); + + $nav->appendChild( + array( + $box + )); $crumbs = $this ->buildApplicationCrumbs() diff --git a/webroot/rsrc/css/phui/phui-header-view.css b/webroot/rsrc/css/phui/phui-header-view.css index 7c51d3fbcf..ed7f4d04c1 100644 --- a/webroot/rsrc/css/phui/phui-header-view.css +++ b/webroot/rsrc/css/phui/phui-header-view.css @@ -6,7 +6,7 @@ background-color: #e0e3ec; border-width: 1px 0; border-style: solid; - border-color: #c0c5d1; + border-color: {$hovergrey}; overflow: hidden; }