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

Expand scope of addActionItem in PHUIHeaderView

Summary: Gives a bit more flexibility to add anything to the right side of PHUIHeaderView.

Test Plan: Test Maniphest, Workboards, Project Home, Differential. Grep for `addActionIcon` use. Fixes T10518

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Maniphest Tasks: T10518

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

+29 -29
+5 -5
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => 'db1cd0bd', 10 + 'core.pkg.css' => 'c0f196d2', 11 11 'core.pkg.js' => '7d8faf57', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => '2de124c9', ··· 135 135 'rsrc/css/phui/phui-form-view.css' => '4a1a0f5e', 136 136 'rsrc/css/phui/phui-form.css' => 'aac1d51d', 137 137 'rsrc/css/phui/phui-head-thing.css' => '11731da0', 138 - 'rsrc/css/phui/phui-header-view.css' => 'bfb9fed3', 138 + 'rsrc/css/phui/phui-header-view.css' => '32e71367', 139 139 'rsrc/css/phui/phui-hovercard.css' => 'de1a2119', 140 140 'rsrc/css/phui/phui-icon-set-selector.css' => '1ab67aad', 141 141 'rsrc/css/phui/phui-icon.css' => '3f33ab57', ··· 155 155 'rsrc/css/phui/phui-status.css' => '37309046', 156 156 'rsrc/css/phui/phui-tag-view.css' => '6bbd83e2', 157 157 'rsrc/css/phui/phui-timeline-view.css' => '2efceff8', 158 - 'rsrc/css/phui/phui-two-column-view.css' => '097630a3', 158 + 'rsrc/css/phui/phui-two-column-view.css' => 'ecd7ec62', 159 159 'rsrc/css/phui/workboards/phui-workboard-color.css' => 'ac6fe6a7', 160 160 'rsrc/css/phui/workboards/phui-workboard.css' => 'e6d89647', 161 161 'rsrc/css/phui/workboards/phui-workcard.css' => '3646fb96', ··· 820 820 'phui-form-css' => 'aac1d51d', 821 821 'phui-form-view-css' => '4a1a0f5e', 822 822 'phui-head-thing-view-css' => '11731da0', 823 - 'phui-header-view-css' => 'bfb9fed3', 823 + 'phui-header-view-css' => '32e71367', 824 824 'phui-hovercard' => '1bd28176', 825 825 'phui-hovercard-view-css' => 'de1a2119', 826 826 'phui-icon-set-selector-css' => '1ab67aad', ··· 843 843 'phui-tag-view-css' => '6bbd83e2', 844 844 'phui-theme-css' => '027ba77e', 845 845 'phui-timeline-view-css' => '2efceff8', 846 - 'phui-two-column-view-css' => '097630a3', 846 + 'phui-two-column-view-css' => 'ecd7ec62', 847 847 'phui-workboard-color-css' => 'ac6fe6a7', 848 848 'phui-workboard-view-css' => 'e6d89647', 849 849 'phui-workcard-view-css' => '3646fb96',
+1 -1
src/applications/conpherence/controller/ConpherenceWidgetController.php
··· 76 76 ), 77 77 id(new PHUIHeaderView()) 78 78 ->setHeader($header) 79 - ->addActionIcon($new_icon)); 79 + ->addActionItem($new_icon)); 80 80 $user = $this->getRequest()->getUser(); 81 81 // now the widget bodies 82 82 $widgets[] = javelin_tag(
+2 -2
src/applications/dashboard/engine/PhabricatorDashboardPanelRenderingEngine.php
··· 253 253 ->setIcon('fa-pencil') 254 254 ->setWorkflow(true) 255 255 ->setHref((string)$edit_uri); 256 - $header->addActionIcon($action_edit); 256 + $header->addActionItem($action_edit); 257 257 258 258 if ($dashboard_id) { 259 259 $uri = id(new PhutilURI( ··· 263 263 ->setIcon('fa-trash-o') 264 264 ->setHref((string)$uri) 265 265 ->setWorkflow(true); 266 - $header->addActionIcon($action_remove); 266 + $header->addActionItem($action_remove); 267 267 } 268 268 return $header; 269 269 }
+1 -1
src/applications/dashboard/paneltype/PhabricatorDashboardQueryPanelType.php
··· 119 119 $icon = id(new PHUIIconView()) 120 120 ->setIcon('fa-search') 121 121 ->setHref($href); 122 - $header->addActionIcon($icon); 122 + $header->addActionItem($icon); 123 123 124 124 return $header; 125 125 }
+1 -1
src/applications/home/controller/PhabricatorHomeMainController.php
··· 322 322 ->setHref($href); 323 323 $header = id(new PHUIHeaderView()) 324 324 ->setHeader($title) 325 - ->addActionIcon($icon); 325 + ->addActionItem($icon); 326 326 return $header; 327 327 } 328 328
+9 -9
src/view/phui/PHUIHeaderView.php
··· 20 20 private $buttonBar = null; 21 21 private $policyObject; 22 22 private $epoch; 23 - private $actionIcons = array(); 23 + private $actionItems = array(); 24 24 private $badges = array(); 25 25 private $href; 26 26 private $actionList; ··· 105 105 return $this; 106 106 } 107 107 108 - public function addActionIcon(PHUIIconView $action) { 109 - $this->actionIcons[] = $action; 108 + public function addActionItem($action) { 109 + $this->actionItems[] = $action; 110 110 return $this; 111 111 } 112 112 ··· 277 277 $this->buttonBar); 278 278 } 279 279 280 - if ($this->actionIcons) { 280 + if ($this->actionItems) { 281 281 $action_list = array(); 282 - if ($this->actionIcons) { 283 - foreach ($this->actionIcons as $icon) { 282 + if ($this->actionItems) { 283 + foreach ($this->actionItems as $item) { 284 284 $action_list[] = phutil_tag( 285 285 'li', 286 286 array( 287 - 'class' => 'phui-header-action-icon', 287 + 'class' => 'phui-header-action-item', 288 288 ), 289 - $icon); 289 + $item); 290 290 } 291 291 } 292 292 $right[] = phutil_tag( ··· 346 346 )); 347 347 } 348 348 349 - if ($this->properties || $this->policyObject) { 349 + if ($this->properties || $this->policyObject || $this->tags) { 350 350 $property_list = array(); 351 351 foreach ($this->properties as $type => $property) { 352 352 switch ($type) {
+5 -5
src/view/phui/PHUIWorkpanelView.php
··· 83 83 ->setHeader($this->header) 84 84 ->setSubheader($this->subheader); 85 85 86 - if ($this->headerIcon) { 87 - $header->setHeaderIcon($this->headerIcon); 86 + foreach ($this->headerActions as $action) { 87 + $header->addActionItem($action); 88 88 } 89 89 90 90 if ($this->headerTag) { 91 - $header->addTag($this->headerTag); 91 + $header->addActionItem($this->headerTag); 92 92 } 93 93 94 - foreach ($this->headerActions as $action) { 95 - $header->addActionIcon($action); 94 + if ($this->headerIcon) { 95 + $header->setHeaderIcon($this->headerIcon); 96 96 } 97 97 98 98 $href = $this->getHref();
+4 -4
webroot/rsrc/css/phui/phui-header-view.css
··· 197 197 border-color: transparent; 198 198 } 199 199 200 + 201 + .phui-header-subheader .phui-tag-view, 200 202 .phui-header-subheader .phui-tag-type-shade .phui-tag-core { 201 203 border: none; 204 + font-weight: normal; 202 205 -webkit-font-smoothing: auto; 203 206 } 204 207 ··· 246 249 float: right; 247 250 } 248 251 249 - .phui-header-action-list li.phui-header-action-icon { 252 + .phui-header-action-list .phui-header-action-item .phui-icon-view { 250 253 height: 18px; 251 254 width: 16px; 252 - } 253 - 254 - .phui-header-action-list .phui-header-action-icon .phui-icon-view { 255 255 font-size: 16px; 256 256 line-height: 20px; 257 257 display: block;
+1 -1
webroot/rsrc/css/phui/phui-two-column-view.css
··· 103 103 margin: 0; 104 104 } 105 105 106 - .phui-main-column > .phui-timeline-view { 106 + .phui-main-column > .phui-timeline-view:first-child { 107 107 border-top: 1px solid {$thinblueborder}; 108 108 } 109 109