@recaptime-dev's working patches + fork for Phorge, a community fork of Phabricator. (Upstream dev and stable branches are at upstream/main and upstream/stable respectively.) hq.recaptime.dev/wiki/Phorge
phorge phabricator
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

Add fluid-view as an option for PHUIDocumentView

Summary: Fixes some UIExample UI issues, adds a new full-width setting for DocumentView

Test Plan:
Test UIExamples at desktop and mobile breakpoints

{F327446}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T7431

Differential Revision: https://secure.phabricator.com/D11933

+32 -63
+2 -4
resources/celerity/map.php
··· 41 41 'rsrc/css/application/chatlog/chatlog.css' => '852140ff', 42 42 'rsrc/css/application/config/config-options.css' => '7fedf08b', 43 43 'rsrc/css/application/config/config-template.css' => '8e6c6fcd', 44 - 'rsrc/css/application/config/config-welcome.css' => 'b0d16200', 45 44 'rsrc/css/application/config/setup-issue.css' => '22270af2', 46 45 'rsrc/css/application/config/unhandled-exception.css' => '37d4f9a2', 47 46 'rsrc/css/application/conpherence/durable-column.css' => '12846d25', ··· 126 125 'rsrc/css/phui/phui-box.css' => '7b3a2eed', 127 126 'rsrc/css/phui/phui-button.css' => '21cb97f9', 128 127 'rsrc/css/phui/phui-crumbs-view.css' => '594d719e', 129 - 'rsrc/css/phui/phui-document.css' => '620b1eec', 128 + 'rsrc/css/phui/phui-document.css' => '0f83a7df', 130 129 'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5', 131 130 'rsrc/css/phui/phui-fontkit.css' => '4394f216', 132 131 'rsrc/css/phui/phui-form-view.css' => '8b78a986', ··· 513 512 'auth-css' => '1e655982', 514 513 'changeset-view-manager' => '5eb5b98c', 515 514 'config-options-css' => '7fedf08b', 516 - 'config-welcome-css' => 'b0d16200', 517 515 'conpherence-durable-column-view' => '12846d25', 518 516 'conpherence-menu-css' => '73774137', 519 517 'conpherence-message-pane-css' => '17a9517f', ··· 779 777 'phui-calendar-list-css' => 'c1d0ca59', 780 778 'phui-calendar-month-css' => 'a92e47d2', 781 779 'phui-crumbs-view-css' => '594d719e', 782 - 'phui-document-view-css' => '620b1eec', 780 + 'phui-document-view-css' => '0f83a7df', 783 781 'phui-feed-story-css' => 'c9f3a0b5', 784 782 'phui-font-icon-base-css' => '3dad2ae3', 785 783 'phui-fontkit-css' => '4394f216',
+12 -31
src/applications/config/controller/PhabricatorConfigWelcomeController.php
··· 28 28 29 29 public function buildWelcomeScreen(AphrontRequest $request) { 30 30 $viewer = $request->getUser(); 31 - $this->requireResource('config-welcome-css'); 32 31 33 32 $content = pht( 34 - "**Welcome to Phabricator!**\n\n". 35 33 "You have successfully installed Phabricator. This screen will guide ". 36 34 "you through configuration and orientation.\n\n". 37 35 "These steps are optional, and you can go through them in any order.\n\n". ··· 344 342 } 345 343 346 344 private function newColumns($title, array $items) { 347 - $col1 = array(); 348 - $col2 = array(); 349 - for ($ii = 0; $ii < count($items); $ii += 2) { 350 - $col1[] = $items[$ii]; 351 - if (isset($items[$ii + 1])) { 352 - $col2[] = $items[$ii + 1]; 353 - } 354 - } 355 - 356 - $header = id(new PHUIHeaderView())->setHeader($title); 357 - 358 - $columns = id(new AphrontMultiColumnView()) 359 - ->addColumn($col1) 360 - ->addColumn($col2) 361 - ->setFluidLayout(true); 362 - 363 - return phutil_tag( 345 + $items = phutil_tag( 364 346 'div', 365 347 array( 366 348 'class' => 'config-welcome', 367 349 ), 368 - array( 369 - $header, 370 - $columns, 371 - )); 350 + $items); 351 + 352 + return id(new PHUIObjectBoxView()) 353 + ->setHeaderText($title) 354 + ->appendChild($items); 372 355 } 373 356 374 357 private function newItem(AphrontRequest $request, $title, $done, $content) { 375 358 $viewer = $request->getUser(); 376 359 377 - $box = new PHUIObjectBoxView(); 378 - $header = new PHUIActionHeaderView(); 379 - $header->setHeaderTitle($title); 360 + $box = new PHUIInfoView(); 361 + $box->setTitle($title); 380 362 if ($done === true) { 381 - $box->setHeaderColor(PHUIActionHeaderView::HEADER_LIGHTGREEN); 382 - $header->addAction(id(new PHUIIconView())->setIconFont('fa-check')); 363 + $box->setSeverity(PHUIInfoView::SEVERITY_SUCCESS); 383 364 } else if ($done === false) { 384 - $box->setHeaderColor(PHUIActionHeaderView::HEADER_LIGHTVIOLET); 385 - $header->addAction(id(new PHUIIconView())->setIconFont('fa-exclamation')); 365 + $box->setSeverity(PHUIInfoView::SEVERITY_WARNING); 366 + } else { 367 + $box->setSeverity(PHUIInfoView::SEVERITY_NODATA); 386 368 } 387 369 388 370 $content = PhabricatorMarkupEngine::renderOneObject( ··· 397 379 ), 398 380 $content); 399 381 400 - $box->setHeader($header); 401 382 $box->appendChild($content); 402 383 403 384 return $box;
+3 -1
src/applications/uiexample/examples/PHUIDocumentExample.php
··· 103 103 ->addMenuItem($item1); 104 104 105 105 $home = id(new PHUIListItemView()) 106 - ->setIcon('home') 106 + ->setIcon('fa-home') 107 107 ->setHref('#') 108 108 ->setType(PHUIListItemView::TYPE_ICON); 109 109 ··· 189 189 $content = new PHUIDocumentView(); 190 190 $content->setBook('Book or Project Name', 'Article'); 191 191 $content->setHeader($header); 192 + $content->setFluid(true); 192 193 $content->setTopNav($topnav); 193 194 $content->setSidenav($sidenav); 194 195 $content->appendChild($document); 196 + $content->setFontKit(PHUIDocumentView::FONT_SOURCE_SANS); 195 197 196 198 return $content; 197 199 }
+10
src/view/phui/PHUIDocumentView.php
··· 17 17 private $mobileview; 18 18 private $fontKit; 19 19 private $actionListID; 20 + private $fluid; 20 21 21 22 public function setOffset($offset) { 22 23 $this->offset = $offset; ··· 63 64 return $this; 64 65 } 65 66 67 + public function setFluid($fluid) { 68 + $this->fluid = $fluid; 69 + return $this; 70 + } 71 + 66 72 protected function getTagAttributes() { 67 73 $classes = array(); 68 74 69 75 if ($this->offset) { 70 76 $classes[] = 'phui-document-offset'; 71 77 }; 78 + 79 + if ($this->fluid) { 80 + $classes[] = 'phui-document-fluid'; 81 + } 72 82 73 83 return array( 74 84 'class' => $classes,
-27
webroot/rsrc/css/application/config/config-welcome.css
··· 1 - /** 2 - * @provides config-welcome-css 3 - */ 4 - 5 - .config-welcome { 6 - margin-top: -1px; 7 - } 8 - 9 - .config-welcome .phui-object-box { 10 - margin: 12px; 11 - } 12 - 13 - .config-welcome .aphront-multi-column-column-last .phui-object-box { 14 - margin-left: 0; 15 - } 16 - 17 - .config-welcome-box .phui-action-header-title { 18 - padding: 10px 4px; 19 - } 20 - 21 - .config-welcome-box-content { 22 - padding: 12px; 23 - } 24 - 25 - .config-welcome .phui-object-box .phui-action-header { 26 - padding: 2px 8px 2px 12px; 27 - }
+5
webroot/rsrc/css/phui/phui-document.css
··· 14 14 margin: 16px auto; 15 15 } 16 16 17 + .device-desktop .phui-document-fluid .phui-document-view { 18 + max-width: none; 19 + margin: 16px; 20 + } 21 + 17 22 .device-desktop .phui-document-view.phui-offset-view { 18 23 max-width: 800px; 19 24 }