Performance: Add pagination/infinite scroll to directory for large datasets
Maintainer thường phản hồi trong vòng 1 ngày
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 55/100
- Loại issue
- Tính năng
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Sôi nổi
- Công nghệ
- next.js, typescript
- Lĩnh vực
- full-stack, performance
Hướng nghiên cứu
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.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
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.tsxloads ALL resources viagetAllResources()(line 23-24)src/lib/resources.tsgetAllResources()fetches all approved resources (line 71-83)- Client-side pagination in
DirectoryClientwithPAGE_SIZE = 30(line 15)
Expected Behavior
Implement server-side pagination with cursor or offset-based pagination:
- Add
page/limitorcursor/limitparams to directory URL - Modify
getAllResources()to accept pagination params - Update
DirectoryClientto fetch next page via API or Server Action - 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 clientsrc/lib/resources.ts- addgetResourcesPaginated()functionsrc/components/directory/directory-client.tsx- implement infinite scroll or pagination UIsrc/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.
- Ngôn ngữ chính
- TypeScript
- Star
- 1
- Fork
- 6
- Merge trung bình
- 21 giờ 33 phút
- Pull request đã merge (30 ngày)
- 48
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của Your-Voldemort/StudentStack
-
CI passes NEXT_PUBLIC_SUPABASE_ANON_KEY but the app reads NEXT_PUBLIC_SUPABASE_PUBLISHABLE_KEY; e2e job installs only ChromiumCó thể đã có người làm @rootsiemen đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
Your-Voldemort/StudentStack#126 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Flag curated flagship opportunities whose dates need a refreshCó thể đã có người làm @rootsiemen đã nhận hôm nay. Đang mở
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Your-Voldemort/StudentStack#120 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
Your-Voldemort/StudentStack#119 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
Tất cả issue của Your-Voldemort/StudentStack
Issue tương tự
-
数据界面的横向滚动条缺失Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 62/100
zilliztech/attu#1037 ·
-
clawsweeper:fix-shape-clear clawsweeper:queueable-fix clawsweeper:source-repro impact:ux-friction issue-rating: 🦞 diamond lobster no-stale P3
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 76/100
openclaw/openclaw#181212 · 1 bình luận · 1 reaction ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
apify/apify-mcp-server#1684 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 82/100
Automattic/data-liberation-agent#953 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 78/100
siteboon/claudecodeui#1642 ·
Maintainer thường phản hồi trong vòng 5 ngày