Skip to content

[FIX] 모바일 반응형 적용안됨 및 스타일링 개선#382

Merged
JangYEhoon00 merged 7 commits intomainfrom
fix/#380-ranking
Mar 13, 2026
Merged

[FIX] 모바일 반응형 적용안됨 및 스타일링 개선#382
JangYEhoon00 merged 7 commits intomainfrom
fix/#380-ranking

Conversation

@JangYEhoon00
Copy link
Collaborator

@JangYEhoon00 JangYEhoon00 commented Mar 2, 2026

🔥 연관 이슈

🚀 작업 내용

2026-03-03.1.03.57.mov
default.mov

🤔 고민했던 내용

이렇게 사용되는 컴포넌트가 해당 컴포넌트 뿐이라 디자인 시스템을 수정하는게 좋을지 따로 아이콘 컴포넌트만 추가하느게 좋을지 고민이 되어 우선은 일반 아이콘 컴포넌트만 추가했습니다. 이 부분에 대해서 피드백 주시면 감사하겠습니다.

💬 리뷰 중점사항

use client를 사용하게 되었는데 해당 페이지는 유저 상호작용이 많은 페이지라서 성능 저하의 걱정이 있습니다. 만약 다루는 데이터가 많다면 디자인 시스템을 수정하는 게 나을지 궁금합니다! 답변 남겨주시면 감사하겠습니다!

Summary by CodeRabbit

  • 스타일
    • 모바일/데스크탑에서 접기/펼치기 토글 아이콘 정렬, 컴팩트한 헤더 및 점수 항목의 소형 타이포·간격 적용
    • 랭킹 표의 타이포·간격·반응형 개선 및 열 표시 방식 정리
  • 새 기능
    • 지난달 랭킹이 스냅샷 기반으로 제공되며, 총점이 0인 항목은 목록에서 제외됨

어드민 랭킹 페이지에 반응형을 새롭게 적용했고 모바일의 경우 바디 타이포그래피 컴포넌트가 렌더링 되지 않습니다.
아코디언 아이콘의 크기를 작게하고 위치를 변하단으로 옮겼습니다.
@vercel
Copy link

vercel bot commented Mar 2, 2026

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

Project Deployment Actions Updated (UTC)
ddingdong-fe Ready Ready Preview, Comment Mar 13, 2026 4:32pm

@coderabbitai
Copy link

coderabbitai bot commented Mar 2, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: 90added9-b89e-40d9-b12a-a5c5fb48acdb

📥 Commits

Reviewing files that changed from the base of the PR and between 23c6b1e and 504eeaa.

⛔ Files ignored due to path filters (1)
  • package-lock.json is excluded by !**/package-lock.json
📒 Files selected for processing (1)
  • src/app/admin/ranking/_components/RankingHeader.tsx

Walkthrough

관리자 랭킹 UI의 모바일/데스크톱 레이아웃과 테이블 스타일을 재구성하고, 랭킹 스냅샷 조회용 쿼리 키/옵션(adminSnapshotList)을 추가했습니다. 변수명과 호출 지점을 일부 교체하고 패키지 버전을 소폭 올렸습니다.

Changes

Cohort / File(s) Summary
RankContainer (모바일/데스크톱 레이아웃)
src/app/admin/feed/_components/RankContainer.tsx
모바일 아코디언 헤더 레이아웃 재구성(iconAlign/iconClassName 추가), 모바일·데스크톱에서 ScoreItem에 small prop 도입·전달(타이포·간격 변경).
RankingHeader (반응형 가시성)
src/app/admin/ranking/_components/RankingHeader.tsx
내부 Flex 컨테이너를 소화면에서 숨기도록 클래스 추가(hidden md:flex).
RankingTable (테이블 스타일 재구성)
src/app/admin/ranking/_components/RankingTable.tsx
헤더/셀 타이포·간격 조정(py-6→py-[1.6rem]), 점수 컬럼 소화면 숨김 처리, 순위 배지·클럽명·점수 셀 타이포·색상 변경.
쿼리 추가 (API 조회)
src/app/_api/queries/ranking.ts
새 쿼리 키/옵션 rankingQueryKeys.adminSnapshotList(year, month)rankingQueryOptions.adminSnapshotList(year, month) 추가(엔드포인트: admin/feeds/ranking/snapshot?year=...&month=...).
페이지·유틸 변수명/조회 교체
src/app/admin/ranking/page.tsx, src/app/admin/ranking/utils/getRankingDate.ts
getRankingDate 반환 키명 변경(lastMonthMonth→lastMonth), page.tsx에서 adminSnapshotList(lastMonthYear, lastMonth)로 교체, lastMonthRanking에서 totalScore ≤ 0 항목 제외 필터 적용 및 섹션 마진 조정.
패키지 업데이트
package.json
ddingdong-design-system 버전 ^2.0.4 → ^2.0.5 업데이트.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

⚛️ 프론트엔드, 🛠️ 버그

Suggested reviewers

  • ujinsim
  • keemsebin
🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.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 코드 변경 사항이 연결된 issue #380의 요구사항을 충족합니다. admin 랭킹 페이지에 모바일 반응형이 적용되었고, 랭킹 컨테이너 컴포넌트의 아이콘 크기 및 위치가 수정되었습니다.
Out of Scope Changes check ✅ Passed 모든 코드 변경이 issue #380의 범위 내에 있습니다. 디자인 시스템 업데이트, 테이블 스타일 개선, API 쿼리 추가 등이 모두 모바일 반응형 및 스타일링 개선과 관련된 변경입니다.

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

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch fix/#380-ranking
📝 Coding Plan
  • Generate coding plan for human review comments

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.

