Skip to content

refactor(IN-305): /videos 페이지 기획 및 디자인 변경사항 반영#128

Merged
kimYunHyeong merged 6 commits into
developfrom
IN-305
May 31, 2026
Merged

refactor(IN-305): /videos 페이지 기획 및 디자인 변경사항 반영#128
kimYunHyeong merged 6 commits into
developfrom
IN-305

Conversation

@kimYunHyeong

@kimYunHyeong kimYunHyeong commented May 21, 2026

Copy link
Copy Markdown
Collaborator

📌 작업 개요

/videos 페이지 기획 및 디자인 변경사항 반영

🗂 작업 유형

해당하는 항목에 x를 채워 주세요.

  • [] 기능 추가 (feat)
  • 버그 수정 (fix)
  • 리팩토링 (refactor)
  • 스타일 / UI 수정 (style)
  • 성능 개선 (perf)
  • 테스트 (test)
  • 기타 (chore, docs 등)

✏️ 작업 내용

로직(정렬 필터 제거 -> 정렬 탭으로 추가)

  • 영상 목록 필터링(키워드·정렬·포맷·광고·기간)이 실제로 동작하도록 mock API 수정
  • 정렬 기준을 SearchAndFilter 드롭다운에서 VideoList 내부 버튼으로 이동
  • 캘린더로 선택한 기간을 startDate/endDate 쿼리 파라미터로 URL에 반영
  • publishedAt 형식을 ISO 8601로 변경하여 날짜 범위 필터링이 정확하게 동작하도록 수정

디자인

  • video type chip 수정: 롱/숏 타입 칩 제거
  • 서치바 컬러 수정

✅ 셀프 체크리스트

머지 전 직접 확인해 주세요.

  • 로컬에서 정상 동작 확인
  • 불필요한 콘솔 로그, 주석, 디버그 코드 제거
  • 타입 에러 없음

💬 리뷰어에게

Summary by CodeRabbit

릴리스 노트

  • New Features

    • 비디오 목록에 정렬 기능 추가 (최신순, 조회수, 좋아요, VPH, 이상치)
    • 날짜 범위 필터링 기능 추가
  • Bug Fixes

    • 비디오 카드 배지 표시 로직 개선 (광고만 표시)
  • Chores

    • API 응답 처리 방식 최적화
    • 필터 파라미터 캐시 키 정밀도 향상

로직(정렬 필터 제거 -> 정렬 탭으로 추가)
- 영상 목록 필터링(키워드·정렬·포맷·광고·기간)이 실제로 동작하도록 mock API 수정
- 정렬 기준을 SearchAndFilter 드롭다운에서 VideoList 내부 버튼으로 이동
- 캘린더로 선택한 기간을 startDate/endDate 쿼리 파라미터로 URL에 반영
- publishedAt 형식을 ISO 8601로 변경하여 날짜 범위 필터링이 정확하게 동작하도록 수정

디자인
- video type chip 수정: 롱/숏 타입 칩 제거
- 서치바 컬러 수정
@vercel

vercel Bot commented May 21, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
inflace Ready Ready Preview, Comment May 31, 2026 1:53pm

@coderabbitai

coderabbitai Bot commented May 21, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 59b90591-6d73-4115-a223-ce9294c4da7d

📥 Commits

Reviewing files that changed from the base of the PR and between a52c1f3 and be656bc.

📒 Files selected for processing (7)
  • src/features/videos/api/videosApi.ts
  • src/features/videos/model/useVideos.ts
  • src/features/videos/ui/VideoList.tsx
  • src/shared/api/mock/mockUser.ts
  • src/shared/ui/search-bar/SearchBar.tsx
  • src/widgets/influencer/ui/InfluencerFilter.tsx
  • src/widgets/videos/ui/SearchAndFilter.tsx

요약

이 PR은 비디오 목록에 정렬 및 날짜 범위 필터링 기능을 추가합니다. 필터 타입을 확장하고 API 요청 형식을 단순화한 후, VideoList 컴포넌트에 정렬 UI를 구현하고 페이지 수준에서 상태를 관리합니다. 또한 CalendarFilter를 통한 날짜 범위 선택이 URL 쿼리 파라미터로 자동 반영되며, 여러 UI 세부 사항과 목 데이터가 개선됩니다.

