Skip to content

Add virtualization to DomainRankingsTable#8

Closed
Copilot wants to merge 2 commits into
masterfrom
copilot/add-virtualization-ranking-list
Closed

Add virtualization to DomainRankingsTable#8
Copilot wants to merge 2 commits into
masterfrom
copilot/add-virtualization-ranking-list

Conversation

Copy link
Copy Markdown

Copilot AI commented Feb 21, 2026

The rankings list renders all entries in the DOM simultaneously, causing unnecessary work as the list grows.

Changes

  • @tanstack/react-virtual: Added as dependency for windowed list rendering.
  • DomainRankingsTable.tsx: Replaced rankings.map(...) in the full list section with a virtualized scroll container using useVirtualizer:
    • max-h-[600px] scrollable container with parentRef
    • Absolutely-positioned rows via translateY(virtualRow.start) within a full-height inner div
    • estimateSize: 56px, overscan: 5
    • First-row border conditionally suppressed to preserve original divider appearance
const rowVirtualizer = useVirtualizer({
  count: rankings.length,
  getScrollElement: () => parentRef.current,
  estimateSize: () => 56,
  overscan: 5,
})

The top-3 podium section is unchanged — virtualization applies only to the scrollable full list below it.

Original prompt

Add virtualization for the ranking list so we don't render the entire list.


✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

@vercel
Copy link
Copy Markdown
Contributor

vercel Bot commented Feb 21, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
citable Ready Ready Preview, Comment Feb 21, 2026 1:17pm

Co-authored-by: dacs30 <60863302+dacs30@users.noreply.github.com>
Copilot AI changed the title [WIP] Add virtualization for ranking list rendering Add virtualization to DomainRankingsTable Feb 21, 2026
Copilot AI requested a review from dacs30 February 21, 2026 13:17
Copy link
Copy Markdown
Owner

@dacs30 dacs30 left a comment

Choose a reason for hiding this comment

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

Can we not use the current lib that was suggested?

@dacs30 dacs30 closed this Feb 24, 2026
Copilot AI requested a review from dacs30 February 24, 2026 21:55
Copilot stopped work on behalf of dacs30 due to an error February 24, 2026 21:55
@dacs30 dacs30 deleted the copilot/add-virtualization-ranking-list branch February 24, 2026 21:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants