Once upon a "gmail" PubSub RSS Feed, I stumbled upon Brian's contest. I figured this'd make a fun late-nights project. And it was! Turns out, I won too. :) Thanks Brian!
I'm not planning to dump out the code, as it'd be of little interest to developers out to have their own fun.
A more interesting exercise would be to elaborate on Brian's requirements and explore in more details some of the use cases Google's paid attention to, in random "order" for now:
- properly handling comma-delimited lists while preserving carriage returns users may enter after each entry.
- after the last entry's following-comma, hitting the delete key should bring back the helper with the one matching selection, entirely bolded, while each character gets un-bolded upon subsequent delete key presses
- clicking outside the textarea makes the helper go away. clicking back inside, brings it back
- a user needs to be able to pick a suggested entry using keyboard up and down arrows, or using the mouse
- when pressing the up arrow to cycle thru the various suggestions, the cursor must always stay put, at the end of input box. This is important as this gives a user the ability to keep typing letters even after cycling thru suggestions.
- ... there's much more, which I'll try to cover in subsequent updates. Feel free to participate in comments, below
Feel free to grace my insignificant blog with your thoughts n' questions in comments below.