Bug 23302 - Less clicks on Z3950 search results
Summary: Less clicks on Z3950 search results
Status: CLOSED FIXED
Alias: None
Product: Koha
Classification: Unclassified
Component: Cataloging (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement
Assignee: Marcel de Rooy
QA Contact: Testopia
URL:
Keywords:
: 22579 (view as bug list)
Depends on:
Blocks: 27338 28573 28773 30161
  Show dependency treegraph
 
Reported: 2019-07-11 12:52 UTC by Marcel de Rooy
Modified: 2022-12-12 21:23 UTC (History)
11 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Small patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
On the three forms where we use Z3950 search results, in acquisitions and cataloguing for authorities as well as biblios, the form remembers your last choice for Card or MARC view. Note that this adds a new key in localStorage of your browser: z3950search_last_action.
Version(s) released in:
21.05.00
Circulation function:


Attachments
Example screenshot (58.41 KB, image/png)
2019-07-11 18:31 UTC, Owen Leonard
Details
screenshot (114.20 KB, image/jpeg)
2019-07-11 22:23 UTC, Paul A.
Details
Bug 23302: Less clicks on Z3950 search results (19.66 KB, patch)
2020-08-14 14:19 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23302: Less clicks on Z3950 search results (18.95 KB, patch)
2020-10-12 07:45 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23302: Less clicks on Z3950 search results (18.96 KB, patch)
2020-11-21 16:43 UTC, Michal Denar
Details | Diff | Splinter Review
Bug 23302: Less clicks on Z3950 search results (19.01 KB, patch)
2021-01-11 13:50 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 23302: (QA follow-up) Fix filters (3.74 KB, patch)
2021-01-11 13:50 UTC, Nick Clemens (kidclamp)
Details | Diff | Splinter Review
Bug 23302: Less clicks on Z3950 search results (19.20 KB, patch)
2021-01-22 08:05 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 23302: (QA follow-up) Fix filters (3.83 KB, patch)
2021-01-22 08:05 UTC, Marcel de Rooy
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Marcel de Rooy 2019-07-11 12:52:02 UTC
In older versions it was possible to click Card view or MARC view directly. Now we must click twice (open menu first). When comparing different records, our users click Card or MARC repeatedly and would love to need only one click.

What are our options to achieve that? ;)
Comment 1 Marcel de Rooy 2019-07-11 12:55:00 UTC
Instead of reverting to three buttons/links:

Could we add a Default action left to the dropdown menu like addbooks shows New Z3950 search and a menu?
And perhaps remember which we action (Card or MARC) we chose last and offer that as default action again ?

Any ideas? Owen ?
Comment 2 Marcel de Rooy 2019-07-11 13:14:33 UTC
From IRC:

