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

[Redesign] ObjectBoxView colors

Summary: Removes setting colors on the headers and adds setting colors on an ObjectBoxView (which sets the headers). Ref T8099

Test Plan:
Tested each color, fixed workboard colors, added color to important setup issues.

{F410658}

{F410659}

Reviewers: btrahan, epriestley

Reviewed By: epriestley

Subscribers: Korvin, epriestley

Maniphest Tasks: T8099

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

+53 -82
+7 -7
resources/celerity/map.php
··· 7 7 */ 8 8 return array( 9 9 'names' => array( 10 - 'core.pkg.css' => '420ee9bd', 10 + 'core.pkg.css' => 'bd0be091', 11 11 'core.pkg.js' => 'f3e08b38', 12 12 'darkconsole.pkg.js' => 'e7393ebb', 13 13 'differential.pkg.css' => 'bb338e4b', ··· 128 128 'rsrc/css/phui/phui-box.css' => 'a5bb366d', 129 129 'rsrc/css/phui/phui-button.css' => 'b995182d', 130 130 'rsrc/css/phui/phui-crumbs-view.css' => 'aeff7a21', 131 - 'rsrc/css/phui/phui-document.css' => '08059961', 131 + 'rsrc/css/phui/phui-document.css' => '27a9bb7e', 132 132 'rsrc/css/phui/phui-feed-story.css' => 'c9f3a0b5', 133 133 'rsrc/css/phui/phui-fontkit.css' => '489a1341', 134 134 'rsrc/css/phui/phui-form-view.css' => 'e1abbe8e', ··· 139 139 'rsrc/css/phui/phui-info-panel.css' => '27ea50a1', 140 140 'rsrc/css/phui/phui-info-view.css' => '33595731', 141 141 'rsrc/css/phui/phui-list.css' => 'e448b6ba', 142 - 'rsrc/css/phui/phui-object-box.css' => '23e36d6b', 142 + 'rsrc/css/phui/phui-object-box.css' => '8c1cf7c0', 143 143 'rsrc/css/phui/phui-object-item-list-view.css' => '4be0645f', 144 144 'rsrc/css/phui/phui-pinboard-view.css' => 'eaab2b1b', 145 145 'rsrc/css/phui/phui-property-list-view.css' => 'd2d143ea', ··· 150 150 'rsrc/css/phui/phui-text.css' => 'cf019f54', 151 151 'rsrc/css/phui/phui-timeline-view.css' => 'a85542c8', 152 152 'rsrc/css/phui/phui-workboard-view.css' => '38446bc3', 153 - 'rsrc/css/phui/phui-workpanel-view.css' => '266038ce', 153 + 'rsrc/css/phui/phui-workpanel-view.css' => 'e6435408', 154 154 'rsrc/css/sprite-gradient.css' => '4bdb98a7', 155 155 'rsrc/css/sprite-login.css' => 'a3526809', 156 156 'rsrc/css/sprite-main-header.css' => '28d01b0b', ··· 761 761 'phui-calendar-list-css' => 'c1d0ca59', 762 762 'phui-calendar-month-css' => '75e6a2ee', 763 763 'phui-crumbs-view-css' => 'aeff7a21', 764 - 'phui-document-view-css' => '08059961', 764 + 'phui-document-view-css' => '27a9bb7e', 765 765 'phui-feed-story-css' => 'c9f3a0b5', 766 766 'phui-font-icon-base-css' => '3dad2ae3', 767 767 'phui-fontkit-css' => '489a1341', ··· 774 774 'phui-info-view-css' => '33595731', 775 775 'phui-inline-comment-view-css' => '2174771a', 776 776 'phui-list-view-css' => 'e448b6ba', 777 - 'phui-object-box-css' => '23e36d6b', 777 + 'phui-object-box-css' => '8c1cf7c0', 778 778 'phui-object-item-list-view-css' => '4be0645f', 779 779 'phui-pinboard-view-css' => 'eaab2b1b', 780 780 'phui-property-list-view-css' => 'd2d143ea', ··· 785 785 'phui-text-css' => 'cf019f54', 786 786 'phui-timeline-view-css' => 'a85542c8', 787 787 'phui-workboard-view-css' => '38446bc3', 788 - 'phui-workpanel-view-css' => '266038ce', 788 + 'phui-workpanel-view-css' => 'e6435408', 789 789 'phuix-action-list-view' => 'b5c256b8', 790 790 'phuix-action-view' => '8cf6d262', 791 791 'phuix-dropdown-menu' => 'bd4c8dca',
+1
src/applications/config/controller/PhabricatorConfigIssueListController.php
··· 27 27 if ($important) { 28 28 $setup_issues[] = id(new PHUIObjectBoxView()) 29 29 ->setHeaderText(pht('Important Setup Issues')) 30 + ->setColor(PHUIObjectBoxView::COLOR_RED) 30 31 ->appendChild($important); 31 32 } 32 33
-10
src/view/phui/PHUIHeaderView.php
··· 10 10 private $image; 11 11 private $imageURL = null; 12 12 private $subheader; 13 - private $headerColor; 14 13 private $headerIcon; 15 14 private $noBackground; 16 15 private $bleedHeader; ··· 58 57 59 58 public function setBleedHeader($bleed) { 60 59 $this->bleedHeader = $bleed; 61 - return $this; 62 - } 63 - 64 - public function setHeaderColor($color) { 65 - $this->headerColor = $color; 66 60 return $this; 67 61 } 68 62 ··· 151 145 152 146 if ($this->bleedHeader) { 153 147 $classes[] = 'phui-bleed-header'; 154 - } 155 - 156 - if ($this->headerColor) { 157 - $classes[] = 'phui-header-'.$this->headerColor; 158 148 } 159 149 160 150 if ($this->properties || $this->policyObject || $this->subheader) {
+15 -17
src/view/phui/PHUIObjectBoxView.php
··· 3 3 final class PHUIObjectBoxView extends AphrontView { 4 4 5 5 private $headerText; 6 - private $headerColor; 6 + private $color; 7 7 private $formErrors = null; 8 8 private $formSaved = false; 9 9 private $infoView; ··· 19 19 20 20 private $tabs = array(); 21 21 private $propertyLists = array(); 22 + 23 + const COLOR_RED = 'red'; 24 + const COLOR_BLUE = 'blue'; 25 + const COLOR_GREEN = 'green'; 26 + const COLOR_YELLOW = 'yellow'; 22 27 23 28 public function addSigil($sigil) { 24 29 $this->sigils[] = $sigil; ··· 87 92 return $this; 88 93 } 89 94 90 - public function setHeaderColor($color) { 91 - $this->headerColor = $color; 95 + public function setColor($color) { 96 + $this->color = $color; 92 97 return $this; 93 98 } 94 99 ··· 154 159 155 160 require_celerity_resource('phui-object-box-css'); 156 161 157 - $header_color = null; 158 - if ($this->headerColor) { 159 - $header_color = $this->headerColor; 160 - } 161 - 162 - $header = null; 163 - if ($this->header) { 164 - $header = $this->header; 165 - $header->setHeaderColor($header_color); 166 - } else if ($this->headerText) { 162 + $header = $this->header; 163 + if ($this->headerText) { 167 164 $header = id(new PHUIHeaderView()) 168 - ->setHeader($this->headerText) 169 - ->setHeaderColor($header_color); 165 + ->setHeader($this->headerText); 170 166 } 171 167 172 168 if ($this->actionListID) { ··· 293 289 ->addMargin(PHUI::MARGIN_LARGE_RIGHT) 294 290 ->addClass('phui-object-box'); 295 291 292 + if ($this->color) { 293 + $content->addClass('phui-object-box-'.$this->color); 294 + } 295 + 296 296 if ($this->tabs) { 297 297 $content->addSigil('phui-object-box'); 298 298 $content->setMetadata( ··· 304 304 if ($this->flush) { 305 305 $content->addClass('phui-object-box-flush'); 306 306 } 307 - 308 - $content->addClass('phui-object-box-'.$header_color); 309 307 310 308 foreach ($this->sigils as $sigil) { 311 309 $content->addSigil($sigil);
+1 -10
src/view/phui/PHUIWorkpanelView.php
··· 6 6 private $header; 7 7 private $subheader = null; 8 8 private $footerAction; 9 - private $headerColor; 10 9 private $headerActions = array(); 11 10 private $headerTag; 12 11 private $headerIcon; ··· 37 36 38 37 public function setFooterAction(PHUIListItemView $footer_action) { 39 38 $this->footerAction = $footer_action; 40 - return $this; 41 - } 42 - 43 - public function setHeaderColor($header_color) { 44 - $this->headerColor = $header_color; 45 39 return $this; 46 40 } 47 41 ··· 79 73 80 74 $header = id(new PHUIHeaderView()) 81 75 ->setHeader($this->header) 82 - ->setSubheader($this->subheader) 83 - ->setHeaderColor($this->headerColor); 76 + ->setSubheader($this->subheader); 84 77 85 78 if ($this->headerIcon) { 86 79 $header->setHeaderIcon($this->headerIcon); ··· 93 86 foreach ($this->headerActions as $action) { 94 87 $header->addActionIcon($action); 95 88 } 96 - 97 - $classes[] = 'phui-workpanel-'.$this->headerColor; 98 89 99 90 $body = phutil_tag( 100 91 'div',
-7
src/view/widget/hovercard/PhabricatorHovercardView.php
··· 17 17 private $fields = array(); 18 18 private $actions = array(); 19 19 20 - private $color = 'lightblue'; 21 20 public function setObjectHandle(PhabricatorObjectHandle $handle) { 22 21 $this->handle = $handle; 23 22 return $this; ··· 55 54 return $this; 56 55 } 57 56 58 - public function setColor($color) { 59 - $this->color = $color; 60 - return $this; 61 - } 62 - 63 57 public function render() { 64 58 if (!$this->handle) { 65 59 throw new PhutilInvalidStateException('setObjectHandle'); ··· 74 68 $this->title ? $this->title : $handle->getName()); 75 69 76 70 $header = new PHUIHeaderView(); 77 - $header->setHeaderColor($this->color); 78 71 $header->setHeader($title); 79 72 if ($this->tags) { 80 73 foreach ($this->tags as $tag) {
-5
webroot/rsrc/css/phui/phui-document.css
··· 98 98 font-size: 15px; 99 99 } 100 100 101 - .phui-document-content h1.phui-header-view { 102 - font-weight: normal; 103 - color: #000; 104 - } 105 - 106 101 .phui-document-content .phui-property-list-container { 107 102 border-color: {$thinblueborder}; 108 103 }
+22 -20
webroot/rsrc/css/phui/phui-object-box.css
··· 33 33 margin: 8px 8px 0 8px; 34 34 } 35 35 36 - .phui-box-border.phui-object-box-lightgreen { 37 - border: 1px solid {$lightgreenborder}; 38 - border-bottom: 1px solid {$greenborder}; 36 + /* - Object Box Colors ------------------------------------------------------ */ 37 + 38 + .phui-box-border.phui-object-box-green { 39 + border: 1px solid {$green}; 39 40 } 40 41 41 - .phui-box-border.phui-object-box-lightgreen .phui-header-shell { 42 - border-bottom: 1px solid {$lightgreenborder}; 42 + .phui-box-border.phui-object-box-green .phui-header-view { 43 + color: {$green}; 43 44 } 44 45 45 - .phui-box-border.phui-object-box-lightblue { 46 - border: 1px solid {$lightblueborder}; 47 - border-bottom: 1px solid {$blueborder}; 46 + .phui-box-border.phui-object-box-green .phui-header-shell { 47 + border-bottom-color: {$lightgreen}; 48 48 } 49 49 50 - .phui-box-border.phui-object-box-lightblue .phui-header-shell { 51 - border-bottom: 1px solid {$lightblueborder}; 50 + .phui-box-border.phui-object-box-blue { 51 + border: 1px solid {$blue}; 52 52 } 53 53 54 - .phui-box-border.phui-object-box-lightred { 55 - border: 1px solid {$lightredborder}; 56 - border-bottom: 1px solid {$redborder}; 54 + .phui-box-border.phui-object-box-blue .phui-header-view { 55 + color: {$blue}; 56 + } 57 + 58 + .phui-box-border.phui-object-box-blue .phui-header-shell { 59 + border-bottom-color: {$lightblue}; 57 60 } 58 61 59 - .phui-box-border.phui-object-box-lightred .phui-header-shell { 60 - border-bottom: 1px solid {$lightredborder}; 62 + .phui-box-border.phui-object-box-red { 63 + border: 1px solid {$red}; 61 64 } 62 65 63 - .phui-box-border.phui-object-box-lightviolet { 64 - border: 1px solid {$lightvioletborder}; 65 - border-bottom: 1px solid {$violetborder}; 66 + .phui-box-border.phui-object-box-red .phui-header-view { 67 + color: {$red}; 66 68 } 67 69 68 - .phui-box-border.phui-object-box-lightviolet .phui-header-shell { 69 - border-bottom: 1px solid {$lightvioletborder}; 70 + .phui-box-border.phui-object-box-red .phui-header-shell { 71 + border-bottom-color: {$lightred}; 70 72 } 71 73 72 74 /* - Double Object Box Override --------------------------------------------- */
+7 -6
webroot/rsrc/css/phui/phui-workpanel-view.css
··· 94 94 } 95 95 96 96 .phui-workpanel-body .phui-object-item-list-view { 97 - min-height: 49px; 97 + min-height: 54px; 98 98 } 99 99 100 100 .device .aphront-multi-column-outer ··· 121 121 background: rgba(255,255,255,.7); 122 122 } 123 123 124 - .project-panel-over-limit .phui-action-header { 125 - border-top: 1px solid {$redborder}; 126 - border-left: 1px solid {$redborder}; 127 - border-right: 1px solid {$redborder}; 128 - background: {$lightredbackground}; 124 + .project-panel-over-limit .phui-header-view { 125 + color: {$red}; 126 + } 127 + 128 + .phui-workpanel-view.project-panel-over-limit .phui-header-shell { 129 + border-color: {$sh-redborder}; 129 130 } 130 131 131 132 /* - Workpanel Cards -----------------------------------------------------------