Hacktoberfest 2026:メンテナが10月に向けて印を付けた、オープンで初心者向けの issue。 Hacktoberfest の issue を見る

Performance: Add pagination/infinite scroll to directory for large datasets

オープン
#28 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

まだ誰も着手していません。

評価

難易度
4/5
見積もり時間
3〜5日
初心者へのやさしさ
55/100
issue の種類
機能追加
明瞭さ
おおむね明確
活発さ
活発
技術スタック
next.js, typescript

調査の方向性

Start by reading src/app/directory/page.tsx and src/lib/resources.ts to trace how getAllResources() loads the full dataset, then inspect src/components/directory/directory-client.tsx and its PAGE_SIZE behavior. Use the existing directory flow as the entry point; done means resources are fetched in pages and the directory uses pagination or infinite scroll without loading all approved resources server-side.

索引モデルが issue の本文から書いたものです。

説明

enhancement good first issue

Description

The directory currently loads all resources server-side (~600 rows) and paginates client-side with a "Load more" button (30 per page, src/components/directory/directory-client.tsx line 15). As the dataset grows, this will become a performance issue.

Current State

  • src/app/directory/page.tsx loads ALL resources via getAllResources() (line 23-24)
  • src/lib/resources.ts getAllResources() fetches all approved resources (line 71-83)
  • Client-side pagination in DirectoryClient with PAGE_SIZE = 30 (line 15)

Expected Behavior

Implement server-side pagination with cursor or offset-based pagination:

  1. Add page/limit or cursor/limit params to directory URL
  2. Modify getAllResources() to accept pagination params
  3. Update DirectoryClient to fetch next page via API or Server Action
  4. Replace "Load more" with infinite scroll or paginated navigation

Good First Issue Because

  • Clear performance improvement
  • Involves both frontend and backend changes
  • Good for learning Next.js data fetching patterns
  • Can be done incrementally (API first, then UI)

Files to Modify

  • src/app/directory/page.tsx - add pagination params, pass to client
  • src/lib/resources.ts - add getResourcesPaginated() function
  • src/components/directory/directory-client.tsx - implement infinite scroll or pagination UI
  • src/app/api/resources/route.ts (new) - API endpoint for paginated fetching

Implementation Approach

Option A: Offset-based (?page=2&limit=30) - simpler, but can have issues with concurrent updates
Option B: Cursor-based (?cursor=abc123&limit=30) - better for real-time data, more complex
Option C: Keep client-side for now, add server-side when dataset > 1000

Given current size (~600), Option A is fine for now.

主要言語
TypeScript
スター
1
フォーク
6
平均マージ
12時間 16分
マージ済み PR(30日)
14

環境構築

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

Your-Voldemort/StudentStack のほかの issue

Your-Voldemort/StudentStack の issue をすべて見る

似ている issue

TypeScript の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。