Skip to content

Fix: Added want to read button on trending page#13120

Open
dvvrtmshra wants to merge 1 commit into
internetarchive:masterfrom
dvvrtmshra:12810/fix/want-to-read-button
Open

Fix: Added want to read button on trending page#13120
dvvrtmshra wants to merge 1 commit into
internetarchive:masterfrom
dvvrtmshra:12810/fix/want-to-read-button

Conversation

@dvvrtmshra

Copy link
Copy Markdown

Closes #12810

Technical

The SearchResultsWork macro call in trending.html was missing the include_dropper=True parameter, so the reading-log widget (which renders the "Want to Read" button) was never rendered on trending pages. Every other listing page that shows this widget (work_search.html, type/author/view.html, type/list/view_body.html) already passes this flag.

Added include_dropper=True to the macro call at openlibrary/templates/trending.html:31. No changes needed elsewhere — the dropper uses async_load=True internally, so reading-log state is fetched client-side, and trending pages already provide Solr work documents via the solr_work code path in SearchResultsWork.html.

- $:macros.SearchResultsWork(entry['work'], extra=extra, availability=entry['work'].get('availability'), seq_index=loop.index0)
+ $:macros.SearchResultsWork(entry['work'], extra=extra, availability=entry['work'].get('availability'), seq_index=loop.index0, include_dropper=True)

Testing

  1. Log in and visit /trending/now.
  2. Confirm each book in the list now shows a "Want to Read" button.
  3. Click the button and confirm it opens the reading-log dropdown and updates state as expected (matching behavior on /search).
  4. Check the other trending sub-pages (e.g. /trending/daily, /trending/weekly, /trending/yearly) to confirm the button appears there too.
  5. Log out and revisit /trending/now to confirm logged-out behavior is unaffected/consistent with other listing pages.

Stakeholders

@openlibrary-bot

Copy link
Copy Markdown
Collaborator

Thanks for the PR, @dvvrtmshra!

@mekarpeles is assigned to this PR and currently has:

  • 2 open PR(s) of equal or higher priority to review first
PR triage checklist (maintainers / Richy)
  • PR description — not empty; explains what the change does and how to verify it
  • References an issue — PR body contains a #NNN reference
    • Linked issue is triaged — has a Priority: * label (not just Needs: Triage)
    • Linked issue is assigned — has at least one assignee
  • Commit history clean — no WIP/fixup/conflict noise; commit messages are meaningful
  • CI passing — no failing check-runs
  • Test cases present — if the change touches substantive logic, test coverage exists or is explained
  • Proof of testing — PR body includes a description of what was tested, a screenshot, or a video

Note

This comment was automatically generated by PAM, Open Library's Project AI Manager. PAM provides status visibility, performs basic project management functions, and gives actionable feedback so contributors aren't left waiting.

@mekarpeles mekarpeles force-pushed the 12810/fix/want-to-read-button branch from 65fd896 to 3386bd1 Compare July 4, 2026 06:12
@github-actions github-actions Bot added the Needs: Response Issues which require feedback from lead label Jul 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Needs: Response Issues which require feedback from lead

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Want to read button missing from trending pages

3 participants