Bug 13501 - Allow autocompletion on drop-down lists
Summary: Allow autocompletion on drop-down lists
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: master
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Julian Maurice
QA Contact: Testopia
URL:
Keywords:
Depends on:
Blocks: 17780 17817 17988 18422 18706 21148
  Show dependency treegraph
 
Reported: 2014-12-30 14:49 UTC by Julian Maurice
Modified: 2018-08-02 12:46 UTC (History)
10 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Text to go in the release notes:
Version(s) released in:


Attachments
Bug 13501: Add jQuery UI plugin combobox (6.25 KB, patch)
2014-12-30 14:51 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Use combobox plugin on cataloguing and batch items edit pages (2.97 KB, patch)
2014-12-30 14:51 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Use combobox plugin on cataloguing and batch items edit pages (3.21 KB, patch)
2015-01-02 09:34 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13501: Add jQuery UI plugin combobox (6.42 KB, patch)
2015-01-02 09:37 UTC, Marc Véron
Details | Diff | Splinter Review
Bug 13501: Use combobox plugin on cataloguing and batch items edit pages (3.21 KB, patch)
2015-01-02 09:38 UTC, Marc Véron
Details | Diff | Splinter Review
[PASSED QA] Bug 13501: Add jQuery UI plugin combobox (6.41 KB, patch)
2015-01-02 15:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
[PASSED QA] Bug 13501: Use combobox plugin on cataloguing and batch items edit pages (3.17 KB, patch)
2015-01-02 15:58 UTC, Kyle M Hall
Details | Diff | Splinter Review
Bug 13501: Add JS library select2, use it on cataloguing and batch items edit pages (81.14 KB, patch)
2015-06-26 12:25 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Add JS library select2, use it on cataloguing and batch items edit pages (81.19 KB, patch)
2015-06-29 07:02 UTC, Josef Moravec
Details | Diff | Splinter Review
Bug 13501: Indentation fix (batchMod-edit.tt) (8.14 KB, patch)
2015-10-30 15:50 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Move "Required" and checkbox after input/select (2.18 KB, patch)
2015-10-30 15:50 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Downgrade Select2 to version 3.5.4 (173.22 KB, patch)
2015-10-30 15:51 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Add JS library select2 3.5.4 (98.04 KB, patch)
2015-10-30 15:55 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Indentation fix (batchMod-edit.tt) (8.14 KB, patch)
2015-10-30 15:56 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Move "Required" and checkbox after input/select (2.18 KB, patch)
2015-10-30 15:56 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Move "Required" and checkbox after input/select (2.23 KB, patch)
2015-12-23 23:01 UTC, Aleisha Amohia
Details | Diff | Splinter Review
Bug 13501: Add JS library select2 3.5.4 (93.70 KB, patch)
2016-02-25 09:32 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Indentation fix (batchMod-edit.tt) (8.19 KB, patch)
2016-02-25 09:33 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Move "Required" and checkbox after input/select (2.23 KB, patch)
2016-02-25 09:33 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Add JS library select2 3.5.4 (93.71 KB, patch)
2016-08-19 13:35 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Indentation fix (batchMod-edit.tt) (8.19 KB, patch)
2016-08-19 13:35 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Move "Required" and checkbox after input/select (2.23 KB, patch)
2016-08-19 13:35 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Highlight select2 control if field is required and value is missing (1.51 KB, patch)
2016-08-19 13:35 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Fix behavior of 'Delete subfield' button on select2 controls (964 bytes, patch)
2016-08-19 13:35 UTC, Julian Maurice
Details | Diff | Splinter Review
Bug 13501: Add JS library select2 3.5.4 (94.16 KB, patch)
2016-08-22 11:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13501: Indentation fix (batchMod-edit.tt) (8.26 KB, patch)
2016-08-22 11:02 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13501: Move "Required" and checkbox after input/select (2.30 KB, patch)
2016-08-22 11:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13501: Highlight select2 control if field is required and value is missing (1.58 KB, patch)
2016-08-22 11:03 UTC, Jonathan Druart
Details | Diff | Splinter Review
Bug 13501: Fix behavior of 'Delete subfield' button on select2 controls (1.01 KB, patch)
2016-08-22 11:03 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Julian Maurice 2014-12-30 14:49:31 UTC
Some users have very long lists of authorised values.
It could be painful to pick a value in such lists with a simple drop-down list.
Following patches will allow to type some text in order to filter these values and pick the good one easily.
Comment 1 Julian Maurice 2014-12-30 14:51:06 UTC Comment hidden (obsolete)
Comment 2 Julian Maurice 2014-12-30 14:51:09 UTC Comment hidden (obsolete)
Comment 3 Marc Véron 2015-01-02 09:34:07 UTC Comment hidden (obsolete)
Comment 4 Marc Véron 2015-01-02 09:37:15 UTC Comment hidden (obsolete)
Comment 5 Marc Véron 2015-01-02 09:38:27 UTC Comment hidden (obsolete)
Comment 6 Kyle M Hall 2015-01-02 15:58:18 UTC Comment hidden (obsolete)
Comment 7 Kyle M Hall 2015-01-02 15:58:27 UTC Comment hidden (obsolete)
Comment 8 Kyle M Hall 2015-01-02 16:00:01 UTC
Looks good, but could perhaps use some styling, as the box is the same color as the background on the edit items page. Of course, it used to be the same color as the background on the edit record page, so it's kind of a wash in that respect ; )
Comment 9 Owen Leonard 2015-01-02 16:03:34 UTC
I think this is a useful enhancement, but I think in its current state it removes some of the built-in usability of a default HTML dropdown. The new dropdown has a fixed width, which in my system means it is not wide enough to show the complete description for some of my codes. After I have selected an item from the dropdown, I expect to be able to see the full description of the selected item by opening the dropdown again. In a <select>, expanding a dropdown with a selected item will scroll the list to the selected item and show it highlighted. In this version it expands the list but doesn't scroll or indicate in any way that it was selected.

