@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.

Have DifferentialRevisionListView return ObjectBoxView

Summary: Uses PHUIObjectBoxView to display lists of diffs in Differential and Diffusion, unless embedded on a dashboard.

Test Plan:
Test Dashboard panel, Differential home, Commit, and Diff

{F282173}

{F282174}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

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

+35 -13
+5 -5
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => 'a3a54ca1', 10 + 'core.pkg.css' => '8edbf4c0', 11 11 'core.pkg.js' => '23d653bb', 12 12 'darkconsole.pkg.js' => '8ab24e01', 13 13 'differential.pkg.css' => '380f07e5', ··· 52 52 'rsrc/css/application/conpherence/widget-pane.css' => '3d575438', 53 53 'rsrc/css/application/contentsource/content-source-view.css' => '4b8b05d4', 54 54 'rsrc/css/application/countdown/timer.css' => '86b7b0a0', 55 - 'rsrc/css/application/dashboard/dashboard.css' => 'ec324e2a', 55 + 'rsrc/css/application/dashboard/dashboard.css' => 'c0062064', 56 56 'rsrc/css/application/diff/inline-comment-summary.css' => 'eb5f8e8c', 57 57 'rsrc/css/application/differential/add-comment.css' => 'c478bcaa', 58 58 'rsrc/css/application/differential/changeset-view.css' => 'b2b71e76', ··· 138 138 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', 139 139 'rsrc/css/phui/phui-list.css' => '53deb25c', 140 140 'rsrc/css/phui/phui-object-box.css' => 'b8b7fd78', 141 - 'rsrc/css/phui/phui-object-item-list-view.css' => 'da095b41', 141 + 'rsrc/css/phui/phui-object-item-list-view.css' => '86e05b7c', 142 142 'rsrc/css/phui/phui-pinboard-view.css' => '3dd4a269', 143 143 'rsrc/css/phui/phui-property-list-view.css' => '51480060', 144 144 'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b', ··· 717 717 'phabricator-content-source-view-css' => '4b8b05d4', 718 718 'phabricator-core-css' => 'd7f6ec35', 719 719 'phabricator-countdown-css' => '86b7b0a0', 720 - 'phabricator-dashboard-css' => 'ec324e2a', 720 + 'phabricator-dashboard-css' => 'c0062064', 721 721 'phabricator-drag-and-drop-file-upload' => '8c49f386', 722 722 'phabricator-draggable-list' => 'a16ec1c6', 723 723 'phabricator-fatal-config-template-css' => '25d446d6', ··· 792 792 'phui-info-panel-css' => '27ea50a1', 793 793 'phui-list-view-css' => '53deb25c', 794 794 'phui-object-box-css' => 'b8b7fd78', 795 - 'phui-object-item-list-view-css' => 'da095b41', 795 + 'phui-object-item-list-view-css' => '86e05b7c', 796 796 'phui-pinboard-view-css' => '3dd4a269', 797 797 'phui-property-list-view-css' => '51480060', 798 798 'phui-remarkup-preview-css' => '19ad512b',
+2 -3
src/applications/differential/controller/DifferentialRevisionViewController.php
··· 778 778 $user = $this->getRequest()->getUser(); 779 779 780 780 $view = id(new DifferentialRevisionListView()) 781 + ->setHeader(pht('Open Revisions Affecting These Files')) 781 782 ->setRevisions($revisions) 782 783 ->setUser($user); 783 784 ··· 785 786 $handles = $this->loadViewerHandles($phids); 786 787 $view->setHandles($handles); 787 788 788 - return id(new PHUIObjectBoxView()) 789 - ->setHeaderText(pht('Open Revisions Affecting These Files')) 790 - ->appendChild($view); 789 + return $view; 791 790 } 792 791 793 792
+2 -1
src/applications/differential/query/DifferentialRevisionSearchEngine.php
··· 261 261 262 262 $viewer = $this->requireViewer(); 263 263 $template = id(new DifferentialRevisionListView()) 264 - ->setUser($viewer); 264 + ->setUser($viewer) 265 + ->setNoBox($this->isPanelContext()); 265 266 266 267 $views = array(); 267 268 if ($query->getQueryKey() == 'active') {
+16 -1
src/applications/differential/view/DifferentialRevisionListView.php
··· 10 10 private $highlightAge; 11 11 private $header; 12 12 private $noDataString; 13 + private $noBox; 13 14 14 15 public function setNoDataString($no_data_string) { 15 16 $this->noDataString = $no_data_string; ··· 29 30 30 31 public function setHighlightAge($bool) { 31 32 $this->highlightAge = $bool; 33 + return $this; 34 + } 35 + 36 + public function setNoBox($box) { 37 + $this->noBox = $box; 32 38 return $this; 33 39 } 34 40 ··· 179 185 $list->addItem($item); 180 186 } 181 187 182 - $list->setHeader($this->header); 183 188 $list->setNoDataString($this->noDataString); 189 + 190 + 191 + if ($this->header && !$this->noBox) { 192 + $list->setFlush(true); 193 + $list = id(new PHUIObjectBoxView()) 194 + ->setHeaderText($this->header) 195 + ->appendChild($list); 196 + } else { 197 + $list->setHeader($this->header); 198 + } 184 199 185 200 return $list; 186 201 }
+2 -3
src/applications/diffusion/controller/DiffusionBrowseController.php
··· 208 208 } 209 209 210 210 $view = id(new DifferentialRevisionListView()) 211 + ->setHeader(pht('Pending Differential Revisions')) 211 212 ->setRevisions($revisions) 212 213 ->setUser($user); 213 214 ··· 215 216 $handles = $this->loadViewerHandles($phids); 216 217 $view->setHandles($handles); 217 218 218 - return id(new PHUIObjectBoxView()) 219 - ->setHeaderText(pht('Pending Differential Revisions')) 220 - ->appendChild($view); 219 + return $view; 221 220 } 222 221 223 222 }
+4
webroot/rsrc/css/application/dashboard/dashboard.css
··· 70 70 margin: 0; 71 71 } 72 72 73 + .dashboard-panel .phui-object-item-empty .phui-error-view { 74 + margin: 0; 75 + } 76 + 73 77 .dashboard-panel .dashboard-box { 74 78 padding: 12px; 75 79 background: #fff;
+4
webroot/rsrc/css/phui/phui-object-item-list-view.css
··· 69 69 margin: 0 0 4px 0; 70 70 } 71 71 72 + .phui-object-box .phui-object-list-flush .phui-object-item { 73 + margin: 0; 74 + } 75 + 72 76 .phui-object-item-name { 73 77 font-weight: bold; 74 78 padding: 8px 8px 0;