변경사항

비디오 정렬 및 기간 필터링

레이어 / 파일 요약
필터 타입 확장 및 API 단순화
src/features/videos/model/types.ts, src/features/videos/api/videosApi.ts, src/features/videos/mock/mockVideos.ts, src/features/videos/model/useVideos.ts
VideoFilterParamsstartDate/endDate 필드 추가; fetchVideoList의 조건부 쿼리 키 조립 로직 제거되고 params 객체 직접 전달로 단순화; useInfiniteScroll의 queryKey를 개별 필터 필드로 구성; mockVideos의 모든 publishedAt을 ISO 8601 타임스탬프로 통일.
VideoList 정렬 UI 구현
src/features/videos/ui/VideoList.tsx
SORT_OPTIONS 상수 정의로 LATEST/VIEWS/LIKES/VPH/OUTLIER 옵션 및 레이블 매핑; VideoListPropsselectedSort/onSortChange 콜백 추가; 렌더링 구조를 단일 그리드에서 상단 정렬 버튼 행 포함 flex 컬럼으로 변경.
페이지 수준 정렬 상태 통합
src/pages/videos/ui/VideosPage.tsx
VideoListSection에서 useStateselectedSort 관리; searchParams로부터 format/isAd/keyword/startDate/endDate 파싱; 필터 파라미터 구성 시 sort 조건부 포함; VideoList에 선택 상태 및 콜백 전달.
CalendarFilter 날짜 범위 콜백
src/widgets/videos/ui/CalendarFilter.tsx
onRangeChange 콜백 수신을 위한 CalendarFilterProps 인터페이스 정의; handleConfirm 함수로 선택된 날짜를 yyyy-MM-dd 형식으로 변환하여 상위 컴포넌트에 전달 후 드롭다운 닫음; 초기화 시 onRangeChange(null, null) 호출.
SearchAndFilter 날짜 범위 URL 동기화
src/widgets/videos/ui/SearchAndFilter.tsx
정렬 관련 UI/로직 제거; CalendarFilteronRangeChange 핸들러 연동으로 선택 범위를 startDate/endDate 파라미터로 즉시 반영; 범위 값 없으면 파라미터 삭제 후 router.replace 호출; 컨테이너 하단 패딩 제거; 의존성 배열 정리.
UI 개선 및 지원 변경사항
src/entities/videos/ui/VideoCard.tsx, src/shared/ui/search-bar/SearchBar.tsx, src/widgets/influencer/ui/InfluencerFilter.tsx, src/shared/api/mock/mockUser.ts
VideoCard 썸네일 오버레이를 AD 배지만 표시로 단순화, isShort 제거; SearchBar className을 cn() 조합으로 재구성, 폭 지정 제거, Input 포커스 텍스트 컬러 변경; InfluencerFilter SearchBar를 단순 렌더링으로 단순화; mockUserDetails를 GROWTH 플랜 및 완료된 온보딩으로 업데이트.

🎯 3 (Moderate) | ⏱️ ~25 minutes

추천 리뷰어

  • juuhye
  • shunn2

🐰 정렬 버튼이 춤을 추고,
날짜 범위는 캘린더에 물드네,
API는 더 깔끔해지고,
비디오 목록은 우아하게 필터링되네!
모두 함께 정렬되는 마법 ✨

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 제목이 PR의 주요 변경 사항을 명확하게 반영하고 있습니다. 비디오 페이지의 기획 및 디자인 변경사항을 한 문장으로 요약한 간결하고 구체적인 표현입니다.
Description check ✅ Passed PR 설명이 템플릿 구조를 따르고 있으며, 작업 개요, 작업 유형, 구체적인 작업 내용 및 셀프 체크리스트가 모두 포함되어 있습니다.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
📝 Generate docstrings
  • Create stacked PR
  • Commit on current branch
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch IN-305

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Actionable comments posted: 3

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (2)
src/shared/api/mock/mockUser.ts (1)

33-41: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

로그인 응답과 mockUser 상태 간의 의미적 불일치

