mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-22 05:20:56 +01:00
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:
parent
a07a06ab08
commit
a3bdce9680
3 changed files with 27 additions and 2 deletions
|
@ -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;
|
||||
|
|
Loading…
Reference in a new issue