Skip to content

Conversation

@JPrevost
Copy link
Member

@JPrevost JPrevost commented Dec 3, 2025

Why are these changes being introduced:

  • Double quotes were breaking searches

Relevant ticket(s):

How does this address that need:

  • Updates our clean_term method in the Primo model to use URI.encode_www_form_component instead of our bespoke logic

Document any side effects to this change:

  • I believe this fixes some unreported issues with our clean_term method. We replaced a few characters with + and did some very odd things with ++ (likley to "help" with searching for c++) that seem to have been making things worse not better. Using the form encoding method seems to handle those types of searches much more in line with how Primo UI works.

Developer

Accessibility
  • ANDI or WAVE has been run in accordance to our guide.
  • This PR contains no changes to the view layer.
  • New issues flagged by ANDI or WAVE have been resolved.
  • New issues flagged by ANDI or WAVE have been ticketed (link in the Pull Request details above).
  • No new accessibility issues have been flagged.
New ENV
  • All new ENV is documented in README.
  • All new ENV has been added to Heroku Pipeline, Staging and Prod.
  • ENV has not changed.
Approval beyond code review
  • UXWS/stakeholder approval has been confirmed.
  • UXWS/stakeholder review will be completed retroactively.
  • UXWS/stakeholder review is not needed.
Additional context needed to review

E.g., if the PR includes updated dependencies and/or data
migration, or how to confirm the feature is working.

Code Reviewer

Code
  • I have confirmed that the code works as intended.
  • Any CodeClimate issues have been fixed or confirmed as
    added technical debt.
Documentation
  • The commit message is clear and follows our guidelines
    (not just this pull request message).
  • The documentation has been updated or is unnecessary.
  • New dependencies are appropriate or there were no changes.
Testing
  • There are appropriate tests covering any new functionality.
  • No additional test coverage is required.

@coveralls
Copy link

coveralls commented Dec 3, 2025

Pull Request Test Coverage Report for Build 19940776314

Details

  • 1 of 1 (100.0%) changed or added relevant line in 1 file are covered.
  • No unchanged relevant lines lost coverage.
  • Overall coverage remained the same at 97.883%

Totals Coverage Status
Change from base Build 19940736603: 0.0%
Covered Lines: 971
Relevant Lines: 992

💛 - Coveralls

@mitlib mitlib temporarily deployed to timdex-ui-pi-use-237-do-z76i6s December 3, 2025 14:41 Inactive
@JPrevost JPrevost force-pushed the use-237-double-quotes branch from d1b5728 to 48e9e04 Compare December 3, 2025 19:23
@JPrevost JPrevost temporarily deployed to timdex-ui-pi-use-237-do-z76i6s December 3, 2025 19:24 Inactive
@jazairi jazairi self-assigned this Dec 4, 2025
Copy link
Contributor

@jazairi jazairi left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Much better. 🙂

Why are these changes being introduced:

* Double quotes were breaking searches

Relevant ticket(s):

* https://mitlibraries.atlassian.net/browse/USE-237

How does this address that need:

* Updates our `clean_term` method in the Primo model to use
  `URI.encode_www_form_component` instead of our bespoke logic

Document any side effects to this change:

* I believe this fixes some unreported issues with our `clean_term`
  method. We replaced a few characters with `+` and did some very odd
  things with `++` (likley to "help" with searching for `c++`) that
  seem to have been making things worse not better. Using the form
  encoding method seems to handle those types of searches much more in
  line with how Primo UI works.
@JPrevost JPrevost force-pushed the use-237-double-quotes branch from 48e9e04 to 11c5926 Compare December 4, 2025 19:06
@JPrevost JPrevost temporarily deployed to timdex-ui-pi-use-237-do-z76i6s December 4, 2025 19:07 Inactive
@JPrevost JPrevost merged commit b1b9d12 into main Dec 4, 2025
5 checks passed
@JPrevost JPrevost deleted the use-237-double-quotes branch December 4, 2025 19: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.

5 participants