WARNING: This blog contains random thoughts on technology, software engineering, and general all-round nerdery. Read at your own risk. Nerd is contagious.

Friday, March 24, 2006

Boxely Autocomplete Changes

Ah, autocomplete. Such a simple great idea, yet you have to get it just right for it to be a good experience. I've been making small changes to Boxely's aolSmartInput gadget (and related objects) to make it a better experience than what we have now.

I've added a delay before lookup is invoked. Previously it would autocomplete on *every* character typed, immediately. Adding a small delay allows the user to type quickly into the autocomplete, and as soon as they stop typing to run the lookup. The delay is something small, like 250ms, and is used only when the popup is not already displayed.

I've also added some preliminary support for returning richer results from an app. Right now, I've added another third parameter to the call back registration (defaults to 0 if you dont supply it):

attachStringLookupCallback(context, handler, lookupType)

If lookupType is 0, then the smartInput will call you back, expecting a javascript array of strings. If lookupType is 1, it expects a javascript array of struct-like javascript objects. Currently the object has 2 properties, displayText and value. This allows the app to display something such as: "John Doe " but insert "johndoe@aol.com."

Mail composition is a big user of autocomplete, so I've been looking at the Thunderbird Autocomplete Specs, which have been very useful. I'm considering support for icon and tooltipText for each match.


Blogger Sree Kotay said...

Custom UI is hhhharrrdddd. There are tons of details and it takes a good while to get right.

Glad to see you're spending lots of toolkit tweaking time.

11:01 AM


Post a Comment

<< Home