New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[META] [UX] Select2 / SelectWoo in core #3069
Comments
Looking at the repos it seems like select2 is being updated so perhaps it's now more accessible than it was. By "repos" I mean the JS libraries for select2 and selectwoo on github. |
Between May 2018 when we started this issue and now, our Drupal brethren have taken the time to evaluate the various libraries out there (thank you for your efforts @bbenjamin ❤️ ). See all the "Evaluation" links in the issue summary at https://www.drupal.org/node/2346973 Although no specific library has been selected yet for long select lists + multi-select, for things like entity reference fields and paths they've chosen to replace jQuery autocomplete with https://leaverou.github.io/awesomplete (because jQuery UI is being deprecated). See this separate issue about that: https://www.drupal.org/project/drupal/issues/3076171 and the META/roadmap: https://www.drupal.org/project/drupal/issues/3089455 Executive summary:
...interesting:
...even more interesting:
🤷 |
...another interesting quote from @quicksketch back in 2015:
|
...and another one:
|
Accessibility report from the WordPress folks: https://make.wordpress.org/accessibility/2015/09/07/accessibility-usertest-select2 ...end respective issue opened about it in the Select2 issue queue: select2/select2#3744 (still open since 2015, but there seems to be activity throughout the years) |
So yeah, it pretty much seems that either Select2, or a custom solution based on https://react-select.com have the most support for use in long select lists. https://leaverou.github.io/awesomplete is considerably smaller and less complex, but that's because it intentionally does less (that's why it has been selected to specifically replace the jQuery autocomplete - nothing else):
|
So the options are to choose one clunky library to replace everything, or
lots of little ones to replace each individual thing? I'd vote for the
latter: a small thing for autocomplete, and a small thing for select, and
other things in other places where we use jQuery UI.
…On Fri, Jul 31, 2020, 9:39 AM Gregory Netsas ***@***.***> wrote:
So yeah, it pretty much seems that either Select2, or a custom solution
based on https://react-select.com have the most support for use in long
select lists. https://leaverou.github.io/awesomplete is considerably
smaller and less complex, but that's because it intentionally does less
(that's why it has been selected to specifically replace the jQuery
autocomplete - nothing else):
Awesomplete has fewer features than the other candidates, which makes
sense as most of them are designed to enhance select elements, not just be
autocomplete. A quick scan of Select2 shows all sorts of nice features that
simply aren't needed for autocomplete.
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#3069 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AADBERZ6MXAE6D42I3D7PFDR6LXURANCNFSM4E5VCGOA>
.
|
Well yeah. It's just that the favorites for select already do what awesomplete does, so we'd have two libraries that accomplish the same thing. It does make sense for forms that only have an autocomplete (they will need to load only the small, autocomplete-specific library; so performance++); and the same goes for forms that only have a select. But on forms that have autocompletes as well as selects, we'd be loading both libraries, when the single select library would suffice 🤷 |
Glad my multiselect research was helpful! One of the reasons for reconsidering Awesomplete is that much of the functionality it provides will be available in a new render element, Splitbutton, which is pretty close to getting in core . The most recent patch at the time I type this is here: https://www.drupal.org/project/drupal/issues/1899236#comment-13767381. It was originally intended to just be a dropbutton replacement, but we've been able to build it in a way that accommodates many different uses, as there are many use cases that require toggleable lists of items. For example, Splitbuttons can function as a (fully accessible) select by simply adding a It might be worth exploring the same thing we are with autocomplete in Drupal 9: weighing the pros and cons of a third party library vs a custom solution based on Splitbutton. I think most of Splitbutton can be refactored for Backdrop pretty easily, and offers the added benefit of being able to replace dropbuttons with it. |
Describe your issue or idea
There's been a number of comments over the years about adding a multi-select library to core to improve the UX in a variety of ways. I'll link the related issues below and provide a few pullquotes:
Other ideas and existing issues that reference
select2
:Abandoned (incomplete?) port of the Drupal Select2 module may provide a place to start via Replace UI autocomplete with Select2 #459 (comment) :
https://github.com/backdrop-contrib/select2
Comment from @jenlampton on [UX] Remove multi-select list form elements from core by switching to Select2 #1800 (comment) RE: the
SelectWoo
fork that may be better from an accessibility standpoint:(Triaged as possible accessibility issue on 08/17/2921. This one only seems to have come up because of possible accessibility issue with the suggested libraries, please add the [A11Y] tag if you think that this is an accessibility issue.)
The text was updated successfully, but these errors were encountered: