Skip to content

feat(books): rename Locate button to Check WorldCat and use Check Options for search/carousels#12914

Open
Sadashii wants to merge 2 commits into
internetarchive:masterfrom
Sadashii:feat/rename-locate-to-worldcat
Open

feat(books): rename Locate button to Check WorldCat and use Check Options for search/carousels#12914
Sadashii wants to merge 2 commits into
internetarchive:masterfrom
Sadashii:feat/rename-locate-to-worldcat

Conversation

@Sadashii

@Sadashii Sadashii commented Jun 12, 2026

Copy link
Copy Markdown
Collaborator

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

  • Renamed the LocateButton.html macro to CheckWorldcat.html and changed user-facing string labels to Check WorldCat.
  • Created conditional logic inside LoanStatus.html:
    • edition_page=True (passed from the edition/work view template) renders the CheckWorldcat button.
    • When is_edition is True but it is not on the book page itself (e.g., search results, carousels, editions list), it renders a Check Options button linking to the work page ($work_key).
  • Retained the CTAClick|Locate telemetry event action for click analytics to avoid breaking historical dashboards.

Testing

  1. Run python template tests:
    uv run --with-requirements requirements_test.txt pytest openlibrary/tests/test_templates.py
  2. Run standard lint checks:
    npm run lint

Screenshot

image image

Stakeholders

@mekarpeles

@Sadashii Sadashii force-pushed the feat/rename-locate-to-worldcat branch from 6df5639 to 0c15e4c Compare June 12, 2026 18:42
@Sadashii Sadashii marked this pull request as ready for review June 12, 2026 18:45
Copilot AI review requested due to automatic review settings June 12, 2026 18:45

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

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 LoanStatus call sites and signature to use edition_page context.
  • 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.

Comment thread openlibrary/macros/LoanStatus.html Outdated
Comment thread openlibrary/macros/LoanStatus.html
Comment thread openlibrary/macros/databarWork.html Outdated
Comment thread openlibrary/templates/books/edition-sort.html
Comment thread openlibrary/i18n/messages.pot
@Sadashii Sadashii force-pushed the feat/rename-locate-to-worldcat branch from 9c12690 to 735016c Compare June 12, 2026 18:50
@Sadashii Sadashii force-pushed the feat/rename-locate-to-worldcat branch from 6aec920 to a6ea98e Compare June 12, 2026 18:58
@mekarpeles mekarpeles self-assigned this Jun 15, 2026
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.

3 participants