mockUserDetailsplan: 'GROWTH', isOnboardingCompleted: true로 변경되고 mockUser.userChannelDetailsmockUserChannelDetails로 채워졌습니다. 그러나 mockLoginResponse.responseDto.userChannelDetails는 여전히 null입니다. 온보딩이 완료된 사용자라면 로그인 응답에도 채널 정보가 함께 내려오는 것이 자연스러우며, 현재 상태는 로그인 직후 분기(isOnboardingCompleted=true인데 채널 정보 없음)에서 예상치 못한 UI 흐름을 유발할 수 있습니다. 의도된 시나리오인지 확인 부탁드립니다.

🔧 일관성 맞추기 제안
   responseDto: {
     accessToken: mockAccessToken,
     userDetails: mockUserDetails,
-    userChannelDetails: null,
+    userChannelDetails: mockUserChannelDetails,
   },
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/shared/api/mock/mockUser.ts` around lines 33 - 41, The mock login payload
is inconsistent: mockUserDetails now shows plan: 'GROWTH' and
isOnboardingCompleted: true and mockUserChannelDetails is populated, but
mockLoginResponse.responseDto.userChannelDetails is still null; update
mockLoginResponse to set responseDto.userChannelDetails to
mockUserChannelDetails (or explicitly document/guard this as an intentional
edge-case) so the returned login object (mockLoginResponse) matches the
in-memory mockUser state; check the symbols mockLoginResponse,
responseDto.userChannelDetails, mockUserDetails, and mockUserChannelDetails when
making the change.
src/entities/videos/ui/VideoCard.tsx (1)

20-32: ⚠️ Potential issue | 🟡 Minor | ⚡ Quick win

isShort 불사용에 따른 타입 정리 필요
src/entities/videos/ui/VideoCard.tsxVideoCardItem 디스트럭처에서 isShort를 더 이상 사용하지 않는데, src/entities/videos/model/types.tsVideoCardItem에는 isShort: boolean이 그대로 필수로 남아 호출부에서 계속 값을 제공해야 합니다. 카드에서 필요 없다면 타입에서 제거(또는 optional 처리)하거나, 필요하다면 VideoCard에서 활용 로직을 추가하세요.

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/entities/videos/ui/VideoCard.tsx` around lines 20 - 32, The VideoCard
component destructures VideoCardItem but no longer uses isShort; update the
model/type or component to be consistent: either remove isShort from the
VideoCardItem definition in types.ts (or change it to optional isShort?:
boolean) and adjust any callers that currently supply it, or reintroduce usage
inside the VideoCard function (e.g., handle short-format rendering) so the prop
is consumed; target the VideoCard component and the VideoCardItem type
declaration to keep the prop optional/removed across all usages.
🧹 Nitpick comments (1)
src/entities/videos/ui/VideoCard.tsx (1)

46-52: 💤 Low value

TODO 주석 처리 계획 확인

bg-primitive-brand-clear-200 토큰이 임시값으로 표시되어 있습니다. 디자인 토큰이 확정되는 시점에 후속 작업으로 정리될 수 있도록 이슈로 관리하는 것을 권장합니다.

