From 05628de90d8cdb41b5f2837b9c063fdcac0d1255 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Thu, 8 Sep 2016 21:33:57 -0700 Subject: [PATCH] Clean up random junk in Conpherence Summary: Fixes T10781. Re-uses sidenav styles from global space, though a little hacky. Fix crumb border, fix nux experience. Fiddle spacing. Test Plan: Use Conpherence as new user, make a room, post some messages. {F1805658} Reviewers: epriestley Reviewed By: epriestley Subscribers: Korvin Maniphest Tasks: T10781 Differential Revision: https://secure.phabricator.com/D16528 --- resources/celerity/map.php | 8 ++++---- .../controller/ConpherenceController.php | 7 +++++++ .../conpherence/view/ConpherenceLayoutView.php | 7 +++++++ .../conpherence/view/ConpherenceMenuItemView.php | 6 ++++-- .../view/ConpherenceThreadListView.php | 8 +++----- webroot/rsrc/css/application/conpherence/menu.css | 15 ++++++++++----- .../css/application/conpherence/message-pane.css | 10 +++++----- 7 files changed, 40 insertions(+), 21 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 607c86f5e9..19379621da 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -45,8 +45,8 @@ return array( 'rsrc/css/application/config/setup-issue.css' => 'f794cfc3', 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 'rsrc/css/application/conpherence/durable-column.css' => '86396117', - 'rsrc/css/application/conpherence/menu.css' => '90bdf85c', - 'rsrc/css/application/conpherence/message-pane.css' => '5c7b7b17', + 'rsrc/css/application/conpherence/menu.css' => '26283353', + 'rsrc/css/application/conpherence/message-pane.css' => '8b994132', 'rsrc/css/application/conpherence/notification.css' => '6cdcc253', 'rsrc/css/application/conpherence/transaction.css' => '85d0974c', 'rsrc/css/application/conpherence/update.css' => 'faf6be09', @@ -549,8 +549,8 @@ return array( 'config-options-css' => '0ede4c9b', 'config-page-css' => '8798e14f', 'conpherence-durable-column-view' => '86396117', - 'conpherence-menu-css' => '90bdf85c', - 'conpherence-message-pane-css' => '5c7b7b17', + 'conpherence-menu-css' => '26283353', + 'conpherence-message-pane-css' => '8b994132', 'conpherence-notification-css' => '6cdcc253', 'conpherence-thread-manager' => '01774ab2', 'conpherence-transaction-css' => '85d0974c', diff --git a/src/applications/conpherence/controller/ConpherenceController.php b/src/applications/conpherence/controller/ConpherenceController.php index 8faae68546..6740ed0562 100644 --- a/src/applications/conpherence/controller/ConpherenceController.php +++ b/src/applications/conpherence/controller/ConpherenceController.php @@ -36,6 +36,13 @@ abstract class ConpherenceController extends PhabricatorController { protected function buildConpherenceApplicationCrumbs($is_rooms = false) { $crumbs = parent::buildApplicationCrumbs(); + $crumbs->setBorder(true); + + $crumbs->addAction( + id(new PHUIListItemView()) + ->setName(pht('Search')) + ->setHref($this->getApplicationURI('search/')) + ->setIcon('fa-search')); if ($is_rooms) { $crumbs diff --git a/src/applications/conpherence/view/ConpherenceLayoutView.php b/src/applications/conpherence/view/ConpherenceLayoutView.php index 62ca1bb6fa..ffb234d3d3 100644 --- a/src/applications/conpherence/view/ConpherenceLayoutView.php +++ b/src/applications/conpherence/view/ConpherenceLayoutView.php @@ -145,6 +145,13 @@ final class ConpherenceLayoutView extends AphrontView { 'class' => 'text', ), pht('You are not in any rooms yet.')), + javelin_tag( + 'a', + array( + 'href' => '/conpherence/search/', + 'class' => 'button grey mlr', + ), + pht('Join a Room')), javelin_tag( 'a', array( diff --git a/src/applications/conpherence/view/ConpherenceMenuItemView.php b/src/applications/conpherence/view/ConpherenceMenuItemView.php index 2b5fbcdc20..cc2047b157 100644 --- a/src/applications/conpherence/view/ConpherenceMenuItemView.php +++ b/src/applications/conpherence/view/ConpherenceMenuItemView.php @@ -63,9 +63,11 @@ final class ConpherenceMenuItemView extends AphrontTagView { } protected function getTagAttributes() { - $classes = array('conpherence-menu-item-view'); + $classes = array(); + $classes[] = 'conpherence-menu-item-view'; + $classes[] = 'phui-list-item-href'; return array( - 'class' => $classes, + 'class' => implode(' ', $classes), 'href' => $this->href, ); } diff --git a/src/applications/conpherence/view/ConpherenceThreadListView.php b/src/applications/conpherence/view/ConpherenceThreadListView.php index a4f4a7de6d..302610788c 100644 --- a/src/applications/conpherence/view/ConpherenceThreadListView.php +++ b/src/applications/conpherence/view/ConpherenceThreadListView.php @@ -31,6 +31,9 @@ final class ConpherenceThreadListView extends AphrontView { $this->addRoomsToMenu($menu, $this->threads, $policy_objects); + $menu = phutil_tag_div('phabricator-side-menu', $menu); + $menu = phutil_tag_div('phui-basic-nav', $menu); + return $menu; } @@ -99,11 +102,6 @@ final class ConpherenceThreadListView extends AphrontView { $header = $this->renderMenuItemHeader( pht('Rooms'), 'conpherence-room-list-header'); - $header->appendChild( - id(new PHUIIconView()) - ->setIcon('fa-search') - ->setHref('/conpherence/search/') - ->setText(pht('Search'))); $menu->addMenuItem($header); if (empty($rooms)) { diff --git a/webroot/rsrc/css/application/conpherence/menu.css b/webroot/rsrc/css/application/conpherence/menu.css index d786848837..9aeeccd99e 100644 --- a/webroot/rsrc/css/application/conpherence/menu.css +++ b/webroot/rsrc/css/application/conpherence/menu.css @@ -15,7 +15,7 @@ text-align: center; position: fixed; left: 240px; - right: 241px; + right: 240px; top: 76px; bottom: 0px; min-width: 300px; @@ -39,10 +39,14 @@ overflow-y: auto; top: 0; bottom: 0; - background: #f7f7f7; - border-right: 1px solid {$lightblueborder} + background-color: {$page.sidenav}; } +.conpherence-menu-pane .phui-basic-nav .phabricator-side-menu + .phui-list-item-href { + padding: 4px 0 4px 8px; + } + .conpherence-menu-pane .phui-list-item-view.hidden { display: none; } @@ -69,7 +73,8 @@ } .device-desktop .conpherence-layout .conpherence-menu-pane { - width: 240px; + width: 232px; + padding-right: 8px; } .device .conpherence-menu-pane { @@ -89,7 +94,7 @@ } .device-desktop .conpherence-content-pane { - margin-left: 241px; + margin-left: 240px; } .conpherence-content-pane { diff --git a/webroot/rsrc/css/application/conpherence/message-pane.css b/webroot/rsrc/css/application/conpherence/message-pane.css index ea26d3cbe6..0fd1fbf550 100644 --- a/webroot/rsrc/css/application/conpherence/message-pane.css +++ b/webroot/rsrc/css/application/conpherence/message-pane.css @@ -7,8 +7,8 @@ .loading .messages-loading-icon, .conpherence-layout .conpherence-no-threads { position: fixed; - left: 241px; - right: 241px; + left: 240px; + right: 240px; top: 76px; bottom: 0px; min-width: 300px; @@ -52,8 +52,8 @@ .conpherence-message-pane .conpherence-messages { position: fixed; - left: 241px; - right: 241px; + left: 240px; + right: 240px; top: 78px; bottom: 172px; overflow-x: hidden; @@ -109,7 +109,7 @@ position: fixed; bottom: 0; border-top: 1px solid {$thinblueborder}; - left: 241px; + left: 240px; right: 241px; }