Page MenuHomePhabricator

Attempt to make dropdown item actions more consistent
ClosedPublic

Authored by epriestley on Jan 18 2017, 7:22 PM.
Tags
None
Referenced Files
F15476995: D17222.id41425.diff
Mon, Apr 7, 11:09 AM
F15457783: D17222.id41423.diff
Sun, Mar 30, 6:54 PM
F15457583: D17222.id41432.diff
Sun, Mar 30, 5:17 PM
F15457582: D17222.id41425.diff
Sun, Mar 30, 5:17 PM
F15456312: D17222.id41432.diff
Sun, Mar 30, 8:36 AM
F15454846: D17222.id.diff
Sat, Mar 29, 8:48 PM
F15454644: D17222.id41425.diff
Sat, Mar 29, 7:34 PM
F15452164: D17222.diff
Sat, Mar 29, 2:17 AM
Subscribers
None

Details

Summary

See D17210. Currently, this handler needs to be installed on each menu that doesn't build with the default behavior.

Rather than copy-pasting it to the user menu, try to make it a default behavior. This adds a new rule: don't close the menu if the item is a dynamic item built in JS with PHUIXActionView.

This allows dynamic items to control the menu themselves, while giving static items the desired default behavior.

Test Plan
  • Opened menus on: dashboards, user menu, timeline comments. Clicked stuff. Menus went away.
  • Other menus still seemed to work right: Diffusion, Favorites, mobile menu.

Diff Detail

Repository
rP Phabricator
Lint
Lint Not Applicable
Unit
Tests Not Applicable

Event Timeline

No such luck: this breaks mobile "Action" menus on objects.

Actually, something else already broke that.

  • After rebasing on D17223, I think everything (including the submenus in "Actions" on mobile on tasks) works correctly.
This revision is now accepted and ready to land.Jan 18 2017, 8:33 PM