Bug 38227

Summary: Collapse authority popup search form when showing results
Product: Koha Reporter: Owen Leonard <oleonard>
Component: TemplatesAssignee: Owen Leonard <oleonard>
Status: Pushed to main --- QA Contact: Jonathan Druart <jonathan.druart>
Severity: enhancement    
Priority: P5 - low CC: jonathan.druart, phil, testopia
Version: Main   
Hardware: All   
OS: All   
GIT URL: Change sponsored?: ---
Patch complexity: Small patch Documentation contact:
Documentation submission: Text to go in the release notes:
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 38221    
Bug Blocks:    
Attachments: Bug 38227: Collapse authority popup search form when showing results
Bug 38227: Collapse authority popup search form when showing results
Bug 38227: Collapse authority popup search form when showing results
Bug 38227: Collapse authority popup search form when showing results

Description Owen Leonard 2024-10-22 13:52:01 UTC
I propose to convert the authority popup search form to a collapsible panel like we have on the patron entry form. It would be expanded when the popup is initially triggered but collapsed when displaying search results.
Comment 1 Owen Leonard 2024-10-22 14:20:16 UTC Comment hidden (obsolete)
Comment 2 Phil Ringnalda 2024-10-24 02:25:08 UTC
Created attachment 173245 [details] [review]
Bug 38227: Collapse authority popup search form when showing results

This patch takes the collapsing-panel functionality of the patron entry
form and generalizes it so that it can be used on the authority search
popup window in cataloging.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Cataloging -> New record (basic MARC editor)
- Switch to tab 1 and click the tag editor link next to tag 100 subfield
  a.
- The search form should be expanded in the pop-up window.
- Perform a search. When the window reloads with search results the
  search form should be collapsed.
- Confirm that clicking the "Search options" legend works correctly to
  expand and collapse the form.
- Collapse the form and click the "Clear form" button. The form should
  expand -- This is based on the assumption that the "Clear form" button
  would be used when the user wants to initiate a new search.
- Go to Patrons -> New patron and confirm that collapsible sections
  still work correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>
Comment 3 Jonathan Druart 2025-01-16 11:47:43 UTC
I've just PQAed bug 7508 that has a collapse behaviour as well, but styled totally different. I think they should closer in look.

The minimum would be to have "cursor: pointer".
Comment 4 Owen Leonard 2025-01-16 12:31:48 UTC
This change and the one in 7508 should look exactly the same. Could you look again?
Comment 5 Jonathan Druart 2025-01-16 13:35:39 UTC
Created attachment 176660 [details] [review]
Bug 38227: Collapse authority popup search form when showing results

This patch takes the collapsing-panel functionality of the patron entry
form and generalizes it so that it can be used on the authority search
popup window in cataloging.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Cataloging -> New record (basic MARC editor)
- Switch to tab 1 and click the tag editor link next to tag 100 subfield
  a.
- The search form should be expanded in the pop-up window.
- Perform a search. When the window reloads with search results the
  search form should be collapsed.
- Confirm that clicking the "Search options" legend works correctly to
  expand and collapse the form.
- Collapse the form and click the "Clear form" button. The form should
  expand -- This is based on the assumption that the "Clear form" button
  would be used when the user wants to initiate a new search.
- Go to Patrons -> New patron and confirm that collapsible sections
  still work correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 6 Jonathan Druart 2025-01-16 13:35:48 UTC
(In reply to Owen Leonard from comment #4)
> This change and the one in 7508 should look exactly the same. Could you look
> again?

Oops, indeed! Not sure what I missed (certainly a css rebuild).
Comment 7 Katrin Fischer 2025-02-18 09:20:47 UTC
I have tried to rebase this with the auto_rebase.pl script, but there is a conflict in memberentrygen.tt that is not relaeted to the tidy. Could you please have a look?

Make sure you have the latest ktd and images, then run:
perl misc/devel/auto_rebase.pl --bugzilla 38227
Comment 8 Owen Leonard 2025-02-19 13:04:21 UTC
Created attachment 178331 [details] [review]
Bug 38227: Collapse authority popup search form when showing results

This patch takes the collapsing-panel functionality of the patron entry
form and generalizes it so that it can be used on the authority search
popup window in cataloging.

To test, apply the patch and rebuild the staff interface CSS.

- Go to Cataloging -> New record (basic MARC editor)
- Switch to tab 1 and click the tag editor link next to tag 100 subfield
  a.
- The search form should be expanded in the pop-up window.
- Perform a search. When the window reloads with search results the
  search form should be collapsed.
- Confirm that clicking the "Search options" legend works correctly to
  expand and collapse the form.
- Collapse the form and click the "Clear form" button. The form should
  expand -- This is based on the assumption that the "Clear form" button
  would be used when the user wants to initiate a new search.
- Go to Patrons -> New patron and confirm that collapsible sections
  still work correctly.

Sponsored-by: Athens County Public Libraries
Signed-off-by: Phil Ringnalda <phil@chetcolibrary.org>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 9 Katrin Fischer 2025-02-19 16:07:31 UTC
Pushed for 25.05!

Well done everyone, thank you!