I think those are issues which ought to be addressed.

It works fairly well with keyboard navigation, but it now takes more clicks to choose an item via keyboard.

Old: Tab to <select>, type the first letters of the item you're looking for. Item is selected.

New: Tab to combobox, type the word you're looking for. Use arrow key to select the item you want.

That may not be a deal-breaker for the feature, but I know the different will be noticeable to catalogers.

Another problematic difference: After you select an item from the list, if you hit ENTER the form submits. We have been working to eliminate that behavior from forms in Koha, so I would consider it a regression to introduce a feature that brings it back.
Comment 10 Julian Maurice 2015-06-26 12:25:02 UTC Comment hidden (obsolete)
Comment 11 Julian Maurice 2015-06-26 12:26:55 UTC
Select2's selects behaviour is closer to native selects and I think it addresses all Owen's issues.
Comment 12 Josef Moravec 2015-06-29 07:02:27 UTC Comment hidden (obsolete)
Comment 13 Jonathan Druart 2015-07-09 11:53:13 UTC
I would like to get another signoff to confirm that the concerns raised in comment 11 are fixed.
Comment 14 Koha Team University Lyon 3 2015-09-03 11:48:15 UTC
Tested in cataloguing (edit and new record/item) and also in batch modification.
I had a filter where I can type a part of the authorized value : it works as expected. I can also use the dropdown to select a value and this one is highlighted when I'm on it.
When choosing a value in the list, I can see the full description but after have chose, long descriptions are cut (We can have full description when passing mouse over).

When using keybord, I have to use enter to select a value.

For what I see, this feature works only in cataloguing (I haven't understand at the beginning because I didn't see it in the description). It would be wonderful if we can also have it in acquisitions or patrons)

For me, it works functionnaly so I will sign it off but I can't answer to Owen's questions about regresion.
Sonia
Comment 15 Jonathan Druart 2015-09-16 11:51:33 UTC
Tested on batchMod.pl:

1/ The "required" is before the select.
2/ After selecting a value, the description is truncated (see comment 9).

