internetarchive / internetarchive/openlibrary

Continue Reading Carousel on Homepage

Open
#11,371 5 comments 0 reactions 1 assignee Claimed by @KrishnaShuk View on GitHub
Lead: @mekarpeles Module: Carousels Priority: 2 Type: Feature Request
Dominant language
Python
Stars
6.7k
Forks
2k
Avg merge
2d 14h
Merged PRs (30d)
126

Description

### Feature Request

### Problem / Opportunity

Adding a "Continue Reading" carousel to the homepage.

Many patrons who visit Open Library are returning to Open Library to continue reading books -- either from their loans or from their reading history.

## Breakdown

### Related files

Refer to [this map of common Endpoints](https://github.com/internetarchive/openlibrary/wiki/Endpoints):
The code for getting loan history is here:
https://github.com/internetarchive/openlibrary/blob/41770600c73c805c6fe521f6d749d9c4f1257a79/openlibrary/plugins/upstream/account.py#L1222-L1241

Here's how the loan history is rendered as html:
https://github.com/internetarchive/openlibrary/blob/41770600c73c805c6fe521f6d749d9c4f1257a79/openlibrary/templates/account/loan_history.html#L5

The area in the homepage where we want to include the carousel is here:
https://github.com/internetarchive/openlibrary/blob/41770600c73c805c6fe521f6d749d9c4f1257a79/openlibrary/templates/home/index.html#L18

The backend logic that renders the homepage is https://github.com/internetarchive/openlibrary/blob/41770600c73c805c6fe521f6d749d9c4f1257a79/openlibrary/plugins/openlibrary/home.py#L34-L47

Existing "My Loans" carousels:
https://github.com/internetarchive/openlibrary/blob/master/openlibrary/templates/account/loans.html

https://github.com/internetarchive/openlibrary/blob/master/openlibrary/plugins/upstream/mybooks.py#L64

### Proposal

The idea is to add a carousel on the homepage titled "Continue Reading" (the string should use internationalization syntax). The carousel should include their active loans and then up to 20 additional books from their loan history.

### Requirements Checklist
Checklist of requirements that need to be satisfied in order for this issue to be closed:
* [ ]

### Stakeholders

*


### Instructions for Contributors

* **Before** [creating a new branch](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#making-changes-and-creating-a-pull-request) or pushing up changes to a PR, please first [run these commands](https://github.com/internetarchive/openlibrary/wiki/Git-Cheat-Sheet#working-on-your-branch) to ensure your repository is up to date, as the pre-commit bot may add commits to your PRs upstream.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.