-
Notifications
You must be signed in to change notification settings - Fork 1
refactor: UI 리팩토링 #67
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
Conversation
Walkthrough이 변경 사항은 Changes
Assessment against linked issues
Possibly related PRs
Suggested labels
Suggested reviewers
Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media? 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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
🧹 Outside diff range and nitpick comments (2)
src/app/portfolio/_components/portfoilo-card.tsx (2)
22-36: 포트폴리오 타입별 시각적 구분이 개선되었습니다.배경색 추가로 각 포트폴리오 타입의 구분이 더욱 명확해졌습니다. 다만, 색상 대비를 고려하여 접근성을 개선할 수 있습니다.
다음과 같이 색상 대비를 높이는 것을 고려해보세요:
- return { text: "적극적", color: "text-red-500", bgColor: "bg-red-50" }; + return { text: "적극적", color: "text-red-600", bgColor: "bg-red-50" };
67-124: UI 레이아웃 및 반응형 디자인이 개선되었습니다.그리드 레이아웃과 반응형 디자인이 잘 구현되었습니다. 다만, 성능 최적화를 위한 몇 가지 제안사항이 있습니다:
- 차트 컴포넌트 메모이제이션
- 반복되는 스타일 클래스의 상수화
다음과 같은 최적화를 제안드립니다:
// 상수로 분리 const CHART_STYLE = { containerClass: "shadow-sm hover:shadow-md overflow-hidden rounded-lg bg-white p-10 transition-all", itemClass: "flex items-center rounded-md bg-gray-50 p-8" } as const; // 차트 컴포넌트 메모이제이션 const MemoizedPieChart = memo(({ data, colors }) => ( <PieChart> <Pie data={data} cx="50%" cy="50%" innerRadius={50} outerRadius={90} fill="#8884d8" dataKey="value" paddingAngle={2} label={({ name, value }) => `${name} ${value}%`} > {data.map((entry) => ( <Cell key={`cell-${entry.name}`} fill={colors[CHART_ITEMS.indexOf(entry.name)]} /> ))} </Pie> </PieChart> ));
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
📒 Files selected for processing (5)
src/app/portfolio/_components/portfoilo-card.tsx(1 hunks)src/app/portfolio/constants/index.ts(1 hunks)src/app/portfolio/types/index.ts(1 hunks)src/app/search/_components/stock-table.tsx(1 hunks)src/components/common/dropdown/index.tsx(1 hunks)
✅ Files skipped from review due to trivial changes (2)
- src/app/search/_components/stock-table.tsx
- src/components/common/dropdown/index.tsx
🔇 Additional comments (3)
src/app/portfolio/constants/index.ts (1)
3-3: 차트 항목의 용어가 투자 중심으로 개선되었습니다.
금융 관련 일반 용어("소비", "금융" 등)에서 투자 특화 용어("주식", "채권" 등)로 변경되어 포트폴리오의 성격을 더 명확하게 표현하고 있습니다.
이 변경사항이 다른 컴포넌트에서도 일관되게 적용되었는지 확인하겠습니다:
✅ Verification successful
Let's examine the actual usage of these terms in the relevant files to ensure consistency.
포트폴리오 관련 용어가 일관성 있게 적용되어 있습니다.
포트폴리오 관련 파일들을 검토한 결과, "주식", "저축", "부동산", "채권"으로의 용어 변경이 types, constants, 그리고 실제 구현 컴포넌트에서 모두 일관되게 적용되어 있음을 확인했습니다. 특히 portfolio-card 컴포넌트의 차트 데이터 생성 로직과도 완벽하게 일치합니다.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash
# 변경된 용어가 다른 파일에서도 일관되게 사용되는지 확인
rg -l "소비|금융|투자" src/
Length of output: 390
Script:
#!/bin/bash
# Check the actual context of these terms in portfolio-related files
rg "소비|금융|투자|주식|저축|부동산|채권" src/app/portfolio/ -A 2 -B 2
Length of output: 2729
src/app/portfolio/types/index.ts (1)
1-1: 타입 정의가 새로운 차트 항목과 일치하도록 업데이트되었습니다.
ChartItemType이 새로운 투자 카테고리를 반영하도록 수정되었으며, 이는 constants/index.ts의 변경사항과 일관성을 유지하고 있습니다.
src/app/portfolio/_components/portfoilo-card.tsx (1)
41-44: 차트 데이터 생성 로직이 새로운 투자 카테고리와 일치하도록 수정되었습니다.
createChartData 함수의 매핑이 새로운 투자 카테고리와 올바르게 연결되어 있습니다.
#️⃣ 이슈
📝 작업 내용
오타 및 마진 패딩 일부 수정
📸 스크린샷
✅ 체크 리스트
👩💻 공유 포인트 및 논의 사항
Summary by CodeRabbit
New Features
Bug Fixes
Style