Bug 22579

Summary: Split actions in z3950 search results so Import is the main action and make clicking title pop up Card Preview
Product: Koha Reporter: Hayley Pelham <hayleypelham>
Component: CatalogingAssignee: Hayley Pelham <hayleypelham>
Status: RESOLVED DUPLICATE QA Contact: Testopia <testopia>
Severity: enhancement    
Priority: P5 - low CC: aleisha, alexbuckley, black23, hayleypelham, katrin.fischer, m.de.rooy, oleonard, wizzyrea
Version: master   
Hardware: All   
OS: All   
Change sponsored?: Sponsored Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
Attachments: Bug 22579: Add syspref to toggle dropdown/links in Z39.50 search results
Bug 22579: Split actions in z3950 search results into a split button
Bug 22579: Split actions in z3950 search results into a split button
Bug 22579: (follow-up) Remove problematic whitespace
Bug 22579: Split actions in z3950 search results into a split button
Bug 22579: (follow-up) Remove problematic whitespace
Bug 22579: Split actions in z3950 search results into a split button
Bug 22579: (follow-up) Remove problematic whitespace

Description Hayley Pelham 2019-03-26 01:12:54 UTC
An enhancement included in master from Bug 15952 moved the Actions in the Cataloging Z39.50 search results into a dropdown. We have a library who uses the Card preview and MARC preview from this search to quickly ascertain whether a record is the one they were looking for, and would like to decrease the number of clicks it takes to execute this option from 2 to 1. 

We propose to allow the user to switch these options from a dropdown to expanded links within the action column, toggleable via a system preference.
Comment 1 Hayley Pelham 2019-03-26 01:33:54 UTC
Created attachment 86997 [details] [review]
Bug 22579: Add syspref to toggle dropdown/links in Z39.50 search results

This patch reduces the number of clicks to use 'Card preview' functionality
without removing the work done to condense the three links into a menu
in Bug 19939 which is displayed by default (and when the syspref is
disabled).

Test plan:
1) Apply the patch
2) In Cataloging click the New from Z39.50/SRU button and search for a
term that will produce results
3) In the results window, note that the actions column contains a
dropdown for each row which contains three links.
4) Change the Replacez3950CatalogingActionMenuWithLinks to 'Do'
5) Complete step 2 again, and instead note that the actions column now
contains three links, Card preview, MARC preview, Import
6) Verify that each of the links work as expected
7) Sign off!

Sponsored-by: Horowhenua Library Trust
Comment 2 Owen Leonard 2019-03-26 11:50:01 UTC
Do they know they can click anywhere in the row to trigger the menu? A system preference seems like overkill to me, but that's certainly an opinion informed by a different workflow.
Comment 3 Hayley Pelham 2019-03-26 20:04:36 UTC
(In reply to Owen Leonard from comment #2)
> Do they know they can click anywhere in the row to trigger the menu? A
> system preference seems like overkill to me, but that's certainly an opinion
> informed by a different workflow.

I think the problem is less with the placement of the menu, rather the fact that they now have to trigger it before they can access their most commonly used option when they didn't have to before. We didn't want to revert the change that was made, so we decided that a system preference would be the easiest way to include this fix, and make life easier for the library.
Comment 4 Katrin Fischer 2019-03-27 06:51:40 UTC
Could we use a split button with import being the default? (like receive in the subscription search list)

I also share the feeling that a pref might be a little overkill here when it seems more like a usability issue.
Comment 5 Hayley Pelham 2019-03-28 03:19:57 UTC
(In reply to Katrin Fischer from comment #4)
> Could we use a split button with import being the default? (like receive in
> the subscription search list)
> 
> I also share the feeling that a pref might be a little overkill here when it
> seems more like a usability issue.

A split button could work, but the library are wanting Card Preview to be the easiest to access. Would it be acceptable to have Card Preview as the main option, and MARC preview and import be in the dropdown part?
Comment 6 Michal Denar 2019-04-14 10:52:11 UTC
Hi,
this patch on latest master make z39.50 broken.
Explain video is here: http://recordit.co/zgDQVntvhg
Comment 7 Michal Denar 2019-04-14 12:44:08 UTC
Sorry folks, my fault. Nothing broken. It's between chair nad keyboard :-)
Comment 8 Michal Denar 2019-04-14 12:46:13 UTC
Patch works. Can I set it as SO? Or some more folow-ups coming?
Comment 9 Hayley Pelham 2019-04-14 21:23:51 UTC
(In reply to Michal Denar from comment #8)
> Patch works. Can I set it as SO? Or some more folow-ups coming?

Hi Michal, I think I need to change some things to align with the comments I've received first. Thanks for taking a look! Setting to assigned
Comment 10 Liz Rea 2019-04-15 15:00:50 UTC
I have a couple of suggestions for how we could fix this.

Split button, with import being the main action AND make the title clickable, to the card or marc preview in a modal like it does now - whichever your client prefers since presumably they are the ones paying for the dev. 

In this case, I don't think we'd need a syspref. If someone in the future wants to change what the title links to there, they can add the syspref. :)

Ping me if you have questions.

Cheers,
Liz
Comment 11 Aleisha Amohia 2020-03-26 03:16:24 UTC
Created attachment 101783 [details] [review]
Bug 22579: Split actions in z3950 search results into a split button

Where 'Import' is the main button and the two card previews are in the
dropdown

Also show Card preview when clicking on title of record

To test:
1) Go to Cataloguing -> New from Z39.50/SRU
2) Search for a term that will produce results
3) Once results are shown, notice the split button
4) Click anywhere on results rows. Confirm the dropdown menu still shows
when you click anywhere, as normal
5) Confirm clicking the title pops up the Card preview
6) Confirm Import is the main button in the actions and still works as
expected

