I'm not 100% sure if I want this feature or not, but I thought of it the other day when I was debugging CSS issues and figured I'd log it here.

Pros:
a) Would be much, MUCH faster for people using IE6 and other browsers where typing the first few letters of the thing doesn't automatically skip you down the list (or for users who use those other types of browsers who don't know of this functionality).
b) Would cut about 3M of HTML off the page. Seriously. ;P Thus probably would result in marginally faster load times of the issue pages.

Cons:
I think it'd end up actually being slower than what can be done in Firefox (and Opera, etc.), which is click on the drop-down, type the first 2-3 letters, and then Enter to select it. But probably not much slower once people get used to it.

Comments

dww’s picture

FYI: project_autocomplete() already exists (used by cvs.module) at path "project/autocomplete".
so, this should be quite trivial if you want to work on a patch. ;)

cheers,
-derek

p.s. if you're going to add this, my preference would be a setting that toggles the behavior, if that's not too much to ask... ;)

hunmonk’s picture

a much cooler implementation IMO would be to keep the select box, but add some ajax magic so the autocomplete happens within it. ie, you click on it, type 'pro', and it searches through and takes you to the first word starting w/ 'pro'.

although, the default select box action seems to be to always take you to the first word that starts w/ any letter you type -- i don't know if that can be overridden.

webchick’s picture

Well, Firefox does that already (highlighting the select box and typing 'pro' takes me to project). Not sure about other browsers, though... But I think overriding default browser behaviour is going to be more challenging, and we don't gain the benefit of the 1M of HTML being removed from download on the client side (if anything, we'll be adding more with the client-side JS to fix what should be browser-innate behaviour anyway...).

hunmonk’s picture

i'm not sure it's a good idea to take away the visible selection options. especially for the Drupal project, people may not know what to select unless they have a list to look at.

hunmonk’s picture

quick tests for searching in a select box by typing in the first X letters:

Opera, FF, IE7: you can type in 'proj' and it will take you to the project module. all browsers have some kind of internal timeout, so that if you type 'p', then wait, then type 'r', it will start your search w/ the r. they generally work well.

IE6: only allows searching by the first letter -- not very useful.

Safari: no matter what you type, even if you've selected something down the list, you get taken to the top of the list. boo...

here's a stab somebody else took at the feature i was suggesting: http://mikewest.org/archive/type-ahead-search-for-select-elements

i think the UI he has there is probably clunky for us, but i thought i'd at least put it here for reference.

aclight’s picture

greggles’s picture

If this is done, should it be:

1) Optional? Admin chooses on the settings page?
2) Can users override the preference?
3) "smart" (like OG) and if there are more than 50 projects it changes to autocomplete mode

dww’s picture

Status: Active » Postponed

Let's stop talking about an autocomplete-only solution until we get some agreement over in the other issue. In particular, check out my current (possibly insane) idea for a hybrid approach at #201435-16: Huge list of projects hard to use, consumes excessive d.o. bandwidth, can hang browser. ;) Thanks.

dww’s picture

Version: 5.x-2.x-dev » 6.x-1.x-dev
Status: Postponed » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.