별도 트래킹 이슈를 생성해드릴까요?

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@src/entities/videos/ui/VideoCard.tsx` around lines 46 - 52, The temporary
design token bg-primitive-brand-clear-200 is used in the VideoCard ad badge (the
conditional render guarded by isAd and the span element that shows "AD");
replace the hardcoded temporary token with the finalized design token when
available and, until then, create a tracking issue to follow up so this TODO is
not lost—ensure the follow-up references the VideoCard component (the isAd
conditional and the ad badge span) and the TODO comment so the change can be
applied once the design token is finalized.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In `@src/features/videos/api/videosApi.ts`:
- Around line 42-55: The sort switch on params.sort misses the 'LATEST' branch
so default returns 0 and leaves ordering unchanged; add a case for 'LATEST' in
the comparator (alongside existing cases like 'VIEWS','LIKES','VPH','OUTLIER')
and sort by the video's timestamp field (e.g., createdAt or publishedAt) in
descending order to ensure newest-first ordering for VideoSort.LATEST when
filtered is sorted.

In `@src/features/videos/ui/VideoList.tsx`:
- Around line 33-37: The sort buttons in VideoList.tsx are only indicating
selection visually; update the button rendered in the map (the element using
selectedSort, option.value and onSortChange) to include an accessible pressed
state by adding aria-pressed with a boolean expression
(aria-pressed={selectedSort === option.value}) so assistive technologies can
detect which option is selected; ensure the attribute value is a boolean, not a
string, and leave existing styling and onClick behavior unchanged.

In `@src/shared/ui/search-bar/SearchBar.tsx`:
- Around line 16-21: The SearchBar component currently hardcodes the container
width with w-[58rem], causing overflow and preventing callers from overriding
sizing; modify the SearchBar component so the outer div uses a default
responsive width (e.g., w-full or remove the fixed w-[58rem]) and merge any
incoming className prop into the container’s className (not only the internal
<Input>) so parents can override width (e.g., allow passing w-full or max-w-*).
Update the container class composition in the SearchBar component (the outer
<div> with cn(...)) to include the component’s className prop and change the
default width to a flexible value.

---

Outside diff comments:
In `@src/entities/videos/ui/VideoCard.tsx`:
- Around line 20-32: The VideoCard component destructures VideoCardItem but no
longer uses isShort; update the model/type or component to be consistent: either
remove isShort from the VideoCardItem definition in types.ts (or change it to
optional isShort?: boolean) and adjust any callers that currently supply it, or
reintroduce usage inside the VideoCard function (e.g., handle short-format
rendering) so the prop is consumed; target the VideoCard component and the
VideoCardItem type declaration to keep the prop optional/removed across all
usages.

In `@src/shared/api/mock/mockUser.ts`:
- Around line 33-41: The mock login payload is inconsistent: mockUserDetails now
shows plan: 'GROWTH' and isOnboardingCompleted: true and mockUserChannelDetails
is populated, but mockLoginResponse.responseDto.userChannelDetails is still
null; update mockLoginResponse to set responseDto.userChannelDetails to
mockUserChannelDetails (or explicitly document/guard this as an intentional
edge-case) so the returned login object (mockLoginResponse) matches the
in-memory mockUser state; check the symbols mockLoginResponse,
responseDto.userChannelDetails, mockUserDetails, and mockUserChannelDetails when
making the change.

---

Nitpick comments:
In `@src/entities/videos/ui/VideoCard.tsx`:
- Around line 46-52: The temporary design token bg-primitive-brand-clear-200 is
used in the VideoCard ad badge (the conditional render guarded by isAd and the
span element that shows "AD"); replace the hardcoded temporary token with the
finalized design token when available and, until then, create a tracking issue
to follow up so this TODO is not lost—ensure the follow-up references the
VideoCard component (the isAd conditional and the ad badge span) and the TODO
comment so the change can be applied once the design token is finalized.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 275090dd-d08b-4cd1-abcf-69b48dbbf636

📥 Commits

Reviewing files that changed from the base of the PR and between cdf69d0 and a52c1f3.

📒 Files selected for processing (11)
  • src/entities/videos/ui/VideoCard.tsx
  • src/features/influencer/ui/InfluencerList.tsx
  • src/features/videos/api/videosApi.ts
  • src/features/videos/mock/mockVideos.ts
  • src/features/videos/model/types.ts
  • src/features/videos/ui/VideoList.tsx
  • src/pages/videos/ui/VideosPage.tsx
  • src/shared/api/mock/mockUser.ts
  • src/shared/ui/search-bar/SearchBar.tsx
  • src/widgets/videos/ui/CalendarFilter.tsx
  • src/widgets/videos/ui/SearchAndFilter.tsx

Comment thread src/features/videos/api/videosApi.ts Outdated
Comment thread src/features/videos/ui/VideoList.tsx
Comment thread src/shared/ui/search-bar/SearchBar.tsx
src/features/videos/api/videosApi.ts: Axios로 /channel/:channelId/videos에 실제 HTTP GET 요청하도록 변경

src/features/videos/model/useVideos.ts: params의 각 필드를 primitive 값으로 분리
@kimYunHyeong kimYunHyeong merged commit 779cb38 into develop May 31, 2026
1 of 3 checks passed
@kimYunHyeong kimYunHyeong deleted the IN-305 branch May 31, 2026 15:51
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.

1 participant