Skip to content

Conversation

@KrishnaShuk
Copy link
Contributor

@KrishnaShuk KrishnaShuk commented Dec 7, 2025

Closes #11371

This PR implements the initial version of the "Continue Reading" carousel on the homepage. It displays the currently active loans for logged-in users.

Technical

  • Backend (partials.py): Added ContinueReadingPartial handler.

    • Fetches the current user's active loans using get_loans_of_user.
    • Formats the book data for the custom_carousel template.
    • Returns an empty response if the user is not logged in or has no loans.
  • Frontend (index.html): Added a lazy-carousel placeholder.

    • The placeholder is always rendered in the cached homepage template.
    • Client-side JavaScript fetches the content via /partials.json?_component=ContinueReading.
    • This approach ensures user-specific content can be displayed on the globally cached homepage.
  • Pending Work

    • Loan History
    • Availability Buttons

Testing

  • Verified locally using mock loans.
  • Confirmed that the carousel does not appear for logged-out users.
  • Confirmed that the carousel loads asynchronously without blocking the page load.

Screenshot

image

Stakeholders

@KrishnaShuk KrishnaShuk changed the title Initial Commit Feat: Added Continue Reading Carousel on Homepage Dec 7, 2025
- Added ContinueReadingPartial in partials.py to fetch user's active loans
- Added lazy-carousel placeholder in index.html for logged-in users
- Updated i18n messages.pot for new strings
@KrishnaShuk KrishnaShuk force-pushed the 11371/feat/ContinueReadingCarousel branch from 2186b76 to 2b6ea0c Compare December 10, 2025 06:46
@KrishnaShuk KrishnaShuk marked this pull request as ready for review December 10, 2025 07:13
@mekarpeles mekarpeles self-assigned this Dec 15, 2025
@KrishnaShuk
Copy link
Contributor Author

@mekarpeles need your brief guidance on the completion of this feature. I have used mock loan books for accessing the feature as archive api key is not provided.
I need you to check the present logic so i can further complete this.

@github-actions github-actions bot added the Needs: Response Issues which require feedback from lead label Dec 17, 2025
@mekarpeles mekarpeles assigned jimchamp and unassigned mekarpeles Dec 17, 2025
@mekarpeles
Copy link
Member

Looks like the feature is headed in the right direction. It should only show up if the patron is logged in and has loans. Since this code is touching partials, I am handing it off to @jimchamp

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.

Continue Reading Carousel on Homepage

3 participants