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
Unknown Object (File)
Tue, Sep 10, 10:24 AM
Unknown Object (File)
Wed, Sep 4, 7:23 AM
Unknown Object (File)
Sat, Aug 31, 2:07 AM
Unknown Object (File)
Sat, Aug 24, 2:49 PM
Unknown Object (File)
Thu, Aug 22, 4:41 AM
Unknown Object (File)
Aug 21 2024, 2:17 PM
Unknown Object (File)
Aug 18 2024, 3:24 PM
Unknown Object (File)
Aug 12 2024, 12:32 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
Branch
jsmenu1
Lint
Lint Passed
Unit
No Test Coverage
Build Status
Buildable 15312
Build 20154: Run Core Tests
Build 20153: arc lint + arc unit

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