feat(creators): add infinite scroll to the creator directory - #601
Merged
Tybravo merged 1 commit intoAug 31, 2026
Merged
Conversation
Add the creator directory page and load its creators lazily instead of rendering the whole index up front. - useInfiniteScroll wraps the Intersection Observer API and observes a sentinel rendered below the grid, requesting the next page a viewport ahead of the user so scrolling stays smooth. - creatorService derives the directory from the public certificate index, grouping certificates by creator per page and folding repeats into the loaded entries so appending a page never duplicates a card. - The page supports debounced search, which restarts pagination, plus loading skeletons, an error state with retry, and an empty state. - A Load more button mirrors the observer for keyboard users and for browsers without Intersection Observer support.
|
@Deb-Auth Great news! 🎉 Based on an automated assessment of this PR, the linked Wave issue(s) no longer count against your application limits. You can now already apply to more issues while waiting for a review of this PR. Keep up the great work! 🚀 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Adds the creator directory at
/creatorsand loads its creators lazily, a page at a time, instead of rendering the whole index up front.closes #391
Note:
frontend/app/creators/did not exist onmain, so this PR introduces the directory page itself along with the lazy loading the issue asks for. Everything is scoped to the new route; no existing file is modified.Lazy loading
app/creators/hooks/useInfiniteScroll.tsA small hook around the Intersection Observer API:
enabledgates observation: it is false while a page is in flight, once the last page has loaded, and after an error, so the observer cannot fire redundant or looping loads.rootMargindefaults to200px, so the next page is typically in place before the user reaches the end of the list.onLoadMorecallback is held in a ref, so a new callback identity does not tear down and rebuild the observer.IntersectionObserverare handled by simply never triggering, which is why the page also keeps a manual control (below).app/creators/services/creatorService.tsThe backend has no dedicated creators endpoint, so the directory is derived from the public global certificate index that already powers
/search:fetchCreators({ page, pageSize, search, signal })requests one page of certificates and returns{ creators, hasMore }, wherehasMoreis true when the index returned a full page.groupCertificatesByCreatoraggregates a page into per-creator entries (asset count, most recent mint, asset categories), newest activity first.mergeCreatorsfolds repeats into the already-loaded entry rather than pushing a duplicate card, and preserves the existing order so the grid never reshuffles under the user mid-scroll.app/creators/page.tsxCreatorCards plus a sentinel below it; scrolling the sentinel into view appends the next page.AbortSignalon unmount and whenever the query or page changes, so a stale response can never overwrite a newer one.setStatecalls.app/creators/components/CreatorCard.tsxrenders one creator: monogram, display name with truncated wallet address, verified asset count, last mint date and category chips, linking through to that creator's assets in search. Address and date formatting reuse the existingapp/search/components/sharedhelpers.Verification
pnpm --filter web run buildcompiles successfully and/creatorsis emitted as a route.pnpm --filter web run lintreports no errors or warnings from the new files.