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
F14095869: D7285.diff
Tue, Nov 26, 12:07 AM
Unknown Object (File)
Sat, Nov 23, 7:39 AM
Unknown Object (File)
Oct 17 2024, 5:51 AM
Unknown Object (File)
Oct 16 2024, 11:51 AM
Unknown Object (File)
Oct 13 2024, 2:51 PM
Unknown Object (File)
Oct 3 2024, 8:27 AM
Unknown Object (File)
Oct 3 2024, 8:23 AM
Unknown Object (File)
Oct 3 2024, 8:23 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?