Bug 37946 - Double menu when clicking the caret in Z39.50 search
Summary: Double menu when clicking the caret in Z39.50 search
Status: Pushed to main
Alias: None
Product: Koha
Classification: Unclassified
Component: Templates (show other bugs)
Version: Main
Hardware: All All
: P5 - low minor
Assignee: Owen Leonard
QA Contact: Marcel de Rooy
URL:
Keywords:
Depends on: 35402 37947
Blocks:
  Show dependency treegraph
 
Reported: 2024-09-17 16:46 UTC by Caroline Cyr La Rose
Modified: 2024-11-19 15:36 UTC (History)
3 users (show)

See Also:
Change sponsored?: ---
Patch complexity: Trivial patch
Documentation contact:
Documentation submission:
Text to go in the release notes:
Version(s) released in:
24.11.00
Circulation function:


Attachments
Bug 37946: Double menu when clicking the caret in Z39.50 search (3.96 KB, patch)
2024-09-19 17:44 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37946: Double menu when clicking the caret in Z39.50 search (4.01 KB, patch)
2024-09-19 20:46 UTC, David Nind
Details | Diff | Splinter Review
Bug 37946: (follow-up) Update menu style to hide (1.14 KB, patch)
2024-09-20 12:05 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 37946: Double menu when clicking the caret in Z39.50 search (4.07 KB, patch)
2024-09-21 00:00 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 37946: (follow-up) Update menu style to hide (1.19 KB, patch)
2024-09-21 00:00 UTC, Phil Ringnalda
Details | Diff | Splinter Review
Bug 37946: Double menu when clicking the caret in Z39.50 search (4.16 KB, patch)
2024-11-15 11:02 UTC, Marcel de Rooy
Details | Diff | Splinter Review
Bug 37946: (follow-up) Update menu style to hide (1.29 KB, patch)
2024-11-15 11:02 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 Caroline Cyr La Rose 2024-09-17 16:46:53 UTC
When importing a record via Z39.50, you have the possibility of either clicking anywhere to get the Marc/Card/Import menu, or clicking the caret button next the the MARC button.

Right now, if you click on the caret, both menus appear.

To recreate:
1. Go to Cataloging
2. Click on New from Z39.50/SRU
3. Make a search in the library of congress server for anything (I searched for author: shakespeare)
4. Next to one of the results, click the caret button next to the MARC button
   --> Two MARC/Card/Import menus appear
Comment 1 Owen Leonard 2024-09-19 17:44:13 UTC
Created attachment 171788 [details] [review]
Bug 37946: Double menu when clicking the caret in Z39.50 search

This patch makes some adjustments to the JS for the Z39.50 search
results page to correct the behavior of dropdown menus. If the split
button's menu trigger is clicked a cloned version of the menu shouldn't
appear along with the default one.

To test, apply the patch and clear your browser cache if necessary.

- Go to Cataloging -> New from Z39.50.
- Perform a search which will return multiple results.
- Click any table cell in the results except the last one.
  - You should get a popup menu with "MARC preview," "Card preview," and
    "Import."
  - Each menu item should work correctly.
- Test the button in the last column to confirm that both the "primary"
  button works correctly and that the popup menu works correctly.
- Test the process of adding a new authority from Z39.50 to confirm that
  the authority search results table works the same as the bibliographic
  one.
Comment 2 David Nind 2024-09-19 20:46:17 UTC
Created attachment 171806 [details] [review]
Bug 37946: Double menu when clicking the caret in Z39.50 search

This patch makes some adjustments to the JS for the Z39.50 search
results page to correct the behavior of dropdown menus. If the split
button's menu trigger is clicked a cloned version of the menu shouldn't
appear along with the default one.

To test, apply the patch and clear your browser cache if necessary.

- Go to Cataloging -> New from Z39.50.
- Perform a search which will return multiple results.
- Click any table cell in the results except the last one.
  - You should get a popup menu with "MARC preview," "Card preview," and
    "Import."
  - Each menu item should work correctly.
