Currently, if a taxonomy is set to "Hierarchy: Disabled", the HS module ignores adding the HS widget to the vocab selector. The widget is such a nice UI experience that I'd like to be able to enable it even for taxonomies that aren't hierarchical. Maybe it could render using the flatlist style?

CommentFileSizeAuthor
#1 284485.patch2.05 KBwim leers

Comments

wim leers’s picture

Status: Active » Postponed (maintainer needs more info)
StatusFileSize
new2.05 KB

I suppose you want to use it just for the dropbox then? I've been thinking about this too.

But you are aware that it won't be very scalable, right?

In fact, no changes at all would be necessary, only remove the hierarchy check. I've attached a patch that does this, please give it a try :)

jrbeeman’s picture

Status: Postponed (maintainer needs more info) » Reviewed & tested by the community

Patch works for me. The UI experience ends up being a little weird with a single-level list, as it attempts to find children of the selected item and therefore greys out the selection for a moment (I think this is the scalability issue you're mentioning, as it performs additional server hits), but the bonus of a consistent, and nice user experience is worth the trade-off, in our case. This seems to be a usability improvement for admins, as well, because I think most admins will believe that checking the HS box to enable it will do so, regardless of whether the taxonomy is set to be hierarchical.

wim leers’s picture

Agreed on everything you said.

Except for one. The scalability issue I was referring to, is that when you have a huge single-level vocabulary (say 10,000 terms), this'll be very slow. But that's up to the site maintainer: he should make it a hierarchy then!

I agree that HS should be smarter: it should only try to update when it's known that an item has children. I created an issue for that: http://drupal.org/node/284739.

Will commit this later today. Thanks for testing!

wim leers’s picture

Assigned: Unassigned » wim leers
Status: Reviewed & tested by the community » Fixed

Committed a slightly improved patch!

jrbeeman’s picture

Fantastic, thanks!

Anonymous’s picture

Status: Fixed » Closed (fixed)

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