Indent multiple items from the same application in Quick Create menu
Summary: Ref T10004. Happy to take another approach here or just not bother, this just struck me as a little ambiguous/confusing.
Test Plan:
Before, not necessarily clear that the "Create Task" header only applies to the first few items.
{F1029126}
After, more clear:
{F1029127}
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T10004
Differential Revision: https://secure.phabricator.com/D14815
This commit is contained in:
@@ -1741,7 +1741,8 @@ abstract class PhabricatorEditEngine
|
|||||||
->setName($group_name);
|
->setName($group_name);
|
||||||
|
|
||||||
foreach ($configs as $config) {
|
foreach ($configs as $config) {
|
||||||
$items[] = $this->newQuickCreateItem($config);
|
$items[] = $this->newQuickCreateItem($config)
|
||||||
|
->setIndented(true);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -28,6 +28,7 @@ final class PHUIListItemView extends AphrontTagView {
|
|||||||
private $order;
|
private $order;
|
||||||
private $aural;
|
private $aural;
|
||||||
private $profileImage;
|
private $profileImage;
|
||||||
|
private $indented;
|
||||||
|
|
||||||
public function setDropdownMenu(PhabricatorActionListView $actions) {
|
public function setDropdownMenu(PhabricatorActionListView $actions) {
|
||||||
Javelin::initBehavior('phui-dropdown-menu');
|
Javelin::initBehavior('phui-dropdown-menu');
|
||||||
@@ -91,6 +92,15 @@ final class PHUIListItemView extends AphrontTagView {
|
|||||||
return $this->icon;
|
return $this->icon;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public function setIndented($indented) {
|
||||||
|
$this->indented = $indented;
|
||||||
|
return $this;
|
||||||
|
}
|
||||||
|
|
||||||
|
public function getIndented() {
|
||||||
|
return $this->indented;
|
||||||
|
}
|
||||||
|
|
||||||
public function setKey($key) {
|
public function setKey($key) {
|
||||||
$this->key = (string)$key;
|
$this->key = (string)$key;
|
||||||
return $this;
|
return $this;
|
||||||
@@ -256,11 +266,20 @@ final class PHUIListItemView extends AphrontTagView {
|
|||||||
->setIconFont($this->appIcon);
|
->setIconFont($this->appIcon);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
$classes = array();
|
||||||
|
if ($this->href) {
|
||||||
|
$classes[] = 'phui-list-item-href';
|
||||||
|
}
|
||||||
|
|
||||||
|
if ($this->indented) {
|
||||||
|
$classes[] = 'phui-list-item-indented';
|
||||||
|
}
|
||||||
|
|
||||||
return javelin_tag(
|
return javelin_tag(
|
||||||
$this->href ? 'a' : 'div',
|
$this->href ? 'a' : 'div',
|
||||||
array(
|
array(
|
||||||
'href' => $this->href,
|
'href' => $this->href,
|
||||||
'class' => $this->href ? 'phui-list-item-href' : null,
|
'class' => implode(' ', $classes),
|
||||||
'meta' => $meta,
|
'meta' => $meta,
|
||||||
'sigil' => $sigil,
|
'sigil' => $sigil,
|
||||||
),
|
),
|
||||||
|
|||||||
@@ -70,6 +70,11 @@
|
|||||||
padding: 4px 10px;
|
padding: 4px 10px;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
.phui-list-sidenav .phui-list-item-has-icon .phui-list-item-indented {
|
||||||
|
padding-left: 18px;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
.device-desktop .phui-list-sidenav .phui-list-item-href:hover {
|
.device-desktop .phui-list-sidenav .phui-list-item-href:hover {
|
||||||
background: {$sky};
|
background: {$sky};
|
||||||
color: white;
|
color: white;
|
||||||
|
|||||||
Reference in New Issue
Block a user