diff --git a/resources/celerity/map.php b/resources/celerity/map.php index 92360d0793..90914e5cff 100644 --- a/resources/celerity/map.php +++ b/resources/celerity/map.php @@ -41,7 +41,7 @@ return array( 'rsrc/css/application/conduit/conduit-api.css' => '7bc725c4', 'rsrc/css/application/config/config-options.css' => '0ede4c9b', 'rsrc/css/application/config/config-template.css' => '8e6c6fcd', - 'rsrc/css/application/config/config-welcome.css' => '6abd79be', + 'rsrc/css/application/config/config-welcome.css' => '035aa483', 'rsrc/css/application/config/setup-issue.css' => 'db7e9c40', 'rsrc/css/application/config/unhandled-exception.css' => '4c96257a', 'rsrc/css/application/conpherence/durable-column.css' => '86396117', @@ -131,7 +131,7 @@ return array( 'rsrc/css/phui/phui-curtain-view.css' => '7148ae25', 'rsrc/css/phui/phui-document-pro.css' => 'dc3d46ed', 'rsrc/css/phui/phui-document-summary.css' => '9ca48bdf', - 'rsrc/css/phui/phui-document.css' => '715aedfb', + 'rsrc/css/phui/phui-document.css' => 'c32e8dec', 'rsrc/css/phui/phui-feed-story.css' => 'aa49845d', 'rsrc/css/phui/phui-fontkit.css' => '9cda225e', 'rsrc/css/phui/phui-form-view.css' => 'fab0a10f', @@ -546,7 +546,7 @@ return array( 'changeset-view-manager' => 'a2828756', 'conduit-api-css' => '7bc725c4', 'config-options-css' => '0ede4c9b', - 'config-welcome-css' => '6abd79be', + 'config-welcome-css' => '035aa483', 'conpherence-durable-column-view' => '86396117', 'conpherence-menu-css' => 'f99fee4c', 'conpherence-message-pane-css' => '5897d3ac', @@ -835,7 +835,7 @@ return array( 'phui-crumbs-view-css' => '9dac418c', 'phui-curtain-view-css' => '7148ae25', 'phui-document-summary-view-css' => '9ca48bdf', - 'phui-document-view-css' => '715aedfb', + 'phui-document-view-css' => 'c32e8dec', 'phui-document-view-pro-css' => 'dc3d46ed', 'phui-feed-story-css' => 'aa49845d', 'phui-font-icon-base-css' => '6449bce8', diff --git a/src/__phutil_library_map__.php b/src/__phutil_library_map__.php index 04c4198008..46990ca97f 100644 --- a/src/__phutil_library_map__.php +++ b/src/__phutil_library_map__.php @@ -1622,9 +1622,7 @@ phutil_register_library_map(array( 'PHUIDiffTableOfContentsItemView' => 'infrastructure/diff/view/PHUIDiffTableOfContentsItemView.php', 'PHUIDiffTableOfContentsListView' => 'infrastructure/diff/view/PHUIDiffTableOfContentsListView.php', 'PHUIDiffTwoUpInlineCommentRowScaffold' => 'infrastructure/diff/view/PHUIDiffTwoUpInlineCommentRowScaffold.php', - 'PHUIDocumentExample' => 'applications/uiexample/examples/PHUIDocumentExample.php', 'PHUIDocumentSummaryView' => 'view/phui/PHUIDocumentSummaryView.php', - 'PHUIDocumentView' => 'view/phui/PHUIDocumentView.php', 'PHUIDocumentViewPro' => 'view/phui/PHUIDocumentViewPro.php', 'PHUIFeedStoryExample' => 'applications/uiexample/examples/PHUIFeedStoryExample.php', 'PHUIFeedStoryView' => 'view/phui/PHUIFeedStoryView.php', @@ -6270,9 +6268,7 @@ phutil_register_library_map(array( 'PHUIDiffTableOfContentsItemView' => 'AphrontView', 'PHUIDiffTableOfContentsListView' => 'AphrontView', 'PHUIDiffTwoUpInlineCommentRowScaffold' => 'PHUIDiffInlineCommentRowScaffold', - 'PHUIDocumentExample' => 'PhabricatorUIExample', 'PHUIDocumentSummaryView' => 'AphrontTagView', - 'PHUIDocumentView' => 'AphrontTagView', 'PHUIDocumentViewPro' => 'AphrontTagView', 'PHUIFeedStoryExample' => 'PhabricatorUIExample', 'PHUIFeedStoryView' => 'AphrontView', diff --git a/src/applications/config/controller/PhabricatorConfigWelcomeController.php b/src/applications/config/controller/PhabricatorConfigWelcomeController.php index a7d29b913b..6825abba8c 100644 --- a/src/applications/config/controller/PhabricatorConfigWelcomeController.php +++ b/src/applications/config/controller/PhabricatorConfigWelcomeController.php @@ -358,7 +358,7 @@ final class PhabricatorConfigWelcomeController $quick_header = new PHUIRemarkupView( $viewer, pht('=Quick Start Guide')); - return id(new PHUIDocumentView()) + $document = id(new PHUIDocumentViewPro()) ->setHeader($header) ->setFluid(true) ->appendChild($setup_header) @@ -367,6 +367,11 @@ final class PhabricatorConfigWelcomeController ->appendChild($explore) ->appendChild($quick_header) ->appendChild($quick); + + return id(new PHUIBoxView()) + ->setBorder(true) + ->appendChild($document) + ->addClass('mlb'); } private function newItem(AphrontRequest $request, $icon, $content) { diff --git a/src/applications/uiexample/examples/PHUIDocumentExample.php b/src/applications/uiexample/examples/PHUIDocumentExample.php deleted file mode 100644 index 155489b80b..0000000000 --- a/src/applications/uiexample/examples/PHUIDocumentExample.php +++ /dev/null @@ -1,199 +0,0 @@ -getRequest(); - $user = $request->getUser(); - - $action = id(new PHUIListItemView()) - ->setName(pht('Actions')) - ->setType(PHUIListItemView::TYPE_LABEL); - - $action1 = id(new PHUIListItemView()) - ->setName(pht('Edit Document')) - ->setHref('#') - ->setIcon('fa-edit') - ->setType(PHUIListItemView::TYPE_LINK); - - $action2 = id(new PHUIListItemView()) - ->setName(pht('Move Document')) - ->setHref('#') - ->setIcon('fa-arrows') - ->setType(PHUIListItemView::TYPE_LINK); - - $action3 = id(new PHUIListItemView()) - ->setName(pht('Delete Document')) - ->setHref('#') - ->setIcon('fa-times') - ->setType(PHUIListItemView::TYPE_LINK); - - $action4 = id(new PHUIListItemView()) - ->setName(pht('View History')) - ->setHref('#') - ->setIcon('fa-list') - ->setType(PHUIListItemView::TYPE_LINK); - - $action5 = id(new PHUIListItemView()) - ->setName(pht('Subscribe')) - ->setHref('#') - ->setIcon('fa-plus-circle') - ->setType(PHUIListItemView::TYPE_LINK); - - $divider = id(new PHUIListItemView()) - ->setType(PHUIListItemView::TYPE_DIVIDER); - - $header = id(new PHUIHeaderView()) - ->setHeader(pht('Installation')); - - $label1 = id(new PHUIListItemView()) - ->setName(pht('Getting Started')) - ->setType(PHUIListItemView::TYPE_LABEL); - - $label2 = id(new PHUIListItemView()) - ->setName(pht('Documentation')) - ->setType(PHUIListItemView::TYPE_LABEL); - - $item1 = id(new PHUIListItemView()) - ->setName(pht('Installation')) - ->setHref('#') - ->setType(PHUIListItemView::TYPE_LINK); - - $item2 = id(new PHUIListItemView()) - ->setName(pht('Webserver Config')) - ->setHref('#') - ->setType(PHUIListItemView::TYPE_LINK); - - $item3 = id(new PHUIListItemView()) - ->setName(pht('Adding Users')) - ->setHref('#') - ->setType(PHUIListItemView::TYPE_LINK); - - $item4 = id(new PHUIListItemView()) - ->setName(pht('Debugging')) - ->setHref('#') - ->setType(PHUIListItemView::TYPE_LINK); - - $sidenav = id(new PHUIListView()) - ->setType(PHUIListView::SIDENAV_LIST) - ->addMenuItem($action) - ->addMenuItem($action1) - ->addMenuItem($action2) - ->addMenuItem($action3) - ->addMenuItem($action4) - ->addMenuItem($action5) - ->addMenuItem($divider) - ->addMenuItem($label1) - ->addMenuItem($item1) - ->addMenuItem($item2) - ->addMenuItem($item3) - ->addMenuItem($item4) - ->addMenuItem($label2) - ->addMenuItem($item2) - ->addMenuItem($item3) - ->addMenuItem($item4) - ->addMenuItem($item1); - - $home = id(new PHUIListItemView()) - ->setIcon('fa-home') - ->setHref('#') - ->setType(PHUIListItemView::TYPE_ICON); - - $item1 = id(new PHUIListItemView()) - ->setName(pht('Installation')) - ->setHref('#') - ->setSelected(true) - ->setType(PHUIListItemView::TYPE_LINK); - - $item2 = id(new PHUIListItemView()) - ->setName(pht('Webserver Config')) - ->setHref('#') - ->setType(PHUIListItemView::TYPE_LINK); - - $item3 = id(new PHUIListItemView()) - ->setName(pht('Adding Users')) - ->setHref('#') - ->setType(PHUIListItemView::TYPE_LINK); - - $item4 = id(new PHUIListItemView()) - ->setName(pht('Debugging')) - ->setHref('#') - ->setType(PHUIListItemView::TYPE_LINK); - - $topnav = id(new PHUIListView()) - ->setType(PHUIListView::NAVBAR_LIST) - ->addMenuItem($home) - ->addMenuItem($item1) - ->addMenuItem($item2) - ->addMenuItem($item3) - ->addMenuItem($item4); - - $document = hsprintf( - '
Lorem ipsum dolor sit amet, consectetur adipisicing, '. - 'sed do eiusmod tempor incididunt ut labore et dolore magna '. - 'aliqua. Ut enim ad minim veniam, quis nostrud exercitation '. - 'ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis '. - 'aute irure dolor in reprehenderit in voluptate velit esse cillum '. - 'dolore eu fugiat nulla pariatur. Excepteur sint occaecat '. - 'cupidatat non proident, sunt in culpa qui officia deserunt '. - 'mollit anim id est laborum.
'. - 'Lorem ipsum dolor sit amet, consectetur, '. - 'sed do eiusmod tempor incididunt ut labore et dolore magna '. - 'aliqua. Ut enim ad minim veniam, quis nostrud exercitation '. - 'ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis '. - 'aute irure dolor in reprehenderit in voluptate velit esse cillum '. - 'dolore eu fugiat nulla pariatur. Excepteur sint occaecat '. - 'cupidatat non proident, sunt in culpa qui officia deserunt '. - 'mollit anim id est laborum.
'. - 'Lorem ipsum dolor sit amet, consectetur, '. - 'sed do eiusmod tempor incididunt ut labore et dolore magna '. - 'aliqua. Ut enim ad minim veniam, quis nostrud exercitation '. - 'ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis '. - 'aute irure dolor in reprehenderit in voluptate velit esse cillum '. - 'dolore eu fugiat nulla pariatur. Excepteur sint occaecat '. - 'cupidatat non proident, sunt in culpa qui officia deserunt '. - 'mollit anim id est laborum.
'. - 'Lorem ipsum dolor sit amet, consectetur, '. - 'sed do eiusmod tempor incididunt ut labore et dolore magna '. - 'aliqua. Ut enim ad minim veniam, quis nostrud exercitation '. - 'ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis '. - 'aute irure dolor in reprehenderit in voluptate velit esse cillum '. - 'dolore eu fugiat nulla pariatur. Excepteur sint occaecat '. - 'cupidatat non proident, sunt in culpa qui officia deserunt '. - 'mollit anim id est laborum.
'. - 'Lorem ipsum dolor sit amet, consectetur, '. - 'sed do eiusmod tempor incididunt ut labore et dolore magna '. - 'aliqua. Ut enim ad minim veniam, quis nostrud exercitation '. - 'ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis '. - 'aute irure dolor in reprehenderit in voluptate velit esse cillum '. - 'dolore eu fugiat nulla pariatur. Excepteur sint occaecat '. - 'cupidatat non proident, sunt in culpa qui officia deserunt '. - 'mollit anim id est laborum.
'. - 'Lorem ipsum dolor sit amet, consectetur, '. - 'sed do eiusmod tempor incididunt ut labore et dolore magna '. - 'aliqua. Ut enim ad minim veniam, quis nostrud exercitation '. - 'ullamco laboris nisi ut aliquip ex ea commodo consequat. Duis '. - 'aute irure dolor in reprehenderit in voluptate velit esse cillum '. - 'dolore eu fugiat nulla pariatur. Excepteur sint occaecat '. - 'cupidatat non proident, sunt in culpa qui officia deserunt '. - 'mollit anim id est laborum.
'); - - $content = new PHUIDocumentView(); - $content->setBook(pht('Book or Project Name'), pht('Article')); - $content->setHeader($header); - $content->setFluid(true); - $content->setTopNav($topnav); - $content->setSidenav($sidenav); - $content->appendChild($document); - - return $content; - } -} diff --git a/src/view/phui/PHUIDocumentView.php b/src/view/phui/PHUIDocumentView.php deleted file mode 100644 index 9a076b4b74..0000000000 --- a/src/view/phui/PHUIDocumentView.php +++ /dev/null @@ -1,162 +0,0 @@ -offset = $offset; - return $this; - } - - public function setHeader(PHUIHeaderView $header) { - $header->setTall(true); - $this->header = $header; - return $this; - } - - public function setSideNav(PHUIListView $list, $display = self::NAV_BOTTOM) { - $list->setType(PHUIListView::SIDENAV_LIST); - $this->sidenav = $list; - $this->mobileview = $display; - return $this; - } - - public function setTopNav(PHUIListView $list) { - $list->setType(PHUIListView::NAVBAR_LIST); - $this->topnav = $list; - return $this; - } - - public function setCrumbs(PHUIListView $list) { - $this->crumbs = $list; - return $this; - } - - public function setBook($name, $description) { - $this->bookname = $name; - $this->bookdescription = $description; - return $this; - } - - public function setFluid($fluid) { - $this->fluid = $fluid; - return $this; - } - - protected function getTagAttributes() { - $classes = array(); - - if ($this->offset) { - $classes[] = 'phui-document-offset'; - } - - if ($this->fluid) { - $classes[] = 'phui-document-fluid'; - } - - return array( - 'class' => $classes, - ); - } - - protected function getTagContent() { - require_celerity_resource('phui-document-view-css'); - - $classes = array(); - $classes[] = 'phui-document-view'; - if ($this->offset) { - $classes[] = 'phui-offset-view'; - } - if ($this->sidenav) { - $classes[] = 'phui-sidenav-view'; - } - - $sidenav = null; - if ($this->sidenav) { - $sidenav = phutil_tag( - 'div', - array( - 'class' => 'phui-document-sidenav', - ), - $this->sidenav); - } - - $book = null; - if ($this->bookname) { - $book = pht('%s (%s)', $this->bookname, $this->bookdescription); - } - - $topnav = null; - if ($this->topnav) { - $topnav = phutil_tag( - 'div', - array( - 'class' => 'phui-document-topnav', - ), - $this->topnav); - } - - $crumbs = null; - if ($this->crumbs) { - $crumbs = phutil_tag( - 'div', - array( - 'class' => 'phui-document-crumbs', - ), - $this->bookName); - } - - $main_content = $this->renderChildren(); - - if ($book) { - $this->header->setSubheader($book); - } - $content_inner = phutil_tag( - 'div', - array( - 'class' => 'phui-document-inner', - ), - array( - $this->header, - $topnav, - $main_content, - $crumbs, - )); - - if ($this->mobileview == self::NAV_BOTTOM) { - $order = array($content_inner, $sidenav); - } else { - $order = array($sidenav, $content_inner); - } - - $content = phutil_tag( - 'div', - array( - 'class' => 'phui-document-content', - ), - $order); - - $view = phutil_tag( - 'div', - array( - 'class' => implode(' ', $classes), - ), - $content); - - return $view; - } - -} diff --git a/webroot/rsrc/css/application/config/config-welcome.css b/webroot/rsrc/css/application/config/config-welcome.css index 8410d00500..748726476e 100644 --- a/webroot/rsrc/css/application/config/config-welcome.css +++ b/webroot/rsrc/css/application/config/config-welcome.css @@ -19,5 +19,10 @@ width: 32px; float: left; text-align: center; - margin-left: 16px; } + +.phui-document-view-pro .phui-document-content .config-welcome-box + .phabricator-remarkup { + margin: 0; + padding: 0; + } diff --git a/webroot/rsrc/css/phui/phui-document.css b/webroot/rsrc/css/phui/phui-document.css index 2b75227c42..87cdc60ddd 100644 --- a/webroot/rsrc/css/phui/phui-document.css +++ b/webroot/rsrc/css/phui/phui-document.css @@ -8,15 +8,6 @@ position: relative; } -.phui-document-view .phui-header-shell { - padding: 16px; - background-color: {$bluebackground}; -} - -.phui-document-content { - border-radius: 3px; -} - .device-desktop .phui-document-view { border: 1px solid {$lightblueborder}; max-width: 960px; @@ -33,44 +24,11 @@ margin: 16px; } -.phui-crumbs-view + .phui-document-fluid .phui-document-view { - margin-top: 0; -} - -.device-desktop .phui-document-view.phui-offset-view { - max-width: 800px; -} - /* Fix so that Phriction Document preview is the same width as the document */ .device-desktop .phui-remarkup-preview .phui-document-view { width: 800px; } -.phui-document-sidenav { - position:absolute; - width: 200px; - text-overflow: ellipsis; - top: 0; - right: 0; -} - -.device-phone .phui-document-sidenav { - position: static; - width: auto; - border-top: 1px solid {$thinblueborder}; - border-bottom: 1px solid {$thinblueborder}; -} - -.device-phone .phui-sidenav-view .phui-document-inner { - margin: 0; -} - -.phui-sidenav-view .phui-document-inner { - margin-right: 200px; - border-right: 1px solid {$thinblueborder}; - background: #fff; -} - .phui-document-content .phui-header-shell { border-top: none; border-bottom: 1px solid {$lightblueborder}; @@ -88,11 +46,6 @@ padding: 8px 0 4px; } -.phui-document-content .phui-property-list-container { - border-bottom: 1px solid {$thinblueborder}; - background-color: {$lightgreybackground}; -} - .legalpad .phui-document-content .phui-property-list-view { border: none; box-shadow: none; @@ -127,18 +80,10 @@ margin: 16px 0; } -.device-desktop .phui-document-offset { - padding-right: 120px; -} - .phui-document-view .phui-info-severity-nodata { background-color: {$lightgreybackground}; } -body .phui-document-view .phui-header-shell.phui-bleed-header { - padding: 0; -} - .phui-document-view .phui-property-list-section-header { padding: 20px 24px 0px; border-top: none;