Bug 32261

Summary: Insufficient user feedback when selecting patron in autocomplete
Product: Koha Reporter: Jonathan Druart <jonathan.druart>
Component: Staff interfaceAssignee: Jonathan Druart <jonathan.druart>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: gmcharlt, jacob.omara, oleonard
Version: unspecified   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=32260
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
23.05.00,22.11.01
Circulation function:
Attachments: Bug 32261: Patron autocomplete - do not empty text field
Bug 32261: Add more UI feedback when selecting patron from autocomplete
Bug 32261: Patron autocomplete - do not empty text field
Bug 32261: Add more UI feedback when selecting patron from autocomplete
Bug 32261: Patron autocomplete - do not empty text field
Bug 32261: Add more UI feedback when selecting patron from autocomplete

Description Jonathan Druart 2022-11-18 08:52:05 UTC

    
Comment 1 Jonathan Druart 2022-11-18 08:57:49 UTC
Created attachment 144046 [details] [review]
Bug 32261: Patron autocomplete - do not empty text field

The jQuery UI autocomplete is supposed to replace the text field with
the 'value' attribute of the selected item. As it does not exist it's
emptied. We should not replace what the user typed in.

Test plan:
Go to the Koha home page
Select "Search patrons" in the header
Type 'edn', it will return 1 result
Use the down key to select the item (it is not obvious but there is a
little change in the color when you select the item)
=> Without this patch the search field is emptied
=> With this patch applied the search field is not modified
Comment 2 Jonathan Druart 2022-11-18 08:57:54 UTC
Created attachment 144047 [details] [review]
Bug 32261: Add more UI feedback when selecting patron from autocomplete

There is only a tiny change in the color of the selected item, but it's
not obvious.

Test plan:
Regenerate the css files using `yarn build`
Search for patrons and note that the down/up keys let you select a
patron and the background color change.
Note that the background color is not on the container and so is not
similar as the hover rule (when using the mouse). We could change that,
but then the behaviour is weird when you have both the mouse and the
keyboard selecting items in the item list.
Comment 3 Owen Leonard 2022-11-18 12:20:24 UTC
Created attachment 144058 [details] [review]
Bug 32261: Patron autocomplete - do not empty text field

The jQuery UI autocomplete is supposed to replace the text field with
the 'value' attribute of the selected item. As it does not exist it's
emptied. We should not replace what the user typed in.

Test plan:
Go to the Koha home page
Select "Search patrons" in the header
Type 'edn', it will return 1 result
Use the down key to select the item (it is not obvious but there is a
little change in the color when you select the item)
=> Without this patch the search field is emptied
=> With this patch applied the search field is not modified

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 4 Owen Leonard 2022-11-18 12:20:30 UTC
Created attachment 144059 [details] [review]
Bug 32261: Add more UI feedback when selecting patron from autocomplete

There is only a tiny change in the color of the selected item, but it's
not obvious.

Test plan:
Regenerate the css files using `yarn build`
Search for patrons and note that the down/up keys let you select a
patron and the background color change.
Note that the background color is not on the container and so is not
similar as the hover rule (when using the mouse). We could change that,
but then the behaviour is weird when you have both the mouse and the
keyboard selecting items in the item list.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>
Comment 5 Katrin Fischer 2022-11-19 20:18:12 UTC
Created attachment 144093 [details] [review]
Bug 32261: Patron autocomplete - do not empty text field

The jQuery UI autocomplete is supposed to replace the text field with
the 'value' attribute of the selected item. As it does not exist it's
emptied. We should not replace what the user typed in.

Test plan:
Go to the Koha home page
Select "Search patrons" in the header
Type 'edn', it will return 1 result
Use the down key to select the item (it is not obvious but there is a
little change in the color when you select the item)
=> Without this patch the search field is emptied
=> With this patch applied the search field is not modified

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 6 Katrin Fischer 2022-11-19 20:18:17 UTC
Created attachment 144094 [details] [review]
Bug 32261: Add more UI feedback when selecting patron from autocomplete

There is only a tiny change in the color of the selected item, but it's
not obvious.

Test plan:
Regenerate the css files using `yarn build`
Search for patrons and note that the down/up keys let you select a
patron and the background color change.
Note that the background color is not on the container and so is not
similar as the hover rule (when using the mouse). We could change that,
but then the behaviour is weird when you have both the mouse and the
keyboard selecting items in the item list.

Signed-off-by: Owen Leonard <oleonard@myacpl.org>

Signed-off-by: Katrin Fischer <katrin.fischer.83@web.de>
Comment 7 Tomás Cohen Arazi (tcohen) 2022-12-07 14:39:38 UTC
Pushed to master for 23.05.

Nice work everyone, thanks!
Comment 8 Jacob O'Mara 2022-12-08 10:49:21 UTC
Nice work, thanks everyone!

Pushed to 22.11.x for the next release.