-
Notifications
You must be signed in to change notification settings - Fork 0
전체링크 디자인 및 API #339
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
전체링크 디자인 및 API #339
Conversation
Walkthrough이 변경은 링크 목록 조회 기능을 페이지 기반 페이징에서 커서 기반 페이징으로 전환합니다. LinkListParams에서 Possibly related PRs
🚥 Pre-merge checks | ✅ 2 | ❌ 2❌ Failed checks (2 inconclusive)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (1)
src/app/(route)/all-link/AllLink.tsx (1)
32-38:handleLoadMore에서 로딩 상태가 실제로 표시되지 않습니다.현재
setIsLoadingMore(true)와setIsLoadingMore(false)가 동기적으로 연속 호출되어 로딩 상태가 즉시 해제됩니다. 목 데이터 환경에서도 실제 API 연동 시의 UX를 시뮬레이션하려면 비동기 지연을 추가하는 것이 좋습니다.♻️ 비동기 지연 추가 제안
const handleLoadMore = async () => { if (!hasMore) return; setIsLoadingMore(true); + // 실제 API 연동 전까지 로딩 UX 시뮬레이션 + await new Promise(resolve => setTimeout(resolve, 300)); const nextCount = Math.min(links.length + PAGE_SIZE, mockLinks.length); setLinks(mockLinks.slice(0, nextCount)); setIsLoadingMore(false); };
📜 Review details
Configuration used: Repository UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (6)
src/apis/linkApi.tssrc/app/(route)/all-link/AllLink.tsxsrc/app/(route)/link-api-demo/LinkApiDemo.tsxsrc/app/layout-client.tsxsrc/hooks/useGetLinks.tssrc/mocks/fixtures/links.ts
🧰 Additional context used
🧠 Learnings (1)
📚 Learning: 2025-11-23T14:52:20.769Z
Learnt from: Bangdayeon
Repo: Team-SoFa/linkiving PR: 102
File: src/components/layout/SideNavigation/components/AddLinkModal/AddLinkModal.tsx:23-23
Timestamp: 2025-11-23T14:52:20.769Z
Learning: In src/components/layout/SideNavigation/components/AddLinkModal/AddLinkModal.tsx, the hardcoded '/file.svg' thumbnail is intentional as a placeholder because the backend API for fetching link metadata/thumbnails is still in preparation. The actual thumbnail fetch logic will be implemented after the backend is ready.
Applied to files:
src/app/(route)/all-link/AllLink.tsx
🧬 Code graph analysis (5)
src/app/layout-client.tsx (1)
src/components/layout/SideNavigation/SideNavigation.tsx (1)
SideNavigation(14-65)
src/app/(route)/link-api-demo/LinkApiDemo.tsx (2)
src/hooks/useGetLinks.ts (1)
useGetLinks(9-17)src/types/api/linkApi.ts (1)
LinkListApiData(24-36)
src/hooks/useGetLinks.ts (5)
src/apis/linkApi.ts (2)
LinkListParams(24-27)fetchLinks(69-83)src/types/api/linkApi.ts (1)
LinkListViewData(40-42)src/hooks/usePostLinks.ts (2)
usePostLinks(5-14)qc(10-12)src/hooks/useUpdateLink.ts (3)
useUpdateLink(5-15)updateLink(9-9)_data(10-13)src/hooks/useUpdateLinkTitle.ts (1)
useUpdateLinkTitle(5-14)
src/apis/linkApi.ts (2)
src/types/api/linkApi.ts (2)
LinkListApiData(24-36)LinkRes(11-18)src/types/link.ts (4)
Pageable(40-47)Link(9-18)LinkSummaryState(3-7)PageResponse(49-61)
src/app/(route)/all-link/AllLink.tsx (2)
src/stores/linkStore.ts (1)
useLinkStore(15-24)src/mocks/fixtures/links.ts (1)
mockLinks(21-363)
🔇 Additional comments (7)
src/app/layout-client.tsx (1)
14-18: LGTM!레이아웃 변경이 적절합니다.
h-screen과overflow-hidden조합으로 사이드 네비게이션과 상단 영역이 고정되고, 자식 컴포넌트(AllLink 등)에서 개별 스크롤 영역을 관리할 수 있게 됩니다. SideNavigation의h-screen설정과도 일관성 있습니다.src/mocks/fixtures/links.ts (1)
123-362: LGTM!무한 스크롤 테스트를 위한 목 데이터 확장이 적절합니다. ID가 순차적이고 기존 데이터 구조와 일관성 있게 작성되었습니다.
src/app/(route)/link-api-demo/LinkApiDemo.tsx (1)
27-27: LGTM!커서 기반 페이징으로의 전환에 맞게 파라미터가 올바르게 수정되었습니다. 초기 로드 시에는
lastId없이size만 전달하는 것이 적절합니다.src/hooks/useGetLinks.ts (1)
5-17: LGTM!
enabled옵션 추가가 적절합니다. TanStack React Query v5 패턴을 올바르게 따르고 있으며, 기본값true로 하위 호환성도 유지됩니다. AllLink 컴포넌트에서 목 데이터 사용 시 API 호출을 비활성화하는 데 유용하게 사용될 수 있습니다.src/app/(route)/all-link/AllLink.tsx (2)
19-23: 초기 데이터 로딩 및 hasMore 로직이 적절합니다.
useEffect로 초기 데이터를 로드하고hasMore로 추가 로딩 가능 여부를 판단하는 구조가 명확합니다. API 연동 시useGetLinks의enabled옵션과 커서 기반 페이징으로 전환하면 됩니다.
48-71: InfiniteScroll 통합 및 레이아웃 구조가 잘 구성되었습니다.스크롤 가능한 컨테이너(
overflow-y-auto)와InfiniteScroll래퍼의 조합이 적절합니다. 빈 상태 처리와 그리드 레이아웃도 Figma 요구사항에 맞게 구현되었습니다.src/apis/linkApi.ts (1)
24-38: 커서 기반 페이징 마이그레이션이 올바르게 완료되었습니다.무한 스크롤에 적합한
lastId기반 페이징으로의 변경이 적절하며,lastId의null과undefined를 구분 처리하는 로직도 정확합니다. 코드베이스 전반에 걸쳐LinkListParams사용처가 모두 새로운 인터페이스에 맞게 업데이트되었으며, 기존page또는sort파라미터는 발견되지 않습니다.
관련 이슈
PR 설명
세부 작업사항은 다음과 같습니다.