Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(ui): more reviews can be loaded with a see more button #194

Merged
merged 12 commits into from
Sep 1, 2024

Conversation

Jansen52x
Copy link
Collaborator

closes #144

Context

Previously, there's no way for users to load more reviews than what is initially loaded. This change adds the functionality through a see more button.

Changes

  1. See more button added which loads an additional 10 reviews after initial 10

  2. New component (LoadMoreReviews) added to handle additional reviews

  3. Misc: Changed reviews.json to have identifiable text to distinguish between reviews

Implementation Details

  1. Page.tsx will call both the initial set of reviewItems as well as LoadMoreReviews component.
  2. Clicking the see more button each time will add the next 10 reviews to the list of reviews in the LoadMoreReviews component, separate from the initial 10 reviews.
  3. useRef used such that the page isn't reloaded upon the see more button click

How to Test

On the main page, can scroll to the button and click See More, you will see 10 more reviews loaded

Checklist

  • I have read the CONTRIBUTING document
  • I have tested the changes
  • (where applicable) I have added tests to cover my changes
  • (where applicable) I have updated the documentation accordingly

1) See more button added which loads an additional 10 reviews after initial 10

2) New component (LoadMoreReviews) added to handle additional reviews

3) Misc: Changed reviews.json to have identifiable text to distinguish between reviews
@Jansen52x Jansen52x added the enhancement New user-facing feature or request. This Label is used as a category on release notes. label Jul 15, 2024
@Jansen52x Jansen52x requested a review from davidlhw July 15, 2024 15:46
@Jansen52x Jansen52x linked an issue Jul 15, 2024 that may be closed by this pull request
Copy link

vercel bot commented Jul 15, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
afterclass-io-v2 ✅ Ready (Inspect) Visit Preview 💬 Add feedback Sep 1, 2024 5:30pm

Still haven't cleared the bugs and the "check in view" is still not cleaned/working
Copy link
Contributor

@davidlhw davidlhw left a comment

Choose a reason for hiding this comment

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

thank you for the PR! :)

changes mostly look great, just a couple of minor comments

prisma/data/9_reviews.json Show resolved Hide resolved
@davidlhw davidlhw merged commit fefbaf9 into main Sep 1, 2024
5 checks passed
@davidlhw davidlhw deleted the 144-featui-infinite-scrolling-for-review-section branch September 1, 2024 17:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New user-facing feature or request. This Label is used as a category on release notes.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Feat][UI] infinite scrolling for review section
2 participants