Skip to content

Feature: Add Recently Viewed Books Section - #159

Open
Daksh7785 wants to merge 2 commits into
chinmay1126:mainfrom
Daksh7785:feature/recently-viewed-books
Open

Feature: Add Recently Viewed Books Section#159
Daksh7785 wants to merge 2 commits into
chinmay1126:mainfrom
Daksh7785:feature/recently-viewed-books

Conversation

@Daksh7785

Copy link
Copy Markdown
Contributor

resolves #158 |

Description

This Pull Request refactors the Recently Viewed Books feature to ensure a clean separation of React components, CSS, and application logic, improving maintainability, readability, and long-term scalability while preserving all existing functionality.

The implementation now fully follows the project's architectural guidelines and component-based folder structure defined in CONTRIBUTING.md.

Changes Included

  • Separated Styles

    • Removed inline styling from the recently viewed components.
    • Moved all visual styling into dedicated CSS files.
    • Ensured consistent styling through external stylesheets.
  • Separated Logic

    • Kept all recently viewed tracking logic inside dedicated React components.
    • Encapsulated localStorage interactions within the feature components.
    • Preserved component-level state management and routing behavior.
  • Component Cleanup

    • Simplified component structure by separating presentation and behavior.
    • Properly linked component-specific styles.
    • Preserved semantic markup and accessibility.
  • Project Structure

    • Maintained the feature-based folder structure.
    • Ensured a clear separation of concerns between UI, styling, and application logic.

Benefits

  • Cleaner code organization
  • Improved readability
  • Easier debugging and maintenance
  • Better scalability
  • Better collaboration among developers
  • Consistent project architecture

Related Issues

Resolves the Recently Viewed Books feature request.

Screenshots / Verification

  • ✅ No inline styling remains in the recently viewed components.
  • ✅ Component styles are properly linked.
  • ✅ Existing functionality remains unchanged after refactoring.
  • ✅ Recently viewed books are tracked correctly in localStorage.
  • ✅ Duplicate entries are prevented.
  • ✅ The list is capped at 10 items.
  • ✅ The current book is excluded from the Book Detail page carousel.
  • ✅ Horizontal scrolling works correctly across screen sizes.
  • ✅ Navigation to /books/:id functions correctly.
  • ✅ Responsive layout works correctly on desktop and mobile devices.

Checklist

  • ✅ Tested locally and confirmed working.
  • ✅ Follows CONTRIBUTING.md structural guidelines.
  • ✅ Components, styles, and logic are properly separated.
  • ✅ No inline styling in feature components.
  • ✅ No unnecessary inline JavaScript patterns.
  • ✅ React best practices followed.
  • ✅ No global variable pollution.
  • ✅ Semantic markup and accessibility maintained.
  • ✅ Existing functionality preserved after refactoring.

@vercel

vercel Bot commented Jul 29, 2026

Copy link
Copy Markdown

Someone is attempting to deploy a commit to the CHINMAY Team on Vercel.

A member of the Team first needs to authorize it.

@netlify

netlify Bot commented Jul 29, 2026

Copy link
Copy Markdown

Deploy Preview for book-shelf1126 failed.

Name Link
🔨 Latest commit cb3fe63
🔍 Latest deploy log https://app.netlify.com/projects/book-shelf1126/deploys/6a6a331422edd00008539470

@github-actions

Copy link
Copy Markdown

🎉 Thank you for opening this Pull Request!

We appreciate your contribution and effort toward improving this project.

A maintainer will review your PR soon.

Please ensure:
✅ Code follows project guidelines
✅ Changes are properly tested
✅ No sensitive data or API keys are exposed

Thank you for contributing to the community.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Feature: Add "Recently Viewed Books" Section

1 participant