1
0
Fork 0
mirror of https://we.phorge.it/source/phorge.git synced 2025-01-10 14:51:06 +01:00

Add a borderless tag style

Summary: Formally support borderless tags in PHUITagView.

Test Plan: Used in Diffusion History List

Reviewers: epriestley

Reviewed By: epriestley

Subscribers: Korvin

Differential Revision: https://secure.phabricator.com/D18074
This commit is contained in:
Chad Little 2017-06-04 11:52:27 -07:00
parent f66c6e5c1f
commit 65c9d789d2
6 changed files with 29 additions and 19 deletions

View file

@ -9,7 +9,7 @@ return array(
'names' => array(
'conpherence.pkg.css' => 'ff161f2d',
'conpherence.pkg.js' => 'b5b51108',
'core.pkg.css' => '8ac2e6b8',
'core.pkg.css' => '5284a0e0',
'core.pkg.js' => '1475bd91',
'darkconsole.pkg.js' => '1f9a31bc',
'differential.pkg.css' => 'a2755617',
@ -71,7 +71,7 @@ return array(
'rsrc/css/application/differential/revision-history.css' => '0e8eb855',
'rsrc/css/application/differential/revision-list.css' => 'f3c47d33',
'rsrc/css/application/differential/table-of-contents.css' => 'ae4b7a55',
'rsrc/css/application/diffusion/diffusion-history.css' => 'de70e348',
'rsrc/css/application/diffusion/diffusion-history.css' => 'cc283766',
'rsrc/css/application/diffusion/diffusion-icons.css' => 'a6a1e2ba',
'rsrc/css/application/diffusion/diffusion-readme.css' => '18bd3910',
'rsrc/css/application/diffusion/diffusion-source.css' => '750add59',
@ -175,7 +175,7 @@ return array(
'rsrc/css/phui/phui-segment-bar-view.css' => 'b1d1b892',
'rsrc/css/phui/phui-spacing.css' => '042804d6',
'rsrc/css/phui/phui-status.css' => 'd5263e49',
'rsrc/css/phui/phui-tag-view.css' => '3fa7765e',
'rsrc/css/phui/phui-tag-view.css' => '93b084cf',
'rsrc/css/phui/phui-timeline-view.css' => '313c7f22',
'rsrc/css/phui/phui-two-column-view.css' => 'ce9fa0b7',
'rsrc/css/phui/workboards/phui-workboard-color.css' => '783cdff5',
@ -567,7 +567,7 @@ return array(
'differential-revision-history-css' => '0e8eb855',
'differential-revision-list-css' => 'f3c47d33',
'differential-table-of-contents-css' => 'ae4b7a55',
'diffusion-history-css' => 'de70e348',
'diffusion-history-css' => 'cc283766',
'diffusion-icons-css' => 'a6a1e2ba',
'diffusion-readme-css' => '18bd3910',
'diffusion-source-css' => '750add59',
@ -867,7 +867,7 @@ return array(
'phui-segment-bar-view-css' => 'b1d1b892',
'phui-spacing-css' => '042804d6',
'phui-status-list-view-css' => 'd5263e49',
'phui-tag-view-css' => '3fa7765e',
'phui-tag-view-css' => '93b084cf',
'phui-theme-css' => '9f261c6b',
'phui-timeline-view-css' => '313c7f22',
'phui-two-column-view-css' => 'ce9fa0b7',

View file

@ -333,6 +333,7 @@ abstract class DiffusionController extends PhabricatorController {
$tag = id(new PHUITagView())
->setName($commit)
->setColor(PHUITagView::COLOR_INDIGO)
->setBorder(PHUITagView::BORDER_NONE)
->setType(PHUITagView::TYPE_SHADE);
return $tag;

View file

@ -110,7 +110,7 @@ final class DiffusionHistoryListView extends DiffusionHistoryView {
->setType(PHUITagView::TYPE_SHADE)
->setColor(PHUITagView::COLOR_BLUE)
->setHref('/D'.$d_id)
->addClass('diffusion-differential-tag')
->setBorder(PHUITagView::BORDER_NONE)
->setSlimShady(true);
}
}
@ -155,6 +155,7 @@ final class DiffusionHistoryListView extends DiffusionHistoryView {
->setName($commit_name)
->setType(PHUITagView::TYPE_SHADE)
->setColor(PHUITagView::COLOR_INDIGO)
->setBorder(PHUITagView::BORDER_NONE)
->setSlimShady(true);
$item = id(new PHUIObjectItemView())

View file

@ -28,6 +28,8 @@ final class PHUITagView extends AphrontTagView {
const COLOR_OBJECT = 'object';
const COLOR_PERSON = 'person';
const BORDER_NONE = 'border-none';
private $type;
private $href;
private $name;
@ -40,6 +42,7 @@ final class PHUITagView extends AphrontTagView {
private $icon;
private $shade;
private $slimShady;
private $border;
public function setType($type) {
$this->type = $type;
@ -104,6 +107,11 @@ final class PHUITagView extends AphrontTagView {
return $this;
}
public function setBorder($border) {
$this->border = $border;
return $this;
}
public function setIcon($icon) {
$this->icon = $icon;
return $this;
@ -142,6 +150,10 @@ final class PHUITagView extends AphrontTagView {
$classes[] = 'phui-tag-icon-view';
}
if ($this->border) {
$classes[] = 'phui-tag-'.$this->border;
}
if ($this->phid) {
Javelin::initBehavior('phui-hovercards');

View file

@ -7,14 +7,6 @@
font-size: {$biggerfontsize};
}
.diffusion-history-list .phui-oi-attribute .phui-tag-core {
border-color: transparent;
}
.diffusion-history-list .phui-oi-attribute .phui-tag-indigo a {
color: {$indigo};
}
.diffusion-history-message {
background-color: {$bluebackground};
padding: 16px;
@ -35,8 +27,3 @@
.diffusion-history-list .diffusion-differential-tag {
margin-left: 4px;
}
a.phui-tag-view:hover.diffusion-differential-tag .phui-tag-core {
border-color: transparent;
text-decoration: underline;
}

View file

@ -154,6 +154,15 @@ a.phui-tag-view:hover
margin: 0 4px 2px 0;
}
.phui-tag-view.phui-tag-border-none .phui-tag-core {
border-color: transparent;
}
a.phui-tag-view:hover.phui-tag-border-none .phui-tag-core {
border-color: transparent !important;
text-decoration: underline;
}
/* - Shaded Tags ---------------------------------------------------------------