Building a better Manager

Ok, so we've seen how to make a bad manager.

What does a good manager look like for a system which can have thousands of sites organized into a hierarchy?

Surprisingly enough my answer is an explorer. Two panes, one listing servers (possibly in a tree) and the second listing objects with their properties (by default in a details view). This enables users to see all related items at once and manage them collectively.

So what would it look like?

Here's a simplistic flat server view:

.___________________________________________________________________________________________________________.
|o Manage Cookies                                                                                       _= X|
+-----------------------------------------------------------------------------------------------------------+
|Hosts [view all |v] [sort |v] | Name        ^| Value        | Site                 | Date Set | Expires  |v|
|------------------------------+--------------+--------------+----------------------+----------+-------------
|[bugzilla.mozilla.org]      |^|+Cookie Rules |+White Listed | *.mozilla.org        | 10/1/2003| Never    |^|
|[evil.mozilla.org]          |H|xCookie Rules |xBlack Listed | evil.mozilla.org     | 10/1/2003| Never    |H|
|[www.mozilla.org]           |H|cLogin_cookie | timeless@... | bugzilla.mozilla.org | Today    | 1/1/2005 |H|
| www.yahoo.com              |H|cRun_once     | Mozilla1.5   | www.mozilla.org      | 10/1/2003| 1/1/2005 |H|
| www.zdnet.com              |H|              |              |                      |          |          |H|
|____________________________|V|______________|______________|______________________|__________|__________|V|
And here's a tree view:
.___________________________________________________________________________________________________________.
|o Manage Cookies                                                                                       _= X|
+-----------------------------------------------------------------------------------------------------------+
|Hosts [view tree|v] [sort |v] | Name        ^| Value        | Site                 | Date Set | Expires  |v|
|------------------------------+--------------+--------------+----------------------+----------+-------------
|-All                        |^|+Cookie Rules |+White Listed | *.mozilla.org        | 10/1/2003| Never    |^|
|[-mozilla.org]              |H|xCookie Rules |xBlack Listed | evil.mozilla.org     | 10/1/2003| Never    |H|
|  *bugzilla                 |H|cLogin_cookie | timeless@... | bugzilla.mozilla.org | Today    | 1/1/2005 |H|
|  *evil                     |H|cRun_once     | Mozilla1.5   | www.mozilla.org      | 10/1/2003| 1/1/2005 |H|
|  *www                      |H|              |              |                      |          |          |H|
| +yahoo.com                 |H|              |              |                      |          |          |H|
| +zdnet.com                 |H|              |              |                      |          |          |H|
|____________________________|V|______________|______________|______________________|__________|__________|V|
Ideally the interface would expose a find feature but I'm not going to spec that here for the time being, simply being able to sort and key navigate the server list would be a vast improvement.

So what could you do from a manager? You should be able to move hosts into or out of white or black lists. You should be able to delete any item, change most of its fields, and possibly add your own values.

How easy should it be to do those tasks?

Task: Delete

Delete should be possible by using the <delete> key on the keyboard, dragging the item to a trash container where applicable (Mac OS), context clicking and selecting delete. It probably wouldn't hurt to be able to show a toolbar which would host various functions including delete and search.

Task: Add

Adding an item should be harder since it's probably much rarer and sites might get upset if people randomly added fields to their private stores. For cookies, I'd suggest being able to drop a cookies.txt file into the listarea to import cookies, and possibly supporting the <insert> key to add a cookie.

Task: Modify

Modifying an item's values should be easier than adding, standard editing behaviors should work (f2 on windows, click to rename on Mac OS, context click rename).

What about images and other resources?

Well, they really should use the same interface.

What about white listing and black listing?

Well, the sample shown above actually handles that. All white and black listing rules for the affected server(s) are listed (+ for white, x for black, c is for cookie), to delete a rule you would use the same techniques as for any other item. To whitelist you'd probably click on the toolbar or context click on a server or whitespace, although there could be a keystroke (possibly + in the listpane). Similarly for blacklisting (with - as the listpane keystroke). To change an item from whitelist to blacklist (why in the world would anyone want to do that?) one would select the whitelist/blacklist value which would make it a listbox [White listed|v] and select the alternate value.

Could one manager be used to manage more than one type of object at the same time? Yes, in fact the sample already does that (cookie values and permission lists are two different types of things). The toolbar could easily allow the user to show/hide types (cookies, cache objects, images, history, *whatever*).

Will this work for 640x480 screens?

Yes, there are a few things to consider:

  1. xul will eventually get horizontal scrolling.
  2. until it does (and perhaps even after it does), we can hide the Date Set and Expires columns.
  3. The view tree and sort widgets really belong in a toolbar which buys a bit more space.
The manager would probably look more like this by default:
.___________________________________________________________________________.
|o Manage Cookies                                                       _= X|
+---------------------------------------------------------------------------+
|[ All |v][Cookies|v] Find: [                  |v] Wizard Cut Copy Paste Del|
+---------------------------------------------------------------------------+
|Hosts               | Name        ^| Value        | Site                 |v|
+---------------------------------------------------------------------------+

What's that wizard button do?

The wizard button would bring up a wizard to help the user make a rule. The wizard would let the user copy a rule from another site in addition to writing a rule from scratch. As long as this window is just cookies, the rule would be for whitelist / blacklist / expiration of cookies. If this manager ever supported images, it would support ... whitelisting and blacklisting images. If this manager supported popups, it would support whitelisting and blacklisting them (this would be an interim thing, I'd much rather have the rules be tied to my proposal for popups as suggested sites, at which point the wizard could offer rules like file bookmarks into some folder, in addition to allowing some sites to pop up windows). Adding support for cache to this manager wizard is left as an exercise for the future.