[development] better autocompletion?

Jeremy Epstein jazepstein at gmail.com
Wed Apr 19 00:23:02 UTC 2006


Hi,

I'm not sure if this will be the right tool for the job in
comment_mover, but you should have a look at the activeselect module
(http://drupal.org/node/49976), which lets you link select boxes
hierarchically using AJAX. I don't really see how you can use a
hierarchy of select lists for comment moving, however, since nodes in
Drupal are not guaranteed to fall within any sort of classification -
by default they just exist in a 'big swimming pool'.

Perhaps you could use activeselect to browse hierarchically, first by
type, then by node, then by comment? (Assuming that you want users to
be able to move comments beneath specific other comments in a node,
rather than just 'moving them to a new node'). This would work, since
every node has one type (officially - excluding cases like event
module), and since every comment belongs in one node, and is
potentially the child of one other comment.

For the case of duplicate node titles, my advice is to not worry about
this, since it's too uncommon a use case to warrant making the
interface more complex.

Cheers,
Jaza.

On 4/18/06, Gerhard Killesreiter <gerhard at killesreiter.de> wrote:
> Hi there!
>
> I have a problem with autocompletion for selecting a node by title.
>
> This is a very noce methid to find a node, but the problem is that it is
> ambiguous. There might be several nodes by the same name. You can try to
> make it less ambiguous by adding the author's name and or the date, but
> only the node ID will do away with ambiguity. The problem is that the UI
> does not look really nice.
>
> I've thought about a way to transfer more information in the request,
> but this is problematic. After all an autcompletion field is just a
> textfield. Also, we need to keep non-JS browsers in mind and if I
> essentially require CSV data in the textfield this is a usability
> nightmare for these people. To process CSV data for select fields is
> also not much fun and error prone.
>
> Now, the following idea won't help non-JS browsers at all, but it will
> be helpful for JS-browsers. The idea is to store all the information
> about the selection made by the user in a session variable.
>
> You can already assign the available selections to a session variable
> after populating the array of matches. What is required is to make this
> information contain only the actual selected value. To this end the JS
> would need to run the autocompletion function one more time after the
> user has moved out of the select field.
>
> My questions are:
>
> 1) Is this possible?
> 2) Does anybody else consider this a good idea?
>
>
> Cheers,
>     Gerhard
>


More information about the development mailing list