NYPL-Simplified / circulation

Circulation manager for Library Simplified
Other
19 stars 19 forks source link

Add search faceted urls to search results #1899

Closed keithbauer closed 1 year ago

keithbauer commented 1 year ago

Description

Adds ordering facet links to search results for enabled facets.

Motivation and Context

This is a refactor of OE-927/#1883. This now returns only the ordering facets which was the original intent rather than all the facet links. Only enabled ordering facet links are generated (which is done via the admin).

The initial implementation built out links that pointed to /feed/, but the links should've been pointing to /search/. This caused some unexpected behavior since /feed/ wasn't handling some of the parameters that /search/ supported.

How Has This Been Tested?

Checklist:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (eb7673a) 92.56% compared to head (446601f) 92.56%.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1899 +/- ## ======================================== Coverage 92.56% 92.56% ======================================== Files 216 216 Lines 43650 43657 +7 ======================================== + Hits 40403 40410 +7 Misses 3247 3247 ``` | [Files Changed](https://app.codecov.io/gh/NYPL-Simplified/circulation/pull/1899?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NYPL-Simplified) | Coverage Δ | | |---|---|---| | [core/opds.py](https://app.codecov.io/gh/NYPL-Simplified/circulation/pull/1899?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NYPL-Simplified#diff-Y29yZS9vcGRzLnB5) | `94.92% <100.00%> (+0.03%)` | :arrow_up: |

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.