Live data from Hacker News

Make Better Select Boxes with Chosen

harvesthq.github.com

71–80 of 89 posts

Re: Make Better Select Boxes with Chosen

#71
post #31
post #28

Sorry but this experience is badly broken in iOS and highlights yet again why native controls are always preferable over custom controls for compatibility. Also, don't forget about enabling accessibility by using ARIA.

Similar on Android; the widget behaves perfectly, which is ironically a poor experience on mobile. Looks like it would be very nice on a desktop though!

Should these sorts of widgets be the default implementation of those types of controls in desktop browsers? As long as they can be done with the same input information, this sort of input seems like a "user preference" issue.

Re: Make Better Select Boxes with Chosen

#72

There is a newer project named Select2 now which handles remote data sets and offers infinite scrolling: http://ivaynberg.github.com/select2/ (Tried to submit it as a story the other day but zero upvotes.)

Thanks! This is considerably smaller than I expected it to be as well (7KiB minified) which is an acceptable size to chuck into our site.

Where did you get a 7KiB version from? If I download Select2, the select2.min.js file has 22KB

Re: Make Better Select Boxes with Chosen

#74
This is a great piece of software in terms of presentation and ease of use. However, it can make your life difficulty if you want to do anything outside of the scope that the authors intended. It's very difficult to build dynamic UIs with chosen select boxes because there's zero documentation of the code itself, which is what you'll be modifying if you want to do anything advanced. The devs did a good job building a select box, but a bad job making it extensible and documenting it.

Overall, I'd recommend it if your needs are simple, but you might be better off rolling your own or using another library if you need anything advanced.

Re: Make Better Select Boxes with Chosen

#75
post #53

These are sexy. If you are looking for ideas, it would be really cool to see an improved scrolling of some kind. Still feels 1.0 with the ugly blue scrollbar. Something like this but with softer colors: http://i.imgur.com/ixqa6.jpg

If you use Chrome or Safari on MacOS 10.8, they uses the new mini-scrollbar in the browser. Removing those old-fashioned scrollbars dramatically improves the look of web UI's.

Re: Make Better Select Boxes with Chosen

#76
post #44
post #29

Earlier quoted context omitted.

FYI, I had to go finding this the other day - it's tricky as mousing out removes the class. Anyway, it's: .chzn-container .chzn-results .highlighted

Leaving this here in case it helps someone: In Firebug, you can ask the :hover state to stay active. 1. HTML tab 2. Click on the element 3. Style menu on the right panel 4. choose :hover It tricks the browser into thinking the mouse is really over the element (i.e., it doesn't just add :hover), so if you have a hover class added via JS that should work too. (Apparently this feature has been there for a long time, but…

There is an icon to do the same in the CSS tab of chrome inspector

Re: Make Better Select Boxes with Chosen

#77

There is a newer project named Select2 now which handles remote data sets and offers infinite scrolling: http://ivaynberg.github.com/select2/ (Tried to submit it as a story the other day but zero upvotes.)

I had some trouble viewing data members that were longer than the select box, they would wrap down to a second line and overlap the next entry. I also could not use the mouse to scroll through the list and using the up and down arrows was sluggish. I am dealing with a very large list, but the original chosen seems to handle it pretty well.

Re: Make Better Select Boxes with Chosen

#78
post #69
post #53

These are sexy. If you are looking for ideas, it would be really cool to see an improved scrolling of some kind. Still feels 1.0 with the ugly blue scrollbar. Something like this but with softer colors: http://i.imgur.com/ixqa6.jpg

What ugly blue scrollbar? Do you mean your OS native scrollbar?

Yes.

Re: Make Better Select Boxes with Chosen

#80
post #72

Earlier quoted context omitted.

Thanks! This is considerably smaller than I expected it to be as well (7KiB minified) which is an acceptable size to chuck into our site.

Where did you get a 7KiB version from? If I download Select2, the select2.min.js file has 22KB

select2-2.0.zip contains a file select2.min.js which is 7KiB gzipped (it's 22KiB uncompressed). I should have stated that was the compressed size.
Post reply on HN