8000 [8.x] Backport facet modal bugfixes by seanaery · Pull Request #3568 · projectblacklight/blacklight · GitHub
[go: up one dir, main page]
More Web Proxy on the site http://driver.im/
Skip to content

[8.x] Backport facet modal bugfixes #3568

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Apr 16, 2025
Merged

Conversation

seanaery
Copy link
Contributor

This PR ports several related facet modal bugfixes that were recently made in main back to the release-8.x branch:

The net effect of these changes in a Blacklight 8.x application:

  • Clicking more in a facet will open the modal for further exploration as expected. The modal will now have a slightly darker backdrop, matching the style for Bootstrap modals.
  • The modal will intentionally display the prev/next nav and sort options both at the top and bottom of the modal, and not above the modal header/title.
  • If a facet has been configured with index_range: 'A'..'Z' (or other range), the resulting A to Z nav will now appear in a gray box, and will wrap correctly at narrow viewports.
  • If a facet has been configured with suggest: true, the facet filter input (added in 8.8.0) will also appear in a gray box, and will now work in concert with the sort options (as well as the index_range A-Z nav if present).
  • A facet page, e.g., /catalog/facet/subject_ssim -- the facet UI displayed outside of a modal -- will now be presentable and useful; all the nav elements will now look correct on that page.

jcoyne and others added 8 commits April 10, 2025 14:01
I don't think this is required or necessarily desirable. Remove it as it's easier to add in this pagination in a local app than it is to remove it when it's not desired
 #3532

- BS5 btn classes are not meant for span tags (see https://getbootstrap.com/docs/5.3/components/buttons/#button-tags)
- BS5 disabled buttons should not have an href, and should use aria-disabled="true" (see https://getbootstrap.com/docs/5.3/components/buttons/#disabled-state)
… and starting letter nav. Fixes #3515.

- pass the search_facet_path into the input as a data-attribute; it has the facet's current search context
- hide the facet's prev/next nav links when a user has entered text in the facet filter
- add a .facet-suggestions class to distinguish suggested facet values from regular
- check for .facet-suggestions in JS specs before checking other expectations, otherwise the debounce makes timing unpredictable
- original fix only added wrap for .pagination up to sm breakpoint; no harm in it applying at all widths
…ls. Fixes #3524

- render pagination & sort links near the top so scrolling isn't necessary to see/click them
- style the top & bottom nav consistently
- ensure these elements wrap appropriately in mobile/narrow viewports
- improve display of facet browse UI when viewed on a facet page (as opposed to modal)
…appear if it's empty. Fixes #3552.

- this area will be empty for facets configured with suggest: false
- uses a simple :has CSS rule rather than complicate the template rendering
- Uses black w/0.5 opacity by default to match BS4 & BS5 modals (native dialog uses 0.1)
- Adds --bl-modal-backdrop-bg CSS variable for downstream customization
@seanaery
Copy link
Contributor Author

Demo modal backdrop, with index_range, suggest, A-Z sort, and filter input:
Screenshot 2025-04-11 at 11 10 58 AM

Demo facet page:
Screenshot 2025-04-11 at 11 13 10 AM

@seanaery seanaery marked this pull request as draft April 11, 2025 16:06
… specs

- In 8.x this feature is off by default, but on in 9.x
@seanaery seanaery force-pushed the bl8-backport-facet-modal-fixes branch from 5c6f454 to b56ff25 Compare April 11, 2025 16:57
@seanaery seanaery marked this pull request as ready for review April 11, 2025 17:03
@jcoyne jcoyne merged commit 77ceb36 into release-8.x Apr 16, 2025
13 checks passed
@jcoyne jcoyne deleted the bl8-backport-facet-modal-fixes branch April 16, 2025 18:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants
0