3/
(In reply to Owen Leonard from comment #9)
> Old: Tab to <select>, type the first letters of the item you're looking for.
> Item is selected.
> 
> New: Tab to combobox, type the word you're looking for. Use arrow key to
> select the item you want.

Still valid.
Maybe something like http://stackoverflow.com/questions/20989458/select2-open-dropdown-on-focus

4/ Add the new JS plugin to the about page.

Marked as Failed QA.
Comment 16 Julian Maurice 2015-10-30 15:50:53 UTC Comment hidden (obsolete)
Comment 17 Julian Maurice 2015-10-30 15:50:56 UTC Comment hidden (obsolete)
Comment 18 Julian Maurice 2015-10-30 15:51:00 UTC Comment hidden (obsolete)
Comment 19 Julian Maurice 2015-10-30 15:55:53 UTC Comment hidden (obsolete)
Comment 20 Julian Maurice 2015-10-30 15:56:03 UTC Comment hidden (obsolete)
Comment 21 Julian Maurice 2015-10-30 15:56:08 UTC Comment hidden (obsolete)
Comment 22 Aleisha Amohia 2015-12-23 23:01:06 UTC Comment hidden (obsolete)
Comment 23 Jonathan Druart 2015-12-26 11:56:24 UTC
Aleisha, you have only signed off the last patch, could you confirm you have tested the whole feature?
Comment 24 Aleisha Amohia 2016-01-13 00:00:17 UTC
(In reply to Jonathan Druart from comment #23)
> Aleisha, you have only signed off the last patch, could you confirm you have
> tested the whole feature?

Yes I have! sorry, meant to sign off on all of the patches
Comment 25 Jonathan Druart 2016-01-13 10:29:04 UTC
Owen, I would like to get your signoff on this one.
I am ready to pass QA it as I think the behavior is consistent and it could be very useful for users.
Comment 26 Jonathan Druart 2016-01-13 10:31:18 UTC
Julian, maybe it would be better to use a minified version of select2.css.
Comment 27 Julian Maurice 2016-02-25 09:32:42 UTC Comment hidden (obsolete)
Comment 28 Julian Maurice 2016-02-25 09:33:00 UTC Comment hidden (obsolete)
Comment 29 Julian Maurice 2016-02-25 09:33:23 UTC Comment hidden (obsolete)
Comment 30 Jonathan Druart 2016-03-03 09:36:05 UTC
When editing a biblio, if a field is required it's highlighted.
With your patch, the highlight does no longer appear. Could you have a look?
Comment 31 Owen Leonard 2016-04-06 17:05:24 UTC
Jonathan I don't think I see what you're seeing. Could you provide more details?
Comment 32 Jonathan Druart 2016-04-07 10:10:01 UTC
(In reply to Owen Leonard from comment #31)
> Jonathan I don't think I see what you're seeing. Could you provide more
> details?

Steps to recreate:
- Mark a subfield as required in your default (or whatever) biblio framemwork
- Link it to an authorised value list (to get the dropdown list), LANG for instance
- Edit a biblio
- Do not fill (or delete the subfield if already filled)
- Save
You will get an alert "Can't save this record because the following field aren't filled:"
And the not filled mandatory fields should be highlighted. With this patch, they are not.
Comment 33 Jonathan Druart 2016-04-07 10:11:03 UTC
And just found another bug: If you click on the "Delete subfield" icon, it won't behave as before, the empty entry is not added and selected.
Comment 34 Julian Maurice 2016-08-19 13:35:31 UTC Comment hidden (obsolete)
Comment 35 Julian Maurice 2016-08-19 13:35:36 UTC Comment hidden (obsolete)
Comment 36 Julian Maurice 2016-08-19 13:35:41 UTC Comment hidden (obsolete)
Comment 37 Julian Maurice 2016-08-19 13:35:45 UTC Comment hidden (obsolete)
Comment 38 Julian Maurice 2016-08-19 13:35:49 UTC Comment hidden (obsolete)
Comment 39 Julian Maurice 2016-08-19 13:36:58 UTC
Patches rebased on master + 2 more patches for comment 32 and comment 33
Comment 40 Jonathan Druart 2016-08-19 15:52:23 UTC
(In reply to Julian Maurice from comment #37)
> Created attachment 54637 [details] [review] [review]
> Bug 13501: Highlight select2 control if field is required and value is
> missing

Are you sure you want to remove select2.min.css?
Comment 41 Julian Maurice 2016-08-22 06:42:20 UTC
(In reply to Jonathan Druart from comment #40)
> (In reply to Julian Maurice from comment #37)
> > Created attachment 54637 [details] [review] [review] [review]
> > Bug 13501: Highlight select2 control if field is required and value is
> > missing
> 
> Are you sure you want to remove select2.min.css?

I didn't remove select2.min.css, I added a new file select2.css for custom CSS related to select2
Comment 42 Jonathan Druart 2016-08-22 11:02:54 UTC
Created attachment 54674 [details] [review]
Bug 13501: Add JS library select2 3.5.4

use it on cataloguing and batch items edit pages

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 43 Jonathan Druart 2016-08-22 11:02:59 UTC
Created attachment 54675 [details] [review]
Bug 13501: Indentation fix (batchMod-edit.tt)

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 44 Jonathan Druart 2016-08-22 11:03:03 UTC
Created attachment 54676 [details] [review]
Bug 13501: Move "Required" and checkbox after input/select

Signed-off-by: Aleisha <aleishaamohia@hotmail.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 45 Jonathan Druart 2016-08-22 11:03:08 UTC
Created attachment 54677 [details] [review]
Bug 13501: Highlight select2 control if field is required and value is missing

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 46 Jonathan Druart 2016-08-22 11:03:12 UTC
Created attachment 54678 [details] [review]
Bug 13501: Fix behavior of 'Delete subfield' button on select2 controls

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 47 Jonathan Druart 2016-08-22 11:03:46 UTC
(In reply to Julian Maurice from comment #41)
> (In reply to Jonathan Druart from comment #40)
> > (In reply to Julian Maurice from comment #37)
> > > Created attachment 54637 [details] [review] [review] [review] [review]
> > > Bug 13501: Highlight select2 control if field is required and value is
> > > missing
> > 
> > Are you sure you want to remove select2.min.css?
> 
> I didn't remove select2.min.css, I added a new file select2.css for custom
> CSS related to select2

Sorry I have misread the diff, everything is fine!
Comment 48 Kyle M Hall 2016-09-02 17:26:56 UTC
Pushed to master for 16.11, thanks Julian!
Comment 49 Jonathan Druart 2016-12-28 10:38:38 UTC
I have proposed on bug 17817 to temporarily deactivate this feature as it introduced important issues.
Comment 50 Mason James 2017-01-25 00:22:52 UTC
Enhancement, skipping for 16.05.x