Bug 38657

Summary: Image obscured by the search results toolbar when previewing cover images from OPAC search results
Product: Koha Reporter: David Nind <david>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: Pushed to main --- QA Contact: Martin Renvoize (ashimema) <martin.renvoize>
Severity: normal    
Priority: P5 - low CC: alexbuckley, martin.renvoize
Version: Main   
Hardware: All   
OS: All   
Change sponsored?: --- Patch complexity: Trivial patch
Documentation contact: Documentation submission:
Text to go in the release notes:
This fixes the display of cover images in the OPAC - the image viewer was appearing behind the search results toolbar, partially obscuring the cover image.
Version(s) released in:
25.05.00
Circulation function:
Bug Depends on: 26933    
Bug Blocks:    
Attachments: Screenshot: cover image preview from OPAC search results partially obscured by the menu bar
Bug 38657: Prevent cover image from being from being obscured by the search results toolbar
Bug 38657: Prevent cover image from being from being obscured by the search results toolbar
Bug 38657: Prevent cover image from being from being obscured by the search results toolbar

Description David Nind 2024-12-09 18:19:08 UTC
With cover images enabled, if you click on the cover image in the OPAC search results, the image preview is partially hidden behind the search results menu bar.

This may depend a little on the size of the image uploaded or returned from the cover image service.

To replicate:
1. Enable LocalCoverImages and OPACLocalCoverImages system preferences.
2. Add a cover image to a record.
3. In the OPAC:
   3.1 Do a search that will return the record with the cover image
       in the search results
   3.2 Click on the cover image in the search results list
   3.3 Note that the image is partially obscured behind the search results menu bar.
Comment 1 David Nind 2024-12-09 18:21:49 UTC
Created attachment 175328 [details]
Screenshot: cover image preview from OPAC search results partially obscured by the menu bar

Screenshot showing the image preview being partially obscured by the search results menu bar.
Comment 2 Owen Leonard 2024-12-09 18:53:38 UTC
Created attachment 175329 [details] [review]
Bug 38657: Prevent cover image from being from being obscured by the search results toolbar

On the OPAC search results page we're including the Chocolat image
viewer CSS after our global CSS file. This means that rules which
are intended to override the default Chocolat CSS aren't working. The
fix is to move the line which includes the Chocolat CSS.

To test, apply the patch and enable the LocalCoverImages and
OPACLocalCoverImages system preferences.

- If necessary, add a local cover image to a bibliographic record.
- Go to the OPAC and perform a search which will return multiple
  record including the record with the cover image.
- Click the cover image to trigger the image viewer.
- The image viewer should not appear to be "behind" the search results
  toolbar.

Sponsored-by: Athens County Public Libraries
Comment 3 David Nind 2024-12-09 19:14:46 UTC
Created attachment 175330 [details] [review]
Bug 38657: Prevent cover image from being from being obscured by the search results toolbar

On the OPAC search results page we're including the Chocolat image
viewer CSS after our global CSS file. This means that rules which
are intended to override the default Chocolat CSS aren't working. The
fix is to move the line which includes the Chocolat CSS.

To test, apply the patch and enable the LocalCoverImages and
OPACLocalCoverImages system preferences.

- If necessary, add a local cover image to a bibliographic record.
- Go to the OPAC and perform a search which will return multiple
  record including the record with the cover image.
- Click the cover image to trigger the image viewer.
- The image viewer should not appear to be "behind" the search results
  toolbar.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Comment 4 David Nind 2024-12-09 19:18:39 UTC
Thanks Owen!
Comment 5 Martin Renvoize (ashimema) 2024-12-17 07:13:41 UTC
Created attachment 175590 [details] [review]
Bug 38657: Prevent cover image from being from being obscured by the search results toolbar

On the OPAC search results page we're including the Chocolat image
viewer CSS after our global CSS file. This means that rules which
are intended to override the default Chocolat CSS aren't working. The
fix is to move the line which includes the Chocolat CSS.

To test, apply the patch and enable the LocalCoverImages and
OPACLocalCoverImages system preferences.

- If necessary, add a local cover image to a bibliographic record.
- Go to the OPAC and perform a search which will return multiple
  record including the record with the cover image.
- Click the cover image to trigger the image viewer.
- The image viewer should not appear to be "behind" the search results
  toolbar.

Sponsored-by: Athens County Public Libraries
Signed-off-by: David Nind <david@davidnind.com>
Signed-off-by: Martin Renvoize <martin.renvoize@ptfs-europe.com>
Comment 6 Katrin Fischer 2024-12-23 09:38:00 UTC
Pushed for 25.05!

Well done everyone, thank you!
Comment 7 Alex Buckley 2025-02-20 20:54:02 UTC
not backporting to 24.05.x unless requested - dependency not in 24.05