Page MenuHomePhabricator

Make the policy control a JS dropdown with icons
ClosedPublic

Authored by epriestley on Oct 11 2013, 2:22 AM.
Tags
None
Referenced Files
F15554621: D7285.id16417.diff
Mon, Apr 28, 7:49 AM
F15549430: D7285.id.diff
Sun, Apr 27, 5:40 AM
F15544178: D7285.diff
Sat, Apr 26, 3:24 AM
F15537497: D7285.id16401.diff
Thu, Apr 24, 2:10 PM
F15530986: D7285.id16401.diff
Wed, Apr 23, 8:50 AM
F15530985: D7285.id16417.diff
Wed, Apr 23, 8:50 AM
F15530977: D7285.id.diff
Wed, Apr 23, 8:49 AM
F15448645: D7285.id16417.diff
Mar 28 2025, 6:05 AM
Subscribers

Details

Summary

Ref T603. After thinking about this for a bit I can't really come up with anything better than what Facebook does, so I'm going to implement something similar for choosing custom policies. To start with, swap this over to a JS-driven dropdown.

Test Plan

See screenshot.

Diff Detail

Lint
Lint Skipped
Unit
Tests Skipped

Event Timeline

I like it, the only issue is when you have a redonk number of projects. At some point maybe has 'See All...' as the last option and generate a dialog?

Yeah, I'm going to collapse that to your like 5 "favorites" with a "more...", for some definition of "favorites" that I haven't decided on yet.

Probably "most recently used" because anything else would be even more of a pain to derive and record, and I don't think I can get away with "alphabetically first" without users complaining.

If a project has even been used to manage a policy (or is type policy).

Maybe it should be "alphabetically first", and then we can just tell users to pick names like "AAAAA Design" for their favorite projects.

@chad - you can't currently flag a project. implementing it would be easy enough

code looks good to me. maybs suggestion inline.

webroot/rsrc/js/application/policy/behavior-policy-control.js
16

maybe have this come in from PHP (config.menuWidth) land?