Load favorites 25 at a time with Load More #367
Labels
No labels
automated
code-quality
component: admin dashboard
component: backend
component: billing
component: content management
component: faqs
component: game genres
component: game lists
component: game reviews
component: game search
component: games
component: internal notifications
component: platforms
component: security
component: tests
component: user api
component: user badges
component: user blogs
component: user consoles
component: user favorites
component: user friends
component: user notifications
component: user profiles
component: user site notifications
component: user wishlists
component: web design
dependencies
php
priority
high
priority
low
priority
medium
security-hotspot
source: codex
source: sonarqube
status
awaiting feedback
status
backlog
status
done
status
in progress
status
in queue
status
in review
status
needs codex review
status
needs investigation
status
wontfix
type: bug
type: documentation
type: feature
type: improvement
type: regression
type: task
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
MyVideoGameList/myvideogamelist.com#367
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Summary
Update the Favorites page so it initially loads only the newest 25 eligible favorite entries, then lets the user load 25 more at a time.
Current behavior
FavoriteController::show()loads every eligible favorite entry for the selected user withget(). The page currently orders bysort_orderandid.Desired behavior
favorites.created_atnewest first, with a stable secondary order./listsbehavior./favoritesview working.Implementation notes
The
/listspage already has a progressive Load More pattern inGameListControllerandresources/js/app.js. Reuse that approach where practical instead of introducing a separate pagination style.Acceptance criteria
/favorites/{username?}initially renders at most 25 eligible favorite entries.favorites.created_atfirst.Implemented in
f82bd1f(Load favorites progressively).Notes:
FavoriteController::show()now cursor-paginates eligible favorites 25 at a time, ordered byfavorites.created_atnewest first withfavorites.idas the stable secondary order./favorites/{username?}route handles both full-page and Load More JSON requests viaX-MVGL-Favorites-Load-More.next_url: null.Verification:
php artisan test --compact tests/Feature/FavoriteTest.php- 27 passedvendor/bin/pint --dirty --format agent- passednpm run build- passed