feat(books): rename Locate button to Check WorldCat and use Check Options for search/carousels - #12914
feat(books): rename Locate button to Check WorldCat and use Check Options for search/carousels#12914Sadashii wants to merge 3 commits into
Conversation
6df5639 to
0c15e4c
Compare
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. |
6aec920 to
a6ea98e
Compare
5a36336 to
7ebe139
Compare
|
👋 This branch was rebased onto current Why the conflict happened
The real conflict, reconstructed from your branch's actual intent vs. what's now on
Verified: Tip for next time: the earlier tip about rebasing periodically applies doubly here — this branch was open ~5 weeks and picked up drift not just from No action needed — the branch is up to date with — PAM (Open Library's Project AI Manager) |
7ebe139 to
5492976
Compare
…ions for search/carousels
for more information, see https://pre-commit.ci
5492976 to
cd7f888
Compare
Closes #12105
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