View
 

MultiCheckboxPicker

Page history last edited by Todd Parker 2 years, 9 months ago

ghtly 

type: widget

release: 0.0

priority: high || medium || low

status: in planning || in development || complete

documentation: url || N/A

demo: url || N/A

 


 

1 - Description:

 

For situations where there is a long list of checkboxes for a user to select (>20 items), it can become difficult for a user to keep track of which items have been chosen because they may be scrolled out of view. This widget starts with a simple list of checkboxes and through prgressive enhancement, adds the ability to:

  •  check all and uncheck all
  • sum the total number of options
  • sum the total number of checked options
  • display a list of the currently selected values with a remove link next to each which unchecks the item

 

This can be used as a flat list or a list grouped by accordians or a tree structure. For these hierarchical options, we can also provide a sum of the number checked within each section and a 'check all' link to make these easy to manage.

 

A mutli-select list picker was coded based on PE and a multi-select. It uses the CSS framework and has a lot of the features described here except it can't be used with a list of checkboxes in it's current form:

http://quasipartikel.at/multiselect_searchable/

 

Therefore the new version lives in a separate "searchable" branch at

Github. http://github.com/michael/multiselect/tree/searchable

 


 

2 - Visual Design:

 

 


 

 

3 - Functional Specifications/Requirements:

 

(Detailed descrition of how the script will be structured: defaults, options, architecture, extensibility, etc.)

 


 

4 - Markup & Style:

 

     4.1 Initial markup examples

 

     (Pre-enhanced HTML markup structure that will be transformed into the final widget. There may be multiple possible HTML markup options per widget: for example, for a slider, radiobuttons, inputs or selects could all be used. )

 

     4.2 Recommended transformed HTML markup

 

     (The HTML markup structure and classes that will be used by the scripts in the enhanced version) 

 

     4.3 Accessibility recommendation

 

    (Detailed recommendations for ARIA, HTML markup, CSS and javascript that will contribute to universal access and full section 508 accessibility for screen readers, mobile devices and any other devices) 

 

     4.4 CSS & Theme

 

    (Description of the CSS classes to be used for all states, how custom theming and Themeroller support will work.) 

 


 

5 - Latest version of plugin:

 

(Link to the latest version in the jQuery UI trunk here)

 


 

6 - Open issues being discussed

 

(Use this area to place things that we're hashing out like featuresand options we're not sure we should include, questions about how this fits into UI and relates to other widgets and utilities, known problems, whether features should be broken across multiple releases, etc.)

 


 

 

 

 

Comments (11)

utopia said

at 8:23 pm on Dec 27, 2009

Should it have ajax support to add items to the list instead of transforming a large select which makes it slow.

Romans Malinovskis said

at 7:49 am on Dec 28, 2009

I was using selectable to implement checkboxes.

t.find('tbody').selectable({
stop: function(i){
$(this).children('.ui-selected').find('input').attr('checked',true);
$(this).children().not('.ui-selected').find('input').removeAttr('checked',true);
}
});

Eric Hynds said

at 5:21 pm on Feb 5, 2010

I took a crack at a multiselect plugin and would love to hear some feedback regarding it's practicality, design, usefulness, etc as a jQuery UI widget. http://www.erichynds.com/jquery/jquery-multiselect-plugin-with-themeroller-support/

My initial concern is scalability. The summary of this widget describes a scenario with hard-to-manage select boxes (20+ items), which my implementation doesn't address. At some point the widget will slow to a crawl, especially if the "check all" or "uncheck all" links are clicked. On the other hand, I think my design is more intuitive & practical for smaller select menus, so perhaps both have their place.

My other concern is with the visual design itself. If nestled in a form with regular inputs, will it look out of place and introduce a usability problem? Or am I trying to solve a problem that doesn't exist?

Thanks

Scott González said

at 8:36 pm on Feb 5, 2010

Hey Eric,

