feat(books): rename Locate button to Check WorldCat and use Check Options for search/carousels#12914
Open
Sadashii wants to merge 2 commits into
Open
feat(books): rename Locate button to Check WorldCat and use Check Options for search/carousels#12914Sadashii wants to merge 2 commits into
Sadashii wants to merge 2 commits into
Conversation
6df5639 to
0c15e4c
Compare
Contributor
There was a problem hiding this comment.
Pull request overview
Note
Copilot was unable to run its full agentic suite in this review.
This PR updates Open Library’s “read/locate” CTAs to use a WorldCat-oriented flow and adjusts LoanStatus behavior based on page context.
Changes:
- Update
LoanStatuscall sites and signature to useedition_pagecontext. - Replace “Locate” UI with “Check WorldCat” / “Check Options” CTAs in read-related macros.
- Add new i18n strings for the updated CTA text.
Reviewed changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.
Show a summary per file
| File | Description |
|---|---|
| openlibrary/templates/books/edition-sort.html | Updates LoanStatus invocation, removing the prior page-context flag. |
| openlibrary/macros/databarWork.html | Passes new edition_page argument into LoanStatus. |
| openlibrary/macros/ReadButton.html | Switches locate action to CheckWorldcat. |
| openlibrary/macros/LocateButton.html | Renames displayed CTA copy to “Check WorldCat”. |
| openlibrary/macros/LoanStatus.html | Changes macro signature and rewrites unavailable-state CTA logic. |
| openlibrary/i18n/messages.pot | Adds i18n strings for new CTA labels and help text. |
9c12690 to
735016c
Compare
…ions for search/carousels
6aec920 to
a6ea98e
Compare
for more information, see https://pre-commit.ci
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR renames the "Locate" button to "Check WorldCat" on the book/edition page, and changes the label to "Check Options" (pointing back to the book/work page) in search results, carousels, and the editions table when a specific edition is unavailable.
Technical
LocateButton.htmlmacro toCheckWorldcat.htmland changed user-facing string labels toCheck WorldCat.LoanStatus.html:edition_page=True(passed from the edition/work view template) renders theCheckWorldcatbutton.is_editionisTruebut it is not on the book page itself (e.g., search results, carousels, editions list), it renders aCheck Optionsbutton linking to the work page ($work_key).CTAClick|Locatetelemetry event action for click analytics to avoid breaking historical dashboards.Testing
uv run --with-requirements requirements_test.txt pytest openlibrary/tests/test_templates.pynpm run lintScreenshot
Stakeholders
@mekarpeles