News for hackers. Stuff that matters.
Re:Breaking down Amazon's mega dropdown by smackfu on Wednesday March 06, 2013 @11:54AM (#5332128)
If the right side box is very short, this algorithm gets a bit fussy. Not a problem for Amazon since their right side box is fixed height, but often a problem for menus where there is only one item in the sub-menu (usually because the sub-menu is programatically filled in.) You have to thread the needle moving your pointer to the right, because if you leave the line, it collapses the selection and selects the next item.

Even OS X has this issue, so if someone gets a good solution, they can beat Apple at their own game.

Re:Breaking down Amazon's mega dropdown by kamens on Wednesday March 06, 2013 @12:43PM (#5332457)
Agreed on the small submenu issue. I think this instant behavior makes the most sense when it's always the case that submenu.height() == menu.height().

Was pointed to http://michelf.ca/blog/2005/mac-sub-menus/ by @gecko this morning, which brings up the opposite (and legit) problem: very, very long submenus.

Mega dropdowns w/ equal submenu height are a nice use for this, though.

Re:Breaking down Amazon's mega dropdown by BoredAstronaut on Thursday March 07, 2013 @12:53PM (#5339017)
Single-item submenus and super-long submenus are to be avoided at all costs. They are not user friendly. The former has no reason for being -- put the contents in the parent menu as a sub-section. The latter is generally found in auto-generated lists, like lists of fonts or countries.

Usually a menu is a bad UI device for selecting from very long lists. Combo boxes are one alternative. Breaking contents up into chunks and adding another level to menu hierarchy is another possible solution. MS-style hiding rare choices is a third option.

Re:Breaking down Amazon's mega dropdown by McP on Thursday March 07, 2013 @01:40PM (#5339303)
Single-item submenus inevitably occur at some point if the submenu is filled out programatically (as smackfu pointed out). A list of recently open files is a good example. While it's possible to move the single item into the parent menu, that would make the menu confusingly inconsistent.
Re:Breaking down Amazon's mega dropdown by busted on Wednesday March 06, 2013 @12:45PM (#5332473)
I think part of making this solution intuitive is to make the submenu box a a fixed height that's equal to the first menu. It's what the author changed his menu to look like as well. Amazon got around having too much empty a space by adding pictures, and too many submenu options by adding a second column. If your submenu is so long that even 2 or 3 columns isnt' enough, it would have been too long for a single column anyway.
Re:Breaking down Amazon's mega dropdown by samatman on Wednesday March 06, 2013 @12:23PM (#5332306)
Set up the submenu system so in the event of a single line, it presents an invisible target, which is three lines high, with the submenu in the middle.