- Test the button in the last column to confirm that both the "primary"
  button works correctly and that the popup menu works correctly.
- Test the process of adding a new authority from Z39.50 to confirm that
  the authority search results table works the same as the bibliographic
  one.

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2024-09-19 20:52:40 UTC
I've signed off, but experienced some inconsistency/issues:

1. For authority records, search for 'clark' in the 'Name (any)' field
2. In the search results, click a result (say around the server column) - you get the options showing up (MARC preview, Import)
3. Click the MARC option in actions then close it
4. Try and click the selector for another result - the options don't appear
5. Click in various places for other results, sometimes the select menu options appear, other times they don't.

It is a little bit hit-and-miss trying to replicate this 8-).
Comment 4 Phil Ringnalda 2024-09-19 21:22:44 UTC
Failing QA for the 100% reproducible problem that clicking the primary button, then trying to click the caret for the popup never works. Prior to this patch it was already a bit funky, since the first click did nothing and then a second click would produce just one menu, but with the patch, no menu will ever appear for the popup caret on a row once you click the primary button (well, unless you discover how much better the click-anywhere menu is, and forswear ever again clicking the actions menubutton).
Comment 5 Owen Leonard 2024-09-20 12:05:42 UTC
Created attachment 171828 [details] [review]
Bug 37946: (follow-up) Update menu style to hide

We shouldn't use hide() to hide the Bootstrap menu. The correct move
here is to empty the "style" attribute.
Comment 6 Phil Ringnalda 2024-09-21 00:00:11 UTC
Created attachment 171843 [details] [review]
Bug 37946: Double menu when clicking the caret in Z39.50 search

This patch makes some adjustments to the JS for the Z39.50 search
results page to correct the behavior of dropdown menus. If the split
button's menu trigger is clicked a cloned version of the menu shouldn't
appear along with the default one.

To test, apply the patch and clear your browser cache if necessary.

- Go to Cataloging -> New from Z39.50.
- Perform a search which will return multiple results.
- Click any table cell in the results except the last one.
  - You should get a popup menu with "MARC preview," "Card preview," and
    "Import."
  - Each menu item should work correctly.
- Test the button in the last column to confirm that both the "primary"
  button works correctly and that the popup menu works correctly.
- Test the process of adding a new authority from Z39.50 to confirm that
  the authority search results table works the same as the bibliographic
  one.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 7 Phil Ringnalda 2024-09-21 00:00:13 UTC
Created attachment 171844 [details] [review]
Bug 37946: (follow-up) Update menu style to hide

We shouldn't use hide() to hide the Bootstrap menu. The correct move
here is to empty the "style" attribute.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 8 Marcel de Rooy 2024-11-15 11:02:34 UTC
Created attachment 174567 [details] [review]
Bug 37946: Double menu when clicking the caret in Z39.50 search

This patch makes some adjustments to the JS for the Z39.50 search
results page to correct the behavior of dropdown menus. If the split
button's menu trigger is clicked a cloned version of the menu shouldn't
appear along with the default one.

To test, apply the patch and clear your browser cache if necessary.

- Go to Cataloging -> New from Z39.50.
- Perform a search which will return multiple results.
- Click any table cell in the results except the last one.
  - You should get a popup menu with "MARC preview," "Card preview," and
    "Import."
  - Each menu item should work correctly.
- Test the button in the last column to confirm that both the "primary"
  button works correctly and that the popup menu works correctly.
- Test the process of adding a new authority from Z39.50 to confirm that
  the authority search results table works the same as the bibliographic
  one.

Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 9 Marcel de Rooy 2024-11-15 11:02:37 UTC
Created attachment 174568 [details] [review]
Bug 37946: (follow-up) Update menu style to hide

We shouldn't use hide() to hide the Bootstrap menu. The correct move
here is to empty the "style" attribute.

Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Marcel de Rooy <m.de.rooy@rijksmuseum.nl>
Comment 10 Katrin Fischer 2024-11-19 15:36:40 UTC
Pushed for 24.11!

Well done everyone, thank you!