Sponsored-by: Horowhenua Library Trust
Comment 12 Aleisha Amohia 2020-03-26 03:18:48 UTC
This is almost ready, but I am struggling to get rid of the whitespace showing between the two buttons in the button group. If anyone knows what I'm doing wrong here please let me know!
Comment 13 Katrin Fischer 2020-03-26 20:32:43 UTC
(In reply to Aleisha Amohia from comment #12)
> This is almost ready, but I am struggling to get rid of the whitespace
> showing between the two buttons in the button group. If anyone knows what
> I'm doing wrong here please let me know!

Sneakily adding Owen for advice....please?
Comment 14 Aleisha Amohia 2020-05-18 05:48:01 UTC
Created attachment 104998 [details] [review]
Bug 22579: Split actions in z3950 search results into a split button

Where 'Import' is the main button and the two card previews are in the
dropdown

Also show Card preview when clicking on title of record

To test:
1) Go to Cataloguing -> New from Z39.50/SRU
2) Search for a term that will produce results
3) Once results are shown, notice the split button
4) Click anywhere on results rows. Confirm the dropdown menu still shows
when you click anywhere, as normal
5) Confirm clicking the title pops up the Card preview
6) Confirm Import is the main button in the actions and still works as
expected

Sponsored-by: Horowhenua Library Trust
Comment 15 Aleisha Amohia 2020-05-18 05:48:37 UTC
Rebased, but still super stuck on that whitespace! Owen, any ideas?
Comment 16 Owen Leonard 2020-05-18 11:47:51 UTC
(In reply to Aleisha Amohia from comment #15)
> still super stuck on that whitespace!

I have no idea why the whitespace is an issue here when it doesn't seem to be a problem elsewhere. But removing the whitespace fixes it so let's do that!
Comment 17 Aleisha Amohia 2020-05-18 20:52:56 UTC
(In reply to Owen Leonard from comment #16)
> (In reply to Aleisha Amohia from comment #15)
> > still super stuck on that whitespace!
> 
> I have no idea why the whitespace is an issue here when it doesn't seem to
> be a problem elsewhere. But removing the whitespace fixes it so let's do
> that!

That's precisely the problem :) I can't seem the remove the whitespace. It's not in the HTML or the JS so I don't know what's adding it between the Import button and the dropdown button.
Comment 18 Owen Leonard 2020-05-18 23:35:16 UTC
Created attachment 105054 [details] [review]
Bug 22579: (follow-up) Remove problematic whitespace

This patch removes some whitespace from the template which was causing
display problems with the "Import" split button.
Comment 19 Owen Leonard 2020-05-18 23:35:58 UTC
Aleisha, does this patch work for you? It looks good to me in Firefox and Chromium on OSX
Comment 20 Aleisha Amohia 2020-05-19 00:26:58 UTC
Created attachment 105055 [details] [review]
Bug 22579: Split actions in z3950 search results into a split button

Where 'Import' is the main button and the two card previews are in the
dropdown

Also show Card preview when clicking on title of record

To test:
1) Go to Cataloguing -> New from Z39.50/SRU
2) Search for a term that will produce results
3) Once results are shown, notice the split button
4) Click anywhere on results rows. Confirm the dropdown menu still shows
when you click anywhere, as normal
5) Confirm clicking the title pops up the Card preview
6) Confirm Import is the main button in the actions and still works as
expected

Sponsored-by: Horowhenua Library Trust
Comment 21 Aleisha Amohia 2020-05-19 00:27:02 UTC
Created attachment 105056 [details] [review]
Bug 22579: (follow-up) Remove problematic whitespace

This patch removes some whitespace from the template which was causing
display problems with the "Import" split button.
Comment 22 Aleisha Amohia 2020-05-19 00:28:24 UTC
(In reply to Owen Leonard from comment #19)
> Aleisha, does this patch work for you? It looks good to me in Firefox and
> Chromium on OSX

Ahh of course, such an annoyingly simple fix! Thanks Owen.

Have amended the first patch because there was some weird stuff happening with opening and closing the dropdown. This is now ready for testing.
Comment 23 Aleisha Amohia 2020-11-05 22:48:29 UTC
Created attachment 113206 [details] [review]
Bug 22579: Split actions in z3950 search results into a split button

Where 'Import' is the main button and the two card previews are in the
dropdown

Also show Card preview when clicking on title of record

To test:
1) Go to Cataloguing -> New from Z39.50/SRU
2) Search for a term that will produce results
3) Once results are shown, notice the split button
4) Click anywhere on results rows. Confirm the dropdown menu still shows
when you click anywhere, as normal
5) Confirm clicking the title pops up the Card preview
6) Confirm Import is the main button in the actions and still works as
expected

Sponsored-by: Horowhenua Library Trust
Comment 24 Aleisha Amohia 2020-11-05 22:48:33 UTC
Created attachment 113207 [details] [review]
Bug 22579: (follow-up) Remove problematic whitespace

This patch removes some whitespace from the template which was causing
display problems with the "Import" split button.
Comment 25 Marcel de Rooy 2020-11-06 07:09:09 UTC
Did you see bug 23302 ?
We are working on the same thing.
Comment 26 Aleisha Amohia 2020-11-08 19:52:04 UTC
(In reply to Marcel de Rooy from comment #25)
> Did you see bug 23302 ?
> We are working on the same thing.

Hi Marcel, this bug was reported and had a patch earlier than Bug 23302, so I think Bug 23302 is the duplicate and should be closed.
Comment 27 Aleisha Amohia 2021-02-01 03:17:15 UTC
Looks like my comment was ignored and Bug 23302 has been pushed through, so we can close this one :)

*** This bug has been marked as a duplicate of bug 23302 ***