Chosen: A javascript plug-in that makes long select boxes user-friendly.
harvesthq.github.com
harvesthq.github.com
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, you can't make a a control work exactly like its native counterpart - but that IMHO just means that you shouldn't even try imitating them and provide its own unique look.
I really dislike nearly-native controls - they feel wrong to me.
But don't get me wrong: The controls are really cool and incredibly useful. If only they didn't try to mimic the native look without quite matching it.
Better solution: on mouse click, hide the box. Only show the box for autocompletes.
Try mouse scrolling too far whilst the menu's options are open/visible. The parent page scrolls as well when you reach the start/end. This doesn't happen with a normal select menu.
I wonder if there's a way to do an event.preventDefault() on the mouse scroll event when reaching the end of the list?
In some cases, like upgrading from Snow Leopard to Lion or Windows XP to Windows 7, the users adapt to the change. This is not likely to happen for a Javascript contro that is not in use on any major sites.
The search for "Tax" yields result, but nothing for "Estates". I think it doesn't work for first word if the term contains a space.
EDIT: was testing on Firefox 5, works on Opera. Bug filed: https://github.com/harvesthq/chosen/issues/50
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 time. Not a huge deal but felt like a loss in usability (but a gain visually). If the faux dropdown was just a little taller in height it'd be better.
Secondly, this just killed iPhone support. Apple did a good job with <select>s on iOS and this completely breaks it. It should just turn itself off on iOS.
Agreed. Also, when a user has to access both your desktop and mobile apps, the experience has to be the same. This plugin, however nice, is trying to solve a problem by further modifying the problematic feature. Just remove the select if your list is too long; there should really only be a handful of options contained within. As a rule, I keep it to five and I never replace the pseudo element with plugins.
One aside is the convention of time/date/location that you'll find everywhere. For whatever reason someone needs to capture the information from the Andorrans to the inhabitants of Wallis and Futuna. I can't fight people that include over 200 options for countries and territories when this info could be ascertained and captured via other methods, but people already have a mental map of where their options are in these lists, so if you really need to, then go ahead. iOS has the best solution for this. Also, a select is a part of CRUD, so please don't use it for navigation.
The solution that I like to employ is an unordered HTML list, with the items bricked in equal size, separated uniformly right and bottom and floated left. You can see this when you look at Google+'s circles. The user knows to read from left to right (assuming western conventions) and can navigate top to bottom with the ease of the mouse without making commitments. I currently do this with a list of ~250 options and employ ajaxy magic to capture the user's actions. I assist the user by alphabetizing the list so that they'll be able to mentally map their position as well as curated and separately displaying the most popular option at the top of the list, much like US-based website will do when displaying "United States" as the first option in their select. If displaying on a mobile device, I would recommend displaying in a one-column list; if a user can navigate Twitter, they'll have no problem with scrolling down to find their selection because they've already been trained to do so and it'll come as second nature. (which is why is good practice to adopt conventions from popular applications. Why fight it?)
Another option that I've found helpful i to employ pathways when too many options with similar names can cloud the user's mental map. It's ok to break up a form into logical step-by-step pieces. You gain the user's trust by preempting tedious actions. Intersticial pages, not pop-ups, are ok if the user understands where you are taking them and for the tricky parts, some reassuring copy can do the trick. People read; just go through Amazon's checkout process a couple of times over the course of a week. You may forget a step, but they're right there to help you without employing navigation or CRUD devices on the screen.
tl;dr: just put the options in a list as ajax buttons or checkbox-activated text. Keep it simple and organized and don't play hide and go seek with the user.
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.
The multi-select is great, though. Why not make the single select work like the multiple?
Things I feel would make a lot of sense:
Collapsible trees. Numeric sliders (preferably done like draggable digits http://worrydream.com/Tangle/). Native drag-and-drop sipport for elements. (And yes, this can be done with plain forms. I can explain how if you want.) Native rich tooltips and a standard notation to show that something has a tooltip. Maybe tabs. I think you could do tabs with CSS, but I'm not 100% sure.
If most UI libraries have something, it probably would be a good addtion to HTML spec. It would work faster and eventually have better compatibility.
Apart from what it says, I do not see problems in IE7 or IE8 (there is some style issues in IE9, though). Also, it is nearly working in IE6. I think I'll try to diddle around with some z-index and CSS stuff to get it working. Can't be much more than that.
If you manage to fix it for other browsers I hope you push your fixes upstream.
For example, this converts a select menu to an input field. On iOS the keyboard comes up instead of the select control.
On the desktop the element still feels like a <select>. On the iPhone it feels nothing at all like a <select>
How about integration with jQueryUI's theming system?
[1]: http://www.whatwg.org/specs/web-apps/current-work/multipage/...
[1] https://github.com/mathiasbynens/Placeholder-jQuery-Plugin
I'd be impressed if it does. I can't parse that sentence in the spec.
<select required>
<option value="">Placeholder Text Here</option>
<option value="1">first real option</option>
</select>
The rest of the text basically says that select elements that are not required don't have placeholder text; that select elements that allow multiple selections don't have placeholder text; multi-line select elements don't have placeholder text, and that if the first option is inside an optgroup element, it doesn't count as placeholder text.If I click on a dropdown box, I can already type the value on my keyboard to select it. No javascript necessary.
(using chromium on ubuntu)
This is currently only supported by Firefox Opera. A JavaScript polyfill to get this working in other browsers would be great.
It's way simpler for the average user.
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.
I really like the multi-select control.
https://github.com/gk777/Easy-List-Select
Unfortunately, I don't think it's as good as I thought it would turn out to be, but it's definitely neat.
EDIT: it's a chrome extension BTW
Beautiful plugin, bookmarking for definite future use.