Bug 23492

Summary: OPAC search facet header should not be a link at larger browser widths
Product: Koha Reporter: Owen Leonard <oleonard>
Component: OPACAssignee: Owen Leonard <oleonard>
Status: CLOSED FIXED QA Contact: Testopia <testopia>
Severity: normal    
Priority: P5 - low CC: andrew, fridolin.somers, lucas, martin.renvoize, nick
Version: Main   
Hardware: All   
OS: All   
See Also: https://bugs.koha-community.org/bugzilla3/show_bug.cgi?id=23481
Change sponsored?: --- Patch complexity: Small patch
Documentation contact: Documentation submission:
Text to go in the release notes:
Version(s) released in:
19.11.00
Circulation function:
Attachments: Bug 23492: OPAC search facet header should not be a link at larger browser widths
Bug 23492: OPAC search facet header should not be a link at larger browser widths
Bug 23492: OPAC search facet header should not be a link at larger browser widths

Description Owen Leonard 2019-08-22 14:56:38 UTC
When viewing the OPAC at a browser width < 768 pixels ("mobile view"), the search facets header, "Refine your search" is a link which expands the search facets.

In "desktop view," when the facets are not hidden, the "Refine your search" header should not be a link which collapses the facets. Having it look like a link is deceptive because clicking it doesn't do anything useful.
Comment 1 Owen Leonard 2019-08-22 16:48:51 UTC Comment hidden (obsolete)
Comment 2 Lucas Gass (lukeg) 2019-08-22 21:50:28 UTC Comment hidden (obsolete)
Comment 3 Lucas Gass (lukeg) 2019-08-22 21:53:35 UTC
Having never signed off on a bug where it is necessary to regenerate the CSS I did this:

-Applied patch
-regenerated CSS
-Tested
-git reset --hard origin/master
-Re-applied the patch
-Signed off.
Comment 4 Nick Clemens (kidclamp) 2019-08-23 14:02:59 UTC
Created attachment 92447 [details] [review]
Bug 23492: OPAC search facet header should not be a link at larger browser widths

This patch adds some JavaScript-driven "breakpoints" to the OPAC so that
on the search results page the "Refine your search" heading has
different behaviors depending on whether facets are being displayed as a
sidebar.

To test, apply the patch and regenerate the OPAC SCSS
(https://wiki.koha-community.org/wiki/Working_with_SCSS_in_the_OPAC_and_staff_client).

Go to the OPAC and resize your browser to be greater than ~ 800px wide.

 - Perform a catalog search which will return several results.
 - In the left-hand sidebar of the search results page, the "Refine your
   search" heading should not be styled like a link. Hovering over it
   with the mouse should not change the cursor to the pointing-hand.
 - Narrow your browser window until the sidebar collapses.
   - The "Refine your search" heading should now be styled as a link,
     with a right-arrow icon before it.
   - Clicking it should expand the facets. The icon should change to a
     down-arrow.
 - Widen your browser window and test again.

 - Perform the same tests when starting with a narrow browser window.

Signed-off-by: Lucas Gass <lucas@bywatersolutions.com>

Signed-off-by: Nick Clemens <nick@bywatersolutions.com>
Comment 5 Nick Clemens (kidclamp) 2019-08-23 14:03:37 UTC
RM may want a second QA here - this is tiny though and we are the ones squeaking about it, so I went ahead and PQA
Comment 6 Andrew Fuerste-Henry 2019-08-23 14:04:35 UTC
*** Bug 23481 has been marked as a duplicate of this bug. ***
Comment 7 Martin Renvoize (ashimema) 2019-09-09 10:22:33 UTC
This looks sane enough to me and a quick test is positive.. happy to accept the PQA as is :)
Comment 8 Martin Renvoize (ashimema) 2019-09-09 10:22:43 UTC
This looks sane enough to me and a quick test is positive.. happy to accept the PQA as is :)
Comment 9 Martin Renvoize (ashimema) 2019-09-09 10:34:15 UTC
Nice work!

Pushed to master for 19.11.00
Comment 10 Fridolin Somers 2019-09-13 12:42:30 UTC
Enhancement not pushed to 19.05.x