@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 setHeader to PHUITwoColumnView for consistent page layouts

Summary: Working towards making PHUITwoColumnView into a page layout engine. Adds header support.

Test Plan: Use new header on Profile and Profiles. No visual changes, less duplicated code.

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

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

+30 -33
+4 -4
resources/celerity/map.php
··· 94 94 'rsrc/css/application/policy/policy.css' => '957ea14c', 95 95 'rsrc/css/application/ponder/ponder-view.css' => '4486434b', 96 96 'rsrc/css/application/project/project-card-view.css' => '9418c97d', 97 - 'rsrc/css/application/project/project-view.css' => '4c832c27', 97 + 'rsrc/css/application/project/project-view.css' => '83bb6654', 98 98 'rsrc/css/application/releeph/releeph-core.css' => '9b3c5733', 99 99 'rsrc/css/application/releeph/releeph-preview-branch.css' => 'b7a6f4a5', 100 100 'rsrc/css/application/releeph/releeph-request-differential-create-dialog.css' => '8d8b92cd', ··· 154 154 'rsrc/css/phui/phui-status.css' => '888cedb8', 155 155 'rsrc/css/phui/phui-tag-view.css' => '9d5d4400', 156 156 'rsrc/css/phui/phui-timeline-view.css' => '2efceff8', 157 - 'rsrc/css/phui/phui-two-column-view.css' => 'c75bfc5b', 157 + 'rsrc/css/phui/phui-two-column-view.css' => '0763177e', 158 158 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7', 159 159 'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647', 160 160 'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96', ··· 841 841 'phui-tag-view-css' => '9d5d4400', 842 842 'phui-theme-css' => 'ab7b848c', 843 843 'phui-timeline-view-css' => '2efceff8', 844 - 'phui-two-column-view-css' => 'c75bfc5b', 844 + 'phui-two-column-view-css' => '0763177e', 845 845 'phui-workboard-color-css' => 'ac6fe6a7', 846 846 'phui-workboard-view-css' => 'e6d89647', 847 847 'phui-workcard-view-css' => '3646fb96', ··· 857 857 'policy-transaction-detail-css' => '82100a43', 858 858 'ponder-view-css' => '4486434b', 859 859 'project-card-view-css' => '9418c97d', 860 - 'project-view-css' => '4c832c27', 860 + 'project-view-css' => '83bb6654', 861 861 'releeph-core' => '9b3c5733', 862 862 'releeph-preview-branch' => 'b7a6f4a5', 863 863 'releeph-request-differential-create-dialog' => '8d8b92cd',
+5 -13
src/applications/people/controller/PhabricatorPeopleProfileViewController.php
··· 56 56 57 57 $projects = $this->buildProjectsView($user); 58 58 $badges = $this->buildBadgesView($user); 59 + require_celerity_resource('project-view-css'); 59 60 60 - $columns = id(new PHUITwoColumnView()) 61 - ->addClass('project-view-badges') 61 + $home = id(new PHUITwoColumnView()) 62 + ->setHeader($header) 63 + ->addClass('project-view-home') 62 64 ->setMainColumn( 63 65 array( 64 66 $properties, ··· 75 77 76 78 $crumbs = $this->buildApplicationCrumbs(); 77 79 $crumbs->setBorder(true); 78 - 79 - require_celerity_resource('project-view-css'); 80 - $home = phutil_tag( 81 - 'div', 82 - array( 83 - 'class' => 'project-view-home', 84 - ), 85 - array( 86 - $header, 87 - $columns, 88 - )); 89 80 90 81 return $this->newPage() 91 82 ->setTitle($user->getUsername()) ··· 217 208 218 209 $box = id(new PHUIObjectBoxView()) 219 210 ->setHeaderText(pht('Badges')) 211 + ->addClass('project-view-badges') 220 212 ->appendChild($flex) 221 213 ->setBackground(PHUIObjectBoxView::GREY); 222 214
+4 -12
src/applications/project/controller/PhabricatorProjectProfileController.php
··· 83 83 84 84 $feed = $this->renderStories($stories); 85 85 $feed = phutil_tag_div('project-view-feed', $feed); 86 + require_celerity_resource('project-view-css'); 86 87 87 - $columns = id(new PHUITwoColumnView()) 88 + $home = id(new PHUITwoColumnView()) 89 + ->setHeader($header) 90 + ->addClass('project-view-home') 88 91 ->setMainColumn( 89 92 array( 90 93 $properties, ··· 100 103 101 104 $crumbs = $this->buildApplicationCrumbs(); 102 105 $crumbs->setBorder(true); 103 - 104 - require_celerity_resource('project-view-css'); 105 - $home = phutil_tag( 106 - 'div', 107 - array( 108 - 'class' => 'project-view-home', 109 - ), 110 - array( 111 - $header, 112 - $columns, 113 - )); 114 106 115 107 return $this->newPage() 116 108 ->setNavigation($nav)
+15 -2
src/view/phui/PHUITwoColumnView.php
··· 5 5 private $mainColumn; 6 6 private $sideColumn; 7 7 private $display; 8 + private $header; 8 9 9 10 const DISPLAY_LEFT = 'phui-side-column-left'; 10 11 const DISPLAY_RIGHT = 'phui-side-column-right'; ··· 19 20 return $this; 20 21 } 21 22 23 + public function setHeader(PHUIHeaderView $header) { 24 + $this->header = $header; 25 + return $this; 26 + } 27 + 22 28 public function setDisplay($display) { 23 29 $this->display = $display; 24 30 return $this; ··· 35 41 protected function getTagAttributes() { 36 42 $classes = array(); 37 43 $classes[] = 'phui-two-column-view'; 38 - $classes[] = 'grouped'; 39 44 $classes[] = $this->getDisplay(); 40 45 41 46 return array( ··· 66 71 $order = array($main, $side); 67 72 } 68 73 69 - return phutil_tag_div('phui-two-column-row', $order); 74 + $inner = phutil_tag_div('phui-two-column-row', $order); 75 + $table = phutil_tag_div('phui-two-column-content', $inner); 76 + 77 + $header = null; 78 + if ($this->header) { 79 + $header = phutil_tag_div('phui-two-column-header', $this->header); 80 + } 81 + 82 + return array($header, $table); 70 83 } 71 84 }
+1 -1
webroot/rsrc/css/application/project/project-view.css
··· 51 51 } 52 52 53 53 .project-view-feed .phui-object-box.phui-box-border { 54 - padding: 0 16px 8px 16px; 54 + padding: 0 4px 8px 4px; 55 55 border: none; 56 56 } 57 57
+1 -1
webroot/rsrc/css/phui/phui-two-column-view.css
··· 2 2 * @provides phui-two-column-view-css 3 3 */ 4 4 5 - .phui-two-column-view { 5 + .phui-two-column-content { 6 6 display: table; 7 7 width: 100%; 8 8 }