Add some style to label in Favorites Menu
Summary: Ref T12174. Always sets the correct type when converting to ActionList, adds a type to Divider.
Test Plan:
Add a Label, 2 applications to the personal favorites menu, see nice styles.
{F2554901}
Reviewers: epriestley
Reviewed By: epriestley
Subscribers: Korvin
Maniphest Tasks: T12174
Differential Revision: https://secure.phabricator.com/D17285
This commit is contained in:
@@ -61,14 +61,10 @@ final class PhabricatorFavoritesMainMenuBarExtension
|
||||
$view = id(new PhabricatorActionListView())
|
||||
->setViewer($viewer);
|
||||
foreach ($item_views as $item) {
|
||||
$type = null;
|
||||
if (!strlen($item->getName())) {
|
||||
$type = PhabricatorActionView::TYPE_DIVIDER;
|
||||
}
|
||||
$action = id(new PhabricatorActionView())
|
||||
->setName($item->getName())
|
||||
->setHref($item->getHref())
|
||||
->setType($type);
|
||||
->setType($item->getType());
|
||||
$view->addAction($action);
|
||||
}
|
||||
|
||||
|
||||
@@ -38,6 +38,7 @@ final class PhabricatorDividerProfileMenuItem
|
||||
PhabricatorProfileMenuItemConfiguration $config) {
|
||||
|
||||
$item = $this->newItem()
|
||||
->setType(PHUIListItemView::TYPE_DIVIDER)
|
||||
->addClass('phui-divider');
|
||||
|
||||
return array(
|
||||
|
||||
Reference in New Issue
Block a user