Page MenuHomePhabricator

D9746.id23406.diff
No OneTemporary

D9746.id23406.diff

diff --git a/resources/celerity/map.php b/resources/celerity/map.php
--- a/resources/celerity/map.php
+++ b/resources/celerity/map.php
@@ -7,7 +7,7 @@
return array(
'names' =>
array(
- 'core.pkg.css' => 'b2a7a97c',
+ 'core.pkg.css' => 'c494bff8',
'core.pkg.js' => '834b4eda',
'darkconsole.pkg.js' => 'df001cab',
'differential.pkg.css' => '4a93db37',
@@ -141,7 +141,7 @@
'rsrc/css/phui/phui-remarkup-preview.css' => '19ad512b',
'rsrc/css/phui/phui-spacing.css' => '042804d6',
'rsrc/css/phui/phui-status.css' => '2f562399',
- 'rsrc/css/phui/phui-tag-view.css' => '4f920464',
+ 'rsrc/css/phui/phui-tag-view.css' => '30dd4e6f',
'rsrc/css/phui/phui-text.css' => '23e9b4b7',
'rsrc/css/phui/phui-timeline-view.css' => 'bbd990d0',
'rsrc/css/phui/phui-workboard-view.css' => '2bf82d00',
@@ -787,7 +787,7 @@
'phui-remarkup-preview-css' => '19ad512b',
'phui-spacing-css' => '042804d6',
'phui-status-list-view-css' => '2f562399',
- 'phui-tag-view-css' => '4f920464',
+ 'phui-tag-view-css' => '30dd4e6f',
'phui-text-css' => '23e9b4b7',
'phui-timeline-view-css' => 'bbd990d0',
'phui-workboard-view-css' => '2bf82d00',
diff --git a/src/applications/uiexample/examples/PHUITagExample.php b/src/applications/uiexample/examples/PHUITagExample.php
--- a/src/applications/uiexample/examples/PHUITagExample.php
+++ b/src/applications/uiexample/examples/PHUITagExample.php
@@ -165,6 +165,14 @@
->setIcon('fa-tags')
->setName(ucwords($shade))
->setHref('#');
+ $tags[] = hsprintf(' ');
+ $tags[] = id(new PHUITagView())
+ ->setType(PHUITagView::TYPE_OBJECT)
+ ->setShade($shade)
+ ->setSlimShady(true)
+ ->setIcon('fa-tags')
+ ->setName(ucwords($shade))
+ ->setHref('#');
$tags[] = hsprintf('<br /><br />');
}
diff --git a/src/view/phui/PHUITagView.php b/src/view/phui/PHUITagView.php
--- a/src/view/phui/PHUITagView.php
+++ b/src/view/phui/PHUITagView.php
@@ -34,6 +34,7 @@
private $external;
private $icon;
private $shade;
+ private $slimShady;
public function setType($type) {
$this->type = $type;
@@ -90,6 +91,11 @@
return $this;
}
+ public function setSlimShady($mm) {
+ $this->slimShady = $mm;
+ return $this;
+ }
+
protected function getTagName() {
return strlen($this->href) ? 'a' : 'span';
}
@@ -105,9 +111,11 @@
if ($this->shade) {
$classes[] = 'phui-tag-shade';
$classes[] = 'phui-tag-shade-'.$this->shade;
+ if ($this->slimShady) {
+ $classes[] = 'phui-tag-shade-slim';
+ }
}
-
if ($this->icon) {
$classes[] = 'phui-tag-icon-view';
}
diff --git a/webroot/rsrc/css/phui/phui-tag-view.css b/webroot/rsrc/css/phui/phui-tag-view.css
--- a/webroot/rsrc/css/phui/phui-tag-view.css
+++ b/webroot/rsrc/css/phui/phui-tag-view.css
@@ -158,6 +158,17 @@
left: 6px;
}
+.phui-tag-shade-slim .phui-icon-view {
+ font-size: 11px;
+ top: 3px;
+ left: 6px;
+}
+
+.phui-tag-shade-slim.phui-tag-icon-view .phui-tag-core {
+ padding-left: 20px;
+ font-size: 12px;
+}
+
.phui-tag-shade-red .phui-tag-core {
background-color: {$sh-redbackground};
border-color: {$sh-lightredborder};

File Metadata

Mime Type
text/plain
Expires
Thu, Oct 17, 7:55 AM (3 w, 5 d ago)
Storage Engine
blob
Storage Format
Encrypted (AES-256-CBC)
Storage Handle
6721235
Default Alt Text
D9746.id23406.diff (3 KB)

Event Timeline