From a912e3bf83d88684085f50c3648f178cc1484362 Mon Sep 17 00:00:00 2001 From: Chad Little Date: Sun, 12 Apr 2015 13:57:17 -0700 Subject: [PATCH] Make ActionList on PHUIDocumentView always a dropdown menu Summary: Gives back 160px of document space, makes Phriction easier to read. Moves ActionList into menu Test Plan: Review Phriction Actions Menu, Edit Document, etc. Test mobile, tablet, desktop breakpoints. Reviewers: btrahan, epriestley Reviewed By: epriestley Subscribers: Korvin, epriestley Differential Revision: https://secure.phabricator.com/D12375 --- resources/celerity/map.php | 10 +++++----- .../controller/PhrictionDocumentController.php | 15 ++------------- webroot/rsrc/css/phui/phui-action-list.css | 4 +++- webroot/rsrc/css/phui/phui-document.css | 13 +++++-------- 4 files changed, 15 insertions(+), 27 deletions(-) diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 59c4159fde..a56529fd7e 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -7,7 +7,7 @@ */ return array( 'names' => array( - 'core.pkg.css' => '58063506', + 'core.pkg.css' => '5ec98613', 'core.pkg.js' => '6a4f677f', 'darkconsole.pkg.js' => '8ab24e01', 'differential.pkg.css' => '3500921f', @@ -123,12 +123,12 @@ return array( 'rsrc/css/phui/calendar/phui-calendar-month.css' => 'a92e47d2', 'rsrc/css/phui/calendar/phui-calendar.css' => '8675968e', 'rsrc/css/phui/phui-action-header-view.css' => '89c497e7', - 'rsrc/css/phui/phui-action-list.css' => 'c5f7a8c5', + 'rsrc/css/phui/phui-action-list.css' => '4d1fe90a', 'rsrc/css/phui/phui-action-panel.css' => '3ee9afd5', 'rsrc/css/phui/phui-box.css' => '7b3a2eed', 'rsrc/css/phui/phui-button.css' => '53f55a72', 'rsrc/css/phui/phui-crumbs-view.css' => '594d719e', - 'rsrc/css/phui/phui-document.css' => 'aa714c6d', + 'rsrc/css/phui/phui-document.css' => 'ffaf9eb9', 'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5', 'rsrc/css/phui/phui-fontkit.css' => '1fa79503', 'rsrc/css/phui/phui-form-view.css' => '28062c92', @@ -712,7 +712,7 @@ return array( 'paste-css' => 'eb997ddd', 'path-typeahead' => 'f7fc67ec', 'people-profile-css' => '25970776', - 'phabricator-action-list-view-css' => 'c5f7a8c5', + 'phabricator-action-list-view-css' => '4d1fe90a', 'phabricator-application-launch-view-css' => '16ca323f', 'phabricator-busy' => '59a7976a', 'phabricator-chatlog-css' => '852140ff', @@ -781,7 +781,7 @@ return array( 'phui-calendar-list-css' => 'c1d0ca59', 'phui-calendar-month-css' => 'a92e47d2', 'phui-crumbs-view-css' => '594d719e', - 'phui-document-view-css' => 'aa714c6d', + 'phui-document-view-css' => 'ffaf9eb9', 'phui-feed-story-css' => 'c9f3a0b5', 'phui-font-icon-base-css' => '3dad2ae3', 'phui-fontkit-css' => '1fa79503', diff --git a/src/applications/phriction/controller/PhrictionDocumentController.php b/src/applications/phriction/controller/PhrictionDocumentController.php index a00f7816a5..e5c2970ed5 100644 --- a/src/applications/phriction/controller/PhrictionDocumentController.php +++ b/src/applications/phriction/controller/PhrictionDocumentController.php @@ -205,7 +205,6 @@ final class PhrictionDocumentController $actions->setID($action_id); $page_content = id(new PHUIDocumentView()) - ->setOffset(true) ->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS) ->setHeader($header) ->setActionListID($action_id) @@ -218,20 +217,11 @@ final class PhrictionDocumentController $core_content, )); - $core_page = phutil_tag( - 'div', - array( - 'class' => 'phriction-offset', - ), - array( - $page_content, - $children, - )); - return $this->buildApplicationPage( array( $crumbs->render(), - $core_page, + $page_content, + $children, ), array( 'pageObjects' => array($document->getPHID()), @@ -442,7 +432,6 @@ final class PhrictionDocumentController ); return id(new PHUIDocumentView()) - ->setOffset(true) ->appendChild($content); } diff --git a/webroot/rsrc/css/phui/phui-action-list.css b/webroot/rsrc/css/phui/phui-action-list.css index 60a5824cf9..05c106ef01 100644 --- a/webroot/rsrc/css/phui/phui-action-list.css +++ b/webroot/rsrc/css/phui/phui-action-list.css @@ -21,7 +21,9 @@ display: block; } -.device .phabricator-action-list-view.phabricator-action-list-toggle { +.device .phabricator-action-list-view.phabricator-action-list-toggle, +.device-desktop .phui-document-content + .phabricator-action-list-view.phabricator-action-list-toggle { display: block; width: 200px; border: 1px solid {$lightblueborder}; diff --git a/webroot/rsrc/css/phui/phui-document.css b/webroot/rsrc/css/phui/phui-document.css index 6727e639c9..018c5c60f3 100644 --- a/webroot/rsrc/css/phui/phui-document.css +++ b/webroot/rsrc/css/phui/phui-document.css @@ -115,19 +115,16 @@ padding: 16px; } +.phui-document-view .phui-header-action-links .phui-mobile-menu { + display: block; +} + .device-phone .phui-document-content .phabricator-remarkup { padding: 8px; } .device-desktop .phui-document-content .phabricator-action-list-view { - position: absolute; - top: 16px; - right: -160px; - float: none; - border-radius: 0; - box-shadow: none; - border: none; - width: 160px; + display: none; } .device-phone .phui-document-content .phabricator-remarkup-toc {