Tip

CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.

OpenGrep is compatible with Semgrep configurations. Add an opengrep.yml or semgrep.yml configuration file to your project to enable OpenGrep analysis.

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@src/app/admin/feed/_components/RankContainer.tsx`:
- Around line 1-4: The file RankContainer currently marks the whole component as
a client ("use client") but you should shrink the client boundary: keep
RankContainer as a server component and extract only the interactive mobile
toggle UI into a small client component (e.g., create a MobileToggle or
ToggleMobileButton component) that imports React hooks/useState; replace the
inline toggle in RankContainer with that new client component; ensure any
state/handlers needed by the server are passed via props and avoid hoisting "use
client" to the whole file—apply the same extraction pattern for the related code
around the lines referenced (the mobile toggle block).
- Around line 49-54: The parent Flex's onClick toggles only the local isOpen
used by the arrow icon, causing desync with the Accordion's internal state;
remove the Flex onClick handler and make Accordion the single source of truth by
wiring its control props (e.g., value/onValueChange or open/onOpenChange
depending on your Accordion API) to the isOpen/setIsOpen pair, and update the
arrow icon to read isOpen so the visual state and Accordion expansion stay
synchronized (look for isOpen, setIsOpen, the Flex onClick, the Accordion
component, and the arrow icon render).

In `@src/app/admin/ranking/_components/RankingHeader.tsx`:
- Line 9: The Flex container in RankingHeader.tsx uses dir="col" but
className="hidden md:block", which forces display:block at md+ and breaks the
intended flex layout; change the class to "hidden md:flex" (or remove the hidden
if it should always show) so the element remains a flex container at md+ and
preserves the column direction defined by dir="col" on the Flex component.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between e6a497e and 8c45eae.

📒 Files selected for processing (3)
  • src/app/admin/feed/_components/RankContainer.tsx
  • src/app/admin/ranking/_components/RankingHeader.tsx
  • src/app/admin/ranking/_components/RankingTable.tsx

Copy link
Collaborator

@ujinsim ujinsim left a comment

Choose a reason for hiding this comment

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

반응형 잘 적용되었네요! 고생하셨습니다

Copy link
Collaborator

@keemsebin keemsebin left a comment

Choose a reason for hiding this comment

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

이렇게 사용되는 컴포넌트가 해당 컴포넌트 뿐이라 디자인 시스템을 수정하는게 좋을지 따로 아이콘 컴포넌트만 추가하느게 좋을지 고민이 되어 우선은 일반 아이콘 컴포넌트만 추가했습니다. 이 부분에 대해서 피드백 주시면 감사하겠습니다.

요런 디자인이 하나라면, 디자인 시스템 수정보다는 도메인에 종속적인 컴포넌트를 하나 만들 것 같아요. 또, 기존 아코디언 컴포넌트 활용이 불가능한지도 확인해 볼 것 같네용

use client를 사용하게 되었는데 해당 페이지는 유저 상호작용이 많은 페이지라서 성능 저하의 걱정이 있습니다. 만약 다루는 데이터가 많다면 디자인 시스템을 수정하는 게 나을지 궁금합니다! 답변 남겨주시면 감사하겠습니다!

어떤 성능 저하의 걱정이 있었는지 궁금해요! 성능적인 면에서 데이터 갯수와 디자인 시스템이 어떤 연관이 있는지도 궁금하네용

수고하셨습니다~

변경된dds에 맞춰 useState를 제거했습니다. 추가적으로 피그마에 맞게 디자인을 수정했습니다.
지난 달 탭에서 서버에서 제공하는 스냅샷 형식의 api를 볼 수 있게 처리했습니다.
@JangYEhoon00 JangYEhoon00 changed the title fix: 모바일 반응형 적용안됨 및 스타일링 개선 [FIX] 모바일 반응형 적용안됨 및 스타일링 개선 Mar 13, 2026
@github-actions github-actions bot added the fix 에러 픽스 label Mar 13, 2026
Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@package.json`:
- Line 29: package-lock.json still pins ddingdong-design-system at v2.0.4 while
package.json requires v2.0.5, so update the lockfile: reinstall or explicitly
install the updated package (e.g., run npm install or npm install
ddingdong-design-system@2.0.5) to regenerate package-lock.json, verify that
package-lock.json now references ddingdong-design-system v2.0.5, run a quick
build/test to ensure RankContainer.tsx's iconAlign/iconClassName props work, and
commit the updated package-lock.json alongside package.json.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

Run ID: dad49980-3f74-4451-8a71-63017f164600

📥 Commits

Reviewing files that changed from the base of the PR and between 8c45eae and 23c6b1e.

📒 Files selected for processing (5)
  • package.json
  • src/app/_api/queries/ranking.ts
  • src/app/admin/feed/_components/RankContainer.tsx
  • src/app/admin/ranking/page.tsx
  • src/app/admin/ranking/utils/getRankingDate.ts

잘못 적용시킨 스타일을 수정했습니다.
@JangYEhoon00 JangYEhoon00 merged commit 2c2e1f1 into main Mar 13, 2026
4 checks passed
@JangYEhoon00 JangYEhoon00 deleted the fix/#380-ranking branch March 13, 2026 17:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

fix 에러 픽스

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FIX] 랭킹 페이지 스타일 깨짐 현상 수정

3 participants