Bug 35638 - Upgrade Enquire JS library from v2.0.1 to v2.1.6
Summary: Upgrade Enquire JS library from v2.0.1 to v2.1.6
Status: Needs documenting
Alias: None
Product: Koha
Classification: Unclassified
Component: Architecture, internals, and plumbing (show other bugs)
Version: Main
Hardware: All All
: P5 - low enhancement (vote)
Assignee: Owen Leonard
QA Contact: Testopia
URL:
Keywords:
Depends on: 35584 29960
Blocks:
  Show dependency treegraph
 
Reported: 2023-12-22 12:34 UTC by Owen Leonard
Modified: 2024-05-22 14:03 UTC (History)
3 users (show)

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


Attachments
Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6 (34.03 KB, patch)
2023-12-22 13:03 UTC, Owen Leonard
Details | Diff | Splinter Review
Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6 (34.08 KB, patch)
2023-12-31 18:34 UTC, David Nind
Details | Diff | Splinter Review
Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6 (34.16 KB, patch)
2024-01-12 11:27 UTC, Jonathan Druart
Details | Diff | Splinter Review

Note You need to log in before you can comment on or make changes to this bug.
Description Owen Leonard 2023-12-22 12:34:06 UTC
The Enquire JS library hasn't been updated for a while, but we're still using an older version. Upgrading to 2.1.6 will bring us to the latest version.
Comment 1 Owen Leonard 2023-12-22 13:03:23 UTC
Created attachment 160236 [details] [review]
Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6

This patch upgrades enquire.js in the OPAC to the latest version,
v.2.1.6. The patch also moves the file (enquire.min.js) into its own
directory for consistency's sake.

Enquire.js lets us use CSS-like "breakpoints" to trigger JS actions. We
use it to in "mobile" views (narrower browser widths): Collapsing the
facets menu and triggering automatic scroll to "main content."

The patch also removes media.match.js which should have been removed in
Bug 29960. At that time Enquire.js required that we used Modernizr to
load media.match.js as a polyfill for older browsers.

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

- In the OPAC, perform a catalog search which will return results.
- At wider browser widths the facets menu will appear in the left-hand
  sidebar.
- When you narrow your browser until the viewport is less than 992
  pixels wide* the facets menu should collapse into a "Refine your
  search" button above the search results.
- If you narrow your browser width to below 600 pixels wide and reload
  the search results page, the browser should automatically scroll down
  so that the "Your search..." heading is at the top of the viewport.

* Use Firefox's Responsive Design Mode to get pixel-level control over
  viewport width: https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/
  In Chrome it's called "Device Mode."
Comment 2 David Nind 2023-12-31 18:34:40 UTC
Created attachment 160380 [details] [review]
Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6

This patch upgrades enquire.js in the OPAC to the latest version,
v.2.1.6. The patch also moves the file (enquire.min.js) into its own
directory for consistency's sake.

Enquire.js lets us use CSS-like "breakpoints" to trigger JS actions. We
use it to in "mobile" views (narrower browser widths): Collapsing the
facets menu and triggering automatic scroll to "main content."

The patch also removes media.match.js which should have been removed in
Bug 29960. At that time Enquire.js required that we used Modernizr to
load media.match.js as a polyfill for older browsers.

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

- In the OPAC, perform a catalog search which will return results.
- At wider browser widths the facets menu will appear in the left-hand
  sidebar.
- When you narrow your browser until the viewport is less than 992
  pixels wide* the facets menu should collapse into a "Refine your
  search" button above the search results.
- If you narrow your browser width to below 600 pixels wide and reload
  the search results page, the browser should automatically scroll down
  so that the "Your search..." heading is at the top of the viewport.

* Use Firefox's Responsive Design Mode to get pixel-level control over
  viewport width: https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/
  In Chrome it's called "Device Mode."

Signed-off-by: David Nind <david@davidnind.com>
Comment 3 David Nind 2023-12-31 18:57:48 UTC
Things I noted from testing (using KTD):

1. After the search results, the block for making a purchase suggestion only appears if you are logged in to the OPAC (Block text: Not finding what you're looking for? Make a purchase suggestion).

2. The link in the text under the number of search results, but before the results pagination section, gives you a blank page:
   - Text is "Not what you expected? Check for suggestions"
   - 'suggestions' is linked to /cgi-bin/koha/svc/suggestion?render=standalone&q=cat
   - I have created bug 35676 for this
Comment 4 Jonathan Druart 2024-01-12 11:27:50 UTC
Created attachment 160935 [details] [review]
Bug 35638: Upgrade Enquire JS library from v2.0.1 to v2.1.6

This patch upgrades enquire.js in the OPAC to the latest version,
v.2.1.6. The patch also moves the file (enquire.min.js) into its own
directory for consistency's sake.

Enquire.js lets us use CSS-like "breakpoints" to trigger JS actions. We
use it to in "mobile" views (narrower browser widths): Collapsing the
facets menu and triggering automatic scroll to "main content."

The patch also removes media.match.js which should have been removed in
Bug 29960. At that time Enquire.js required that we used Modernizr to
load media.match.js as a polyfill for older browsers.

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

- In the OPAC, perform a catalog search which will return results.
- At wider browser widths the facets menu will appear in the left-hand
  sidebar.
- When you narrow your browser until the viewport is less than 992
  pixels wide* the facets menu should collapse into a "Refine your
  search" button above the search results.
- If you narrow your browser width to below 600 pixels wide and reload
  the search results page, the browser should automatically scroll down
  so that the "Your search..." heading is at the top of the viewport.

* Use Firefox's Responsive Design Mode to get pixel-level control over
  viewport width: https://firefox-source-docs.mozilla.org/devtools-user/responsive_design_mode/
  In Chrome it's called "Device Mode."

Signed-off-by: David Nind <david@davidnind.com>

Signed-off-by: Jonathan Druart <jonathan.druart@bugs.koha-community.org>
Comment 5 Katrin Fischer 2024-03-22 09:37:18 UTC
Pushed for 24.05!

Well done everyone, thank you!
Comment 6 Fridolin Somers 2024-05-22 14:03:47 UTC
Not backported to 23.11.x