[14:57] <oleonard> marcelr: That interface has been contentious for a long time now. I think the core of the problem might be the small size of the window leading to solutions to conserve space
[14:58] <marcelr> what about a default button?
[14:58] <marcelr> instead of showing Actions?
[14:58] <marcelr> the caret does not take much space
[14:58] <oleonard> We had a discussion about default buttons in another context and there was no agreement about which should be the default
[14:59] <marcelr> default could be governed by js and cookie ?
[15:00] <oleonard> I wonder if we shouldn't just go back to individual buttons and try to address the space problem
[15:00] <marcelr> that would be fine for us; i am doing that in our staff version now
[15:00] <marcelr> bit uglier but it works
[15:01] <marcelr> Card Marc Import are just short words ;)
[15:01] <oleonard> I don't know if there is any consensus on it though... It would be worth taking to the Koha mailing list
Comment 3 Marcel de Rooy 2019-07-11 13:37:40 UTC
(In reply to Marcel de Rooy from comment #2)
> [15:01] <oleonard> I don't know if there is any consensus on it though... It
> would be worth taking to the Koha mailing list

Sent a mail to the general list now.
Comment 4 Paul A. 2019-07-11 15:00:50 UTC
Excluding spiders, our logs show very few requests for 'cards' but many more for 'MARC'. I can only guess that at item level the data is more complete. Was there a good reason to remove this functionality?
Comment 5 Owen Leonard 2019-07-11 15:14:07 UTC
(In reply to Paul A. from comment #4)
> Was there a good reason to remove this functionality?

I don't understand this question. No functionality was removed. The question is whether the actions should be grouped in a dropdown menu or displayed as individual buttons.

Generally speaking, groups of three or more "actions" in a table like this are grouped into a dropdown menu in order to conserve horizontal space and make it easier to see the data in the table. That can be reversed in this case if there is enough call for it.
Comment 6 Paul A. 2019-07-11 18:15:18 UTC Comment hidden (obsolete)
Comment 7 Paul A. 2019-07-11 18:15:48 UTC Comment hidden (obsolete)
Comment 8 Paul A. 2019-07-11 18:16:27 UTC
In reply to Owen L.

Apologies -- bad wording, "functionality" was misleading, maybe "two clicks instead of one"? User friendliness? Ease of a GUI?

The *line* "Normal view MARC view ISBD view" (I don't see it as a *table*) is extremely short, appears without breaks even on very small tablets rotated vertically upright.  A "drop-down" might save a tad of horizontal screen space (but is probably, pixel-wise, a little taller than a text line), but is less explanatory unless you click it or know ahead of time what you're looking for. That's my (lame) excuse for misusing "functionality."

I totally agree that "longer" lists of choices should be "drop down" -- just questioning the user experience of deciding "three textually short" options should be visually, quasi-hidden. At some point (intrinsically if a small screen can't get them all on one line), let's go for it.... Just not at all sure that it's required here.
Comment 9 Owen Leonard 2019-07-11 18:31:32 UTC
Created attachment 91468 [details]
Example screenshot

(In reply to Paul A. from comment #8)
> The *line* "Normal view MARC view ISBD view" (I don't see it as a *table*)
> is extremely short, appears without breaks even on very small tablets
> rotated vertically upright. 

This attachment shows what the Z39.50 popup looks like on my test system, Firefox on Windows 10.
Comment 10 Paul A. 2019-07-11 22:23:57 UTC
Created attachment 91470 [details]
screenshot

Here is mine in Firefox 60.7.0esr (Ubuntu 18.04)
Comment 11 Katrin Fischer 2019-07-13 13:57:04 UTC
Our most common use case is: search by union catalog ID (controlnumber) and import as only one result is returned. But I am aware that most of the time there will be a number of result that requires you to take a closer look.

I'd vote for bringing back the 3 separate links/butons.


I am not opposed to get rid of the pop-up. It often causes issues.

An example: People ask why the pop-up no longer appears, not realizing there have minified it before and it's just still open.


We have also hidden column in this view in the past. Maybe column configuration would be nice to have here.
Comment 12 Marcel de Rooy 2019-07-15 13:56:48 UTC
(In reply to Paul A. from comment #4)
> Excluding spiders, our logs show very few requests for 'cards' but many more
> for 'MARC'. I can only guess that at item level the data is more complete.

Some of our users find it helpful to look at Card first, since the MARC preview is much more detailed, lengthy and not always sorted. After that they may not pick the record, or in another case look at MARC after all.
Comment 13 Paul A. 2019-07-15 17:50:19 UTC
(In reply to Marcel de Rooy from comment #12)
The comment covered the case of using a "drop-down" box, instead of 3 short html tags which "save a click" -- user ergonomics, office efficiency, GUI ease, whatever. So we're probably not disagreeing, whether it's Z39-50, staff or opac, as it has nothing to do with the user's final choice, just how she gets there. Your users go for "cards", mine for "MARC" -- they'll all be clicking twice instead of once.
My suggestion is (if there is reasonable screen space) that the lower limit of "drop-down" choices should be above three (I'm not certain of an exact, immutable value -- it is surely a fairly low number.)  Maybe there are logical | practical exceptions, but this is IMHO not one of them.
Comment 14 Marcel de Rooy 2020-08-13 07:15:02 UTC
Ok. Lets try to get this move again..
Comment 15 Marcel de Rooy 2020-08-14 14:19:30 UTC
Created attachment 108285 [details] [review]
Bug 23302: Less clicks on Z3950 search results

Functional change: Instead of requiring two clicks for each option in
the Actions menu, we add a default action based on previous activity.

NOTE: In order to prioritize MARC and Card preview actions, we will only
remember Import and Order when it is not preceded by a preview. In other
words: If you directly click Import, Import comes back. If you click Card
and Import, Card comes back.

Technical changes:
[1] Combine Preview and Order button on Acquisition Z3950 search.
[2] Use Actions link as default action and add button with caret to open the dropdown.
[3] Keep last action in localStorage (sessionStorage makes not much sense for the popups), prioritizing previews.
[4] Where needed, add title attributes to dropdown links. Use class 'chosen' to differentiate preview popups from import/order actions.
[5] Replace previewMARC by previewData in Authority Z3950 search. Remove duplicate code.
[6] Use link href from template instead of constructing link in javascript.
[7] Removing unused linktools markup from acqui template.

Test plan:
[1] Start on acqui Z3950. Choose Card once from the menu and then Order.
[2] Start auth Z3950. Verify that Default is MARC now. Close popup.
    (Since Card is no option here.)
[3] Start cataloguing Z3950. Verify that you have Card as default.
    Click Import rightaway.
[4] Back to auth Z3950. Verify that Import is default. Click Import.
[5] Back to acqui Z3950. Verify that MARC is default (no Import here).
    Click Order. Go back and verify that Order is now default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 16 Marcel de Rooy 2020-08-14 14:21:26 UTC
Hope this "compromise" meets the most consensus. See commit message of the patch.
Ready for testing.
One TODO still: we need to facilitate translation of the button text.
Comment 17 Marcel de Rooy 2020-10-12 07:45:43 UTC
Created attachment 111472 [details] [review]
Bug 23302: Less clicks on Z3950 search results

Functional change: Instead of requiring two clicks for each option in
the Actions menu, we add a default action based on previous activity.

NOTE: In order to prioritize MARC and Card preview actions, we will only
remember Import and Order when it is not preceded by a preview. In other
words: If you directly click Import, Import comes back. If you click Card
and Import, Card comes back.

Technical changes:
[1] Combine Preview and Order button on Acquisition Z3950 search.
[2] Use Actions link as default action and add button with caret to open the dropdown.
[3] Keep last action in localStorage (sessionStorage makes not much sense for the popups), prioritizing previews.
[4] Where needed, add title attributes to dropdown links. Use class 'chosen' to differentiate preview popups from import/order actions.
[5] Replace previewMARC by previewData in Authority Z3950 search. Remove duplicate code.
[6] Use link href from template instead of constructing link in javascript.
[7] Removing unused linktools markup from acqui template.

Test plan:
[1] Start on acqui Z3950. Choose Card once from the menu and then Order.
[2] Start auth Z3950. Verify that Default is MARC now. Close popup.
    (Since Card is no option here.)
[3] Start cataloguing Z3950. Verify that you have Card as default.
    Click Import rightaway.
[4] Back to auth Z3950. Verify that Import is default. Click Import.
[5] Back to acqui Z3950. Verify that MARC is default (no Import here).
    Click Order. Go back and verify that Order is now default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 18 Marcel de Rooy 2020-10-12 07:48:04 UTC
Rebased. Please test ! Owen or anyone else ?
Comment 19 Séverine Queune 2020-10-20 09:01:27 UTC
(In reply to Marcel de Rooy from comment #18)
> Rebased. Please test ! Owen or anyone else ?

Hi Marcel ! I've got an issue with the patch using Google Chrome (last version 86.0.4240.75), Marc button doesn't work for none of the module (ok when I use the option from the dropdown list). It works fine with Firefox.
Could the problem come from my side or from the patch ?
Comment 20 Marcel de Rooy 2020-10-20 11:03:19 UTC
(In reply to Séverine Queune from comment #19)
> Hi Marcel ! I've got an issue with the patch using Google Chrome (last
> version 86.0.4240.75), Marc button doesn't work for none of the module (ok
> when I use the option from the dropdown list). It works fine with Firefox.
> Could the problem come from my side or from the patch ?

Séverine, thx for testing. I will try Chrome too to check behaviour.
Comment 21 Marcel de Rooy 2020-10-20 11:09:29 UTC
Hi Séverine:

Tested on Chrome version 86.0.4240.75 (Official Build) (64-bit)
Same version as yours.
But all seems to work fine. I can select MARC or Card from the dropdown and it responds. And after that I can click on the button and it works too.
Could you verify if the browser cache is not causing it? Use Ctrl+F5 to refresh the page?
Comment 22 Michal Denar 2020-11-21 16:43:00 UTC
Created attachment 113910 [details] [review]
Bug 23302: Less clicks on Z3950 search results

Functional change: Instead of requiring two clicks for each option in
the Actions menu, we add a default action based on previous activity.

NOTE: In order to prioritize MARC and Card preview actions, we will only
remember Import and Order when it is not preceded by a preview. In other
words: If you directly click Import, Import comes back. If you click Card
and Import, Card comes back.

Technical changes:
[1] Combine Preview and Order button on Acquisition Z3950 search.
[2] Use Actions link as default action and add button with caret to open the dropdown.
[3] Keep last action in localStorage (sessionStorage makes not much sense for the popups), prioritizing previews.
[4] Where needed, add title attributes to dropdown links. Use class 'chosen' to differentiate preview popups from import/order actions.
[5] Replace previewMARC by previewData in Authority Z3950 search. Remove duplicate code.
[6] Use link href from template instead of constructing link in javascript.
[7] Removing unused linktools markup from acqui template.

Test plan:
[1] Start on acqui Z3950. Choose Card once from the menu and then Order.
[2] Start auth Z3950. Verify that Default is MARC now. Close popup.
    (Since Card is no option here.)
[3] Start cataloguing Z3950. Verify that you have Card as default.
    Click Import rightaway.
[4] Back to auth Z3950. Verify that Import is default. Click Import.
[5] Back to acqui Z3950. Verify that MARC is default (no Import here).
    Click Order. Go back and verify that Order is now default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>
Comment 23 Nick Clemens (kidclamp) 2021-01-11 13:50:22 UTC
Created attachment 115030 [details] [review]
Bug 23302: Less clicks on Z3950 search results

Functional change: Instead of requiring two clicks for each option in
the Actions menu, we add a default action based on previous activity.

NOTE: In order to prioritize MARC and Card preview actions, we will only
remember Import and Order when it is not preceded by a preview. In other
words: If you directly click Import, Import comes back. If you click Card
and Import, Card comes back.

Technical changes:
[1] Combine Preview and Order button on Acquisition Z3950 search.
[2] Use Actions link as default action and add button with caret to open the dropdown.
[3] Keep last action in localStorage (sessionStorage makes not much sense for the popups), prioritizing previews.
[4] Where needed, add title attributes to dropdown links. Use class 'chosen' to differentiate preview popups from import/order actions.
[5] Replace previewMARC by previewData in Authority Z3950 search. Remove duplicate code.
[6] Use link href from template instead of constructing link in javascript.
[7] Removing unused linktools markup from acqui template.

Test plan:
[1] Start on acqui Z3950. Choose Card once from the menu and then Order.
[2] Start auth Z3950. Verify that Default is MARC now. Close popup.
    (Since Card is no option here.)
[3] Start cataloguing Z3950. Verify that you have Card as default.
    Click Import rightaway.
[4] Back to auth Z3950. Verify that Import is default. Click Import.
[5] Back to acqui Z3950. Verify that MARC is default (no Import here).
    Click Order. Go back and verify that Order is now default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 24 Nick Clemens (kidclamp) 2021-01-11 13:50:25 UTC
Created attachment 115031 [details] [review]
Bug 23302: (QA follow-up) Fix filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 25 Nick Clemens (kidclamp) 2021-01-11 13:51:51 UTC
I worry that this is slightly confusing as buttons can change depending on what you do - perhaps you only get one result so import directly even though you normally look at the marc view?

It works though, and it decreases clicks for user in many instances so passing QA
Comment 26 Marcel de Rooy 2021-01-11 14:22:23 UTC
(In reply to Nick Clemens from comment #25)
> I worry that this is slightly confusing as buttons can change depending on
> what you do - perhaps you only get one result so import directly even though
> you normally look at the marc view?
> 
> It works though, and it decreases clicks for user in many instances so
> passing QA

Thanks. But even if there is one result, you might want to view it before importing.
Comment 27 Jonathan Druart 2021-01-12 15:28:21 UTC
Add release notes please, also highlight the new localstorage use.
Comment 28 Jonathan Druart 2021-01-20 08:38:15 UTC
There is a conflict with bug 11299. Can you rebase please?
Comment 29 Marcel de Rooy 2021-01-22 07:33:55 UTC
(In reply to Jonathan Druart from comment #28)
> There is a conflict with bug 11299. Can you rebase please?

Nasty stuff
Comment 30 Marcel de Rooy 2021-01-22 08:05:12 UTC
Created attachment 115661 [details] [review]
Bug 23302: Less clicks on Z3950 search results

Functional change: Instead of requiring two clicks for each option in
the Actions menu, we add a default action based on previous activity.

NOTE: In order to prioritize MARC and Card preview actions, we will only
remember Import and Order when it is not preceded by a preview. In other
words: If you directly click Import, Import comes back. If you click Card
and Import, Card comes back.

Technical changes:
[1] Combine Preview and Order button on Acquisition Z3950 search.
[2] Use Actions link as default action and add button with caret to open the dropdown.
[3] Keep last action in localStorage (sessionStorage makes not much sense for the popups), prioritizing previews.
[4] Where needed, add title attributes to dropdown links. Use class 'chosen' to differentiate preview popups from import/order actions.
[5] Replace previewMARC by previewData in Authority Z3950 search. Remove duplicate code.
[6] Use link href from template instead of constructing link in javascript.
[7] Removing unused linktools markup from acqui template.

Test plan:
[1] Start on acqui Z3950. Choose Card once from the menu and then Order.
[2] Start auth Z3950. Verify that Default is MARC now. Close popup.
    (Since Card is no option here.)
[3] Start cataloguing Z3950. Verify that you have Card as default.
    Click Import rightaway.
[4] Back to auth Z3950. Verify that Import is default. Click Import.
[5] Back to acqui Z3950. Verify that MARC is default (no Import here).
    Click Order. Go back and verify that Order is now default.

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Signed-off-by: Michal Denar <black23@gmail.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 31 Marcel de Rooy 2021-01-22 08:05:15 UTC
Created attachment 115663 [details] [review]
Bug 23302: (QA follow-up) Fix filters

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 32 Marcel de Rooy 2021-01-22 08:05:47 UTC
Rebase notes:

// var data_index = $( this ).data( "index" );
// Import( data_breedingid, data_authid, data_headingcode, "", data_index );

-        opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid;
+        opener.document.location="../authorities/authorities.pl?breedingid="+Breeding+"&authtypecode="+AuthType+"&authid="+recordid+"&index="+index;

AFAICS The new index parameters should be in the href too already. So this should work.

 <li><a href="#" class="import_record" data-breedingid="[% breeding_loo.breedingid | html %]" data-heading_code="[% breeding_loo.heading_code | html %]" data-authid="[% breeding_loo.authid | html %]" data-index="[% index | html %]" ><i class="fa fa-download"></i> Import</a></li>
Do not really understand why we import with an data-authid value here? I have added the index parameter.
Comment 33 Marcel de Rooy 2021-01-22 08:06:41 UTC
Tested the three forms where we use the Card, Marc, Import or Order buttons.
Comment 34 Marcel de Rooy 2021-01-22 08:11:50 UTC
(In reply to Jonathan Druart from comment #27)
> Add release notes please, also highlight the new localstorage use.

Do we have a common place for keeping a record of all cookies and localstorage keys Koha is using currently?
Comment 35 Josef Moravec 2021-01-22 08:19:36 UTC
(In reply to Marcel de Rooy from comment #34)
> (In reply to Jonathan Druart from comment #27)
> > Add release notes please, also highlight the new localstorage use.
> 
> Do we have a common place for keeping a record of all cookies and
> localstorage keys Koha is using currently?

According guidelines, I think it is here: https://wiki.koha-community.org/wiki/Use_of_Cookies
Comment 36 Jonathan Druart 2021-01-27 13:37:19 UTC
Pushed to master for 21.05, thanks to everybody involved!
Comment 37 Jonathan Druart 2021-01-27 13:45:25 UTC
Isn't it something we actually want to implement for all the dropdown-menu's we have in the "actions" column of our tables?
Comment 38 Marcel de Rooy 2021-01-27 13:54:54 UTC
(In reply to Jonathan Druart from comment #37)
> Isn't it something we actually want to implement for all the dropdown-menu's
> we have in the "actions" column of our tables?

Thanks for pushing.
Yeah we could make further progress, although it may not be the most important job in Koha now..
Comment 39 Fridolin Somers 2021-01-29 15:06:07 UTC
Enhancement not pushed to 20.11.x
Comment 40 Aleisha Amohia 2021-02-01 03:17:15 UTC
*** Bug 22579 has been marked as a duplicate of this bug. ***