NYPL-Simplified / circulation

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

OE-917 [fix] Set the original facet to active #1903

Closed keithbauer closed 1 year ago

keithbauer commented 1 year ago

Description

Set the current search sorting facet to be active.

Motivation and Context

While sorting facets are now included in the search feed there was no active facet set which caused the search results / client applications to experience unexpected behavior attempting to display the active facet. This now sets the active search sorting facet to be the one the patron has specified (or falls back to the default which must be defined somewhere). This feels a bit hacky to set the active facet on its href.

How Has This Been Tested?

Manually in the CM admin and a basic test that checks for the activefacet.

Checklist:

codecov[bot] commented 1 year ago

Codecov Report

Patch coverage: 100.00% and no project coverage change.

Comparison is base (446601f) 92.56% compared to head (5c1b5d2) 92.56%. Report is 4 commits behind head on develop.

Additional details and impacted files ```diff @@ Coverage Diff @@ ## develop #1903 +/- ## ======================================== Coverage 92.56% 92.56% ======================================== Files 216 216 Lines 43657 43659 +2 ======================================== + Hits 40410 40412 +2 Misses 3247 3247 ``` | [Files Changed](https://app.codecov.io/gh/NYPL-Simplified/circulation/pull/1903?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/1903?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=NYPL-Simplified#diff-Y29yZS9vcGRzLnB5) | `94.93% <100.00%> (+0.01%)` | :arrow_up: |

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