Remove setBarColor from PHUITagView
Summary: Also tweaked spacing on the dots. Test Plan: UIExamples Reviewers: epriestley, btrahan Reviewed By: epriestley CC: Korvin, epriestley, aran Differential Revision: https://secure.phabricator.com/D7968
This commit is contained in:
		| @@ -7,7 +7,7 @@ | |||||||
| return array( | return array( | ||||||
|   'names' => |   'names' => | ||||||
|   array( |   array( | ||||||
|     'core.pkg.css' => 'cc7229ab', |     'core.pkg.css' => '95ab640c', | ||||||
|     'core.pkg.js' => 'c907bd96', |     'core.pkg.js' => 'c907bd96', | ||||||
|     'darkconsole.pkg.js' => 'ca8671ce', |     'darkconsole.pkg.js' => 'ca8671ce', | ||||||
|     'differential.pkg.css' => '827749c1', |     'differential.pkg.css' => '827749c1', | ||||||
| @@ -142,7 +142,7 @@ return array( | |||||||
|     'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b', |     'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b', | ||||||
|     'rsrc/css/phui/phui-spacing.css' => '042804d6', |     'rsrc/css/phui/phui-spacing.css' => '042804d6', | ||||||
|     'rsrc/css/phui/phui-status.css' => '2f562399', |     'rsrc/css/phui/phui-status.css' => '2f562399', | ||||||
|     'rsrc/css/phui/phui-tag-view.css' => '428d5017', |     'rsrc/css/phui/phui-tag-view.css' => '295d81c4', | ||||||
|     'rsrc/css/phui/phui-text.css' => '23e9b4b7', |     'rsrc/css/phui/phui-text.css' => '23e9b4b7', | ||||||
|     'rsrc/css/phui/phui-workboard-view.css' => 'bf70dd2e', |     'rsrc/css/phui/phui-workboard-view.css' => 'bf70dd2e', | ||||||
|     'rsrc/css/phui/phui-workpanel-view.css' => 'ffb31e99', |     'rsrc/css/phui/phui-workpanel-view.css' => 'ffb31e99', | ||||||
| @@ -748,7 +748,7 @@ return array( | |||||||
|     'phui-remarkup-preview-css' => '19ad512b', |     'phui-remarkup-preview-css' => '19ad512b', | ||||||
|     'phui-spacing-css' => '042804d6', |     'phui-spacing-css' => '042804d6', | ||||||
|     'phui-status-list-view-css' => '2f562399', |     'phui-status-list-view-css' => '2f562399', | ||||||
|     'phui-tag-view-css' => '428d5017', |     'phui-tag-view-css' => '295d81c4', | ||||||
|     'phui-text-css' => '23e9b4b7', |     'phui-text-css' => '23e9b4b7', | ||||||
|     'phui-workboard-view-css' => 'bf70dd2e', |     'phui-workboard-view-css' => 'bf70dd2e', | ||||||
|     'phui-workpanel-view-css' => 'ffb31e99', |     'phui-workpanel-view-css' => 'ffb31e99', | ||||||
|   | |||||||
| @@ -69,7 +69,6 @@ final class PHUITagExample extends PhabricatorUIExample { | |||||||
|     $intro[] = id(new PHUITagView()) |     $intro[] = id(new PHUITagView()) | ||||||
|       ->setType(PHUITagView::TYPE_OBJECT) |       ->setType(PHUITagView::TYPE_OBJECT) | ||||||
|       ->setName('T123: Water The Dog') |       ->setName('T123: Water The Dog') | ||||||
|       ->setBarColor(PHUITagView::COLOR_RED) |  | ||||||
|       ->setHref('#'); |       ->setHref('#'); | ||||||
|     $intro[] = ' -- that task is '; |     $intro[] = ' -- that task is '; | ||||||
|     $intro[] = id(new PHUITagView()) |     $intro[] = id(new PHUITagView()) | ||||||
|   | |||||||
| @@ -26,7 +26,6 @@ final class PHUITagView extends AphrontView { | |||||||
|   private $phid; |   private $phid; | ||||||
|   private $backgroundColor; |   private $backgroundColor; | ||||||
|   private $dotColor; |   private $dotColor; | ||||||
|   private $barColor; |  | ||||||
|   private $closed; |   private $closed; | ||||||
|   private $external; |   private $external; | ||||||
|   private $id; |   private $id; | ||||||
| @@ -54,11 +53,6 @@ final class PHUITagView extends AphrontView { | |||||||
|     return $this; |     return $this; | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   public function setBarColor($bar_color) { |  | ||||||
|     $this->barColor = $bar_color; |  | ||||||
|     return $this; |  | ||||||
|   } |  | ||||||
|  |  | ||||||
|   public function setDotColor($dot_color) { |   public function setDotColor($dot_color) { | ||||||
|     $this->dotColor = $dot_color; |     $this->dotColor = $dot_color; | ||||||
|     return $this; |     return $this; | ||||||
| @@ -143,19 +137,6 @@ final class PHUITagView extends AphrontView { | |||||||
|       ), |       ), | ||||||
|       array($dot, $this->name)); |       array($dot, $this->name)); | ||||||
|  |  | ||||||
|     if ($this->barColor) { |  | ||||||
|       $barcolor = 'phui-tag-color-'.$this->barColor; |  | ||||||
|       $bar = phutil_tag( |  | ||||||
|         'span', |  | ||||||
|         array( |  | ||||||
|           'class' => 'phui-tag-bar '.$barcolor, |  | ||||||
|         ), |  | ||||||
|         ''); |  | ||||||
|       $classes[] = 'phui-tag-view-has-bar'; |  | ||||||
|     } else { |  | ||||||
|       $bar = null; |  | ||||||
|     } |  | ||||||
|  |  | ||||||
|     if ($this->phid) { |     if ($this->phid) { | ||||||
|       Javelin::initBehavior('phabricator-hovercards'); |       Javelin::initBehavior('phabricator-hovercards'); | ||||||
|  |  | ||||||
| @@ -171,7 +152,7 @@ final class PHUITagView extends AphrontView { | |||||||
|           ), |           ), | ||||||
|           'target' => $this->external ? '_blank' : null, |           'target' => $this->external ? '_blank' : null, | ||||||
|         ), |         ), | ||||||
|         array($bar, $icon, $content)); |         array($icon, $content)); | ||||||
|     } else { |     } else { | ||||||
|       return phutil_tag( |       return phutil_tag( | ||||||
|         $this->href ? 'a' : 'span', |         $this->href ? 'a' : 'span', | ||||||
| @@ -181,7 +162,7 @@ final class PHUITagView extends AphrontView { | |||||||
|           'class' => implode(' ', $classes), |           'class' => implode(' ', $classes), | ||||||
|           'target' => $this->external ? '_blank' : null, |           'target' => $this->external ? '_blank' : null, | ||||||
|         ), |         ), | ||||||
|         array($bar, $icon, $content)); |         array($icon, $content)); | ||||||
|     } |     } | ||||||
|   } |   } | ||||||
|  |  | ||||||
|   | |||||||
| @@ -39,21 +39,15 @@ a.phui-tag-view:hover { | |||||||
|   padding-left: 22px; |   padding-left: 22px; | ||||||
| } | } | ||||||
|  |  | ||||||
| .phui-tag-view-has-bar .phui-tag-core { |  | ||||||
|   border-radius: 0 3px 3px 0; |  | ||||||
|   border-width: 1px 1px 1px 0; |  | ||||||
| } |  | ||||||
|  |  | ||||||
| .phui-tag-dot { | .phui-tag-dot { | ||||||
|   position: relative; |   position: relative; | ||||||
|   display: inline-block; |   display: inline-block; | ||||||
|   width: 6px; |   width: 6px; | ||||||
|   height: 6px; |   height: 6px; | ||||||
|   margin-right: 3px; |   margin-right: 4px; | ||||||
|   top: -1px; |   top: -1px; | ||||||
|   border-radius: 6px; |   border-radius: 6px; | ||||||
|   border: 1px solid transparent; |   border: 1px solid transparent; | ||||||
|   box-shadow: 0 0 2px rgba(255, 255, 255, 0.8); |  | ||||||
| } | } | ||||||
|  |  | ||||||
| .phui-tag-type-state { | .phui-tag-type-state { | ||||||
| @@ -141,11 +135,3 @@ a.phui-tag-view:hover | |||||||
|   .phui-tag-core.phui-tag-color-object { |   .phui-tag-core.phui-tag-color-object { | ||||||
|   border-color: #d7d7d7; |   border-color: #d7d7d7; | ||||||
| } | } | ||||||
|  |  | ||||||
| .phui-tag-bar { |  | ||||||
|   padding-left: 4px; |  | ||||||
|   border-width: 1px; |  | ||||||
|   border-style: solid; |  | ||||||
|   border-right-color: rgba(0, 0, 0, 0.33); |  | ||||||
|   border-radius: 2px 0 0 2px; |  | ||||||
| } |  | ||||||
|   | |||||||
		Reference in New Issue
	
	Block a user
	 Chad Little
					Chad Little