Here's some feedback based solely on the API:
- maxHeight: Could this be moved to CSS? Maybe have an extension that implements this option if necessary for browsers that don't support max-height CSS. This may not work out, but would be nice if it does.
- minWidth: Same comment as maxHeight.
- noneSelected: The name of the option doesn't make it clear that it controls text.
- selectedList / selectedText: Reduce to a single option that accepts a string or function. Supplying a function allows even more flexibility than the selectedList option.
- position: Can this be handled by CSS? I know we can handle placing tabs at the top or bottom of the panels via CSS.
- shadow: Can this be removed and applied by the user if they want it? We already have a shadow class in the CSS Framework.
- fadeSpeed: Rename to hide. Can support just a speed for fading for now; should eventually be expanded to fully support any effect.
- on*: Remove the on prefix and add accompanying events to the callbacks.

The plugin looks pretty nice. I did have some trouble using the keyboard. I couldn't open the menu using the keyboard (tried down arrow, space and enter) and using the arrows to navigate a menu once opened also scrolled the page. I was testing in Safari.

Ralph Whitbeck said

at 7:55 pm on Feb 5, 2010

Eric,

Very cool, I've been playing around with it in jsbin and found a couple of minor bugs.

minWidth should be a set size instead of auto. http://jsbin.com/multiSelect1

showHeader: false breaks the scrollbar http://jsbin.com/multiSelect2

I'll report more as I find them.

Looks good.

Ralph

Jaggi said

at 8:07 am on Feb 9, 2010

Just my input about a few issues or scenarios that i've come across using the quasipartikel multiselect that should be looked into by yours:

* i've noticed it doesn't have a search like the quasipartikel one, is this something your going to implement, i did find even on big lists this is still very quick.
* Another thing is that it should definetely have ajax support, firstly for the search box (if implemented).
* You should also expose some of the rendering functions. This is something i had to do with the quasipartikel one which is where i added a functionality to filter the data displayed in the list (e.g. mine was a member database so wanted to filter active/new/age/ etc handled by a seperate menu (menu plugin when its finished)). I had a ajax request call a php file which did the query based on my params sent through in the url and returned a data set which i then had to parse by exposing the rendering functions. Something like this would be nice by default.
* I've tested quasipartikel with about 1000+ items and although it is very slow (specially on check all/none) it did work eventually. i'm not sure on the best way to handle large datasets, maybe render the first 20 and then render them as someone scrolls might work. Definitetly something to take into consideration.

Eric Hynds said

at 7:52 am on Feb 11, 2010

Scott and Ralph, thanks for the feedback! The keyboard support is indeed limited at the moment. I love the idea of combining the selectedList and selectedText parameters with a function as an argument. I'll incorporate all these points as I widgetize it.

Jaggi, regarding the search, it would be nice, I'm just not sure how to fit that into the design as there is very limited space. This would work great if the menu was always 300px+ wide, but it inherits the width of the original select menu. I could put a search icon next to the close link which would reveal a search box when clicked, but I wonder if it would be noticed & used. The "infinite scroll" idea on the menu is definitely something to consider. I need to see at which point this thing begins to break down; another option is to change the design all together if the menu holds xx items, maybe something similar to quasipartikel's.

Jaggi said

at 8:05 am on Feb 11, 2010

Sorry think i got a little confused as to the layout you were using, i considered it to follow the layout in the image above which is what i would suggest as good option, i did see your link ( http://www.erichynds.com/jquery/jquery-multiselect-plugin-with-themeroller-support/ ) but i don't think that works on very long lists as it doesn't provide that much difference from a normal select menu and is more tedious. Your right you could do two layouts one for < 20 and then one similar to the one above for > 20 similar to quasipartikel's layout and that above in the screenshot.

If using a layout similar to the top one you might get away putting the search on the bottom of the layout in the right corner, i think it would work and should be in view as the layout image shows it as quite small. If your using the one you linked to then i wouldn't suggest a search box as i consider the layout too compact. Could you update the main post to reflect the current development process your taking.

Eric Hynds said

at 5:22 pm on Apr 14, 2010

Correct, it would not be practical for lists large enough that might warrant some kind of search functionality. But, for those following my implementation, the UI widget version is being developed in this repo: http://github.com/ehynds/jquery-ui-multiselect-widget

Eric Hynds said

at 3:16 pm on Jul 8, 2010

Jaggi and anyone else following this, I finally got around to porting my version of multiselect over to the widget factory: http://www.erichynds.com/jquery/jquery-ui-multiselect-widget/

aurelien gerits said

at 3:45 pm on Jul 8, 2010

Great, I'll test your widget

You don't have permission to comment on this page.