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);
|
||||
|
||||
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 $aural;
|
||||
private $profileImage;
|
||||
private $indented;
|
||||
|
||||
public function setDropdownMenu(PhabricatorActionListView $actions) {
|
||||
Javelin::initBehavior('phui-dropdown-menu');
|
||||
@@ -91,6 +92,15 @@ final class PHUIListItemView extends AphrontTagView {
|
||||
return $this->icon;
|
||||
}
|
||||
|
||||
public function setIndented($indented) {
|
||||
$this->indented = $indented;
|
||||
return $this;
|
||||
}
|
||||
|
||||
public function getIndented() {
|
||||
return $this->indented;
|
||||
}
|
||||
|
||||
public function setKey($key) {
|
||||
$this->key = (string)$key;
|
||||
return $this;
|
||||
@@ -256,11 +266,20 @@ final class PHUIListItemView extends AphrontTagView {
|
||||
->setIconFont($this->appIcon);
|
||||
}
|
||||
|
||||
$classes = array();
|
||||
if ($this->href) {
|
||||
$classes[] = 'phui-list-item-href';
|
||||
}
|
||||
|
||||
if ($this->indented) {
|
||||
$classes[] = 'phui-list-item-indented';
|
||||
}
|
||||
|
||||
return javelin_tag(
|
||||
$this->href ? 'a' : 'div',
|
||||
array(
|
||||
'href' => $this->href,
|
||||
'class' => $this->href ? 'phui-list-item-href' : null,
|
||||
'class' => implode(' ', $classes),
|
||||
'meta' => $meta,
|
||||
'sigil' => $sigil,
|
||||
),
|
||||
|
||||
@@ -70,6 +70,11 @@
|
||||
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 {
|
||||
background: {$sky};
|
||||
color: white;
|
||||
|
||||
Reference in New Issue
Block a user