software-students-fall2021 / project-setup-penguin

project-setup-penguin created by GitHub Classroom
3 stars 4 forks source link

implemented infinite scrolling with paginated GET deck endpoint #177

Closed kdduan closed 2 years ago

kdduan commented 2 years ago

as title.

on the FE added infinite scrolling to the deck view page. will load 9 cards initially, and when the user scrolls to the bottom of the page, it will will continue to load in cards in batches of 9 until there are no more cards left. for now, the cards are sorted alphabetically by name.

on the BE tweaked the GET deck endpoint to be paginated. also modified how we're querying Mongo to join (populate) the deck card Ids with card objects, sort the card array by name, skip a specified num of documents, and limit the num of documents returned.

to see it working, I created an deck to demo infinite scrolling with the access code: srMj-PGlb