Live data from Hacker News

Chosen: A javascript plug-in that makes long select boxes user-friendly.

harvesthq.github.com

31–40 of 81 posts

Re: Chosen: A javascript plug-in that makes long select boxes user-friendly.

#33
The UI widgets like this all have the same defects:

1. They are slow, as all their markup has to be generated on the client side each time the page loads

2. They are not ajax friendly. I mean that if you insert a select box in a HTML document with javascript, it will remain a plain native select box unless your script specifically calls the right widget's function. So you have to update all your scripts.

3. They are not drop-in replacements for native widgets, all your script must know how to handle these widgets for things like getting the widget's value, listening for events, etc.

Points 1 and 2 could be fixed by generating the widget's HTML code on the server side and using delegated events (like jQuery's delegate()). (Progressive Enhancement can still be achieved without doing _everything_ on the client side.)

Other than that, the idea of a text input on the top of the options list is awesome.

Re: Chosen: A javascript plug-in that makes long select boxes user-friendly.

#34

Apparently Chosen takes the placeholder text from the select element's 'title' attribute; does it also support the official HTML5 syntax[1] for placeholder attributes in select elements? How about integration with jQueryUI's theming system? [1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/...

It'd be better if it looked for the HTML5 "placeholder" attribute even in older browsers rather than having to use "title" also. Some JS plugins [1] do this to replicate placeholder support in older browsers and I don't think there's any downside. [1] https://github.com/mathiasbynens/Placeholder-jQuery-Plugin

The trouble is that no version of HTML (currently) allows a "placeholder" attribute on a select element, even HTML5. If you want your pages to validate, @placeholder won't do the trick.

Re: Chosen: A javascript plug-in that makes long select boxes user-friendly.

#36

Earlier quoted context omitted.

It'd be better if it looked for the HTML5 "placeholder" attribute even in older browsers rather than having to use "title" also. Some JS plugins [1] do this to replicate placeholder support in older browsers and I don't think there's any downside. [1] https://github.com/mathiasbynens/Placeholder-jQuery-Plugin

The trouble is that no version of HTML (currently) allows a "placeholder" attribute on a select element, even HTML5. If you want your pages to validate, @placeholder won't do the trick.

Ah gotcha, wasn't thinking about s. Makes sense.

Re: Chosen: A javascript plug-in that makes long select boxes user-friendly.

#37
post #12

And yet another control that pretends to be a dropdown box, but isn't. No. I'm not complaining about the appearance or the fact that it has a search field while the real dropdown doesn't. I'm complaining about the way it responds to mouse actions: The real dropdown box, on my machine, expands the menu on mouse down after a no-doubt OS-specific delay. The fake dropdown doesn't - it only reacts on mouse up. Of course,…

Reminds me vaguely of the uncanny valley[1]. Not a perfect analog, as nearly-human forms seem to elicit a particularly strong and emotive response. I also do wonder to what extent, and for whom, this is true. (i.e., are power users more or less aggravated? When do people change from disliking the new FB chat window to being familiar enough with it to dislike it when you change it again?)

[1] http://en.wikipedia.org/wiki/Uncanny_valley

Re: Chosen: A javascript plug-in that makes long select boxes user-friendly.

#38
post #12

And yet another control that pretends to be a dropdown box, but isn't. No. I'm not complaining about the appearance or the fact that it has a search field while the real dropdown doesn't. I'm complaining about the way it responds to mouse actions: The real dropdown box, on my machine, expands the menu on mouse down after a no-doubt OS-specific delay. The fake dropdown doesn't - it only reacts on mouse up. Of course,…

My problem with this is that when I see the box (e.g. Multiple Select), I perceive it as a text input. I'd be ill-surprised to discover on a site to (all of a sudden) have this protruding box appear out of nowhere. Better solution: on mouse click, hide the box. Only show the box for autocompletes.

Hmm, it definitely is a learned experience. Some form of affordance here would really help clarify what will happen. You could add some placeholder text that says something like "click to add items", but that seems a bit like "turn knob to open door."

Re: Chosen: A javascript plug-in that makes long select boxes user-friendly.

#39

This project looks awesome. This stuff is annoying to have to replicate yourself, and I'm glad to see MooTools support as well. That said, my first reaction when looking at the first Country dropdown example was that I liked the native one better since in OS X it shows me dozens of choices at once (fills most of the screen vertically) and then in the "after" suddenly I was constrained to only seeing 7 countries at a…

It doesn't work well on Android either. The scrollbars don't appear, and unlike the normal Android behavior there is no zoom-in on the options to make them easier to select with a touch. These are probably fixable issues, but I think I agree that the device's native control is going to be better.

Re: Chosen: A javascript plug-in that makes long select boxes user-friendly.

#40

This project looks awesome. This stuff is annoying to have to replicate yourself, and I'm glad to see MooTools support as well. That said, my first reaction when looking at the first Country dropdown example was that I liked the native one better since in OS X it shows me dozens of choices at once (fills most of the screen vertically) and then in the "after" suddenly I was constrained to only seeing 7 countries at a…

> "Apple did a good job with s on iOS and this completely breaks it."

It's not always the best solution. When you have a drop down with many choices it's very hard to go to a certain spot by just scrolling.

On a computer, you can drag the scroll bar or start typing.

Anyway, good to know that it breaks iOS.

Post reply on HN