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
F18715025: D7285.diff
Mon, Sep 29, 9:08 AM
F18711764: D7285.id.diff
Mon, Sep 29, 4:53 AM
F18703068: D7285.diff
Sun, Sep 28, 2:53 AM
F18674224: D7285.diff
Sep 25 2025, 1:42 PM
F18628713: D7285.diff
Sep 16 2025, 7:08 AM
F18369856: D7285.diff
Aug 28 2025, 2:49 AM
F18084840: D7285.id16417.diff
Aug 5 2025, 5:52 PM
F17942538: D7285.id.diff
Jul 31 2025, 6:53 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?