mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-26 16:52:41 +01:00
Allow users to add "ProfileMenu" items on mobile
Summary: Depends on D20337. Fixes T12167. Ref T13272. On this page ("Favorites > Edit Favorites > Personal", for example) the curtain actions aren't available on mobile. Normally, curtains are built with `Controller->newCurtainView()`, which sets an ID on the action list, which populates the header button. This curtain is built directly because there's no `Controller` handy. To fix the issue, just set an ID. This could probably be cleaner, but that's likely a much more involved change. Test Plan: Edited my favorites, narrowed the window, saw an "Actions" button. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T13272, T12167 Differential Revision: https://secure.phabricator.com/D20338
This commit is contained in:
parent
6648942bc8
commit
6bb9d3ac67
1 changed files with 4 additions and 6 deletions
|
@ -917,15 +917,16 @@ abstract class PhabricatorProfileMenuEngine extends Phobject {
|
|||
$list->addItem($view);
|
||||
}
|
||||
|
||||
$action_view = id(new PhabricatorActionListView())
|
||||
->setUser($viewer);
|
||||
|
||||
$item_types = PhabricatorProfileMenuItem::getAllMenuItems();
|
||||
$object = $this->getProfileObject();
|
||||
|
||||
$action_list = id(new PhabricatorActionListView())
|
||||
->setViewer($viewer);
|
||||
|
||||
// See T12167. This makes the "Actions" dropdown button show up in the
|
||||
// page header.
|
||||
$action_list->setID(celerity_generate_unique_node_id());
|
||||
|
||||
$action_list->addAction(
|
||||
id(new PhabricatorActionView())
|
||||
->setLabel(true)
|
||||
|
@ -970,9 +971,6 @@ abstract class PhabricatorProfileMenuEngine extends Phobject {
|
|||
->setBackground(PHUIObjectBoxView::BLUE_PROPERTY)
|
||||
->setObjectList($list);
|
||||
|
||||
$panel = id(new PHUICurtainPanelView())
|
||||
->appendChild($action_view);
|
||||
|
||||
$curtain = id(new PHUICurtainView())
|
||||
->setViewer($viewer)
|
||||
->setActionList($action_list);
|
||||
|
|
Loading…
Reference in a new issue