refactor(design-system): 하드코딩 색상 라이트/다크 대응 + raw HTML → 공통 컴포넌트 치환 #70
No reviewers
레이블
레이블 없음
마일스톤 없음
담당자 없음
참여자 2명
알림
마감일
마감일이 설정되지 않았습니다.
의존성
No dependencies set.
Reference: gc/kcg-ai-monitoring#70
불러오는 중...
Reference in New Issue
Block a user
No description provided.
Delete Branch "refactor/design-system-ssot"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
변경 사항
구조 정비 3단계 리팩토링 PR #C — 디자인 시스템 SSOT 전영역 준수 (30파일).
공통 컴포넌트 치환
<button>→<Button variant>(primary / destructive / secondary / ghost)<input>→<Input size>(parent-inference, admin, ai-operations, auth)<select>→<Select size>(detection)<TabBar>+<TabButton>(ChinaFishing 모드/선박/통계 탭)<input type="checkbox">→<Checkbox>(GearDetection FilterCheckGroup)StatBox 재설계
color: stringprop 제거 →intent: BadgeIntent+INTENT_TEXT_CLASS매핑하드코딩 Tailwind 색상 라이트/다크 쌍 변환
text-red-400→text-red-600 dark:text-red-400text-*-500아이콘도text-*-600 dark:text-*-500로 라이트 모드 대응에러 메시지 통일
에러: {error}하드코딩 →t('error.errorPrefix', { msg: error })영역별 파일 (30)
관련 이슈
테스트
npx tsc --noEmit0 errorsnpx eslint . --quiet0 errors (84 warnings 기존)남은 항목 (후속 PR)
text-*-500일부 아이콘 색 (의도적 다크 설계, 필요 시 별도 조정)30개 파일 전 영역에 동일한 패턴으로 SSOT 준수: **StatBox 재설계 (2파일)**: - RealGearGroups, RealVesselAnalysis 의 `color: string` prop 제거 - `intent: BadgeIntent` prop + `INTENT_TEXT_CLASS` 매핑 도입 **raw `<button>` → Button 컴포넌트 (다수)**: - `bg-blue-600 hover:bg-blue-500 text-on-vivid ...` → `<Button variant="primary">` - `bg-orange-600 ...` / `bg-green-600 ...` → `<Button variant="primary">` - `bg-red-600 ...` → `<Button variant="destructive">` - 아이콘 전용 → `<Button variant="ghost" aria-label=".." icon={...} />` - detection/enforcement/admin/parent-inference/statistics/ai-operations/auth 전영역 **raw `<input>` → Input 컴포넌트**: - parent-inference (ParentReview, ParentExclusion, LabelSession) - admin (PermissionsPanel, UserRoleAssignDialog) - ai-operations (AIAssistant) - auth (LoginPage) **raw `<select>` → Select 컴포넌트**: - detection (RealGearGroups, RealVesselAnalysis, ChinaFishing) **커스텀 탭 → TabBar/TabButton (segmented/underline)**: - ChinaFishing: 모드 탭 + 선박 탭 + 통계 탭 **raw `<input type="checkbox">` → Checkbox**: - GearDetection FilterCheckGroup **하드코딩 Tailwind 색상 라이트/다크 쌍 변환 (전영역)**: - `text-red-400` → `text-red-600 dark:text-red-400` - `text-green-400` → `text-green-600 dark:text-green-400` - blue/cyan/orange/yellow/purple/amber 동일 패턴 - `text-*-500` 아이콘도 `text-*-600 dark:text-*-500` 로 라이트 모드 대응 - 상태 dot (bg-red-500 animate-pulse 등)은 의도적 시각 구분이므로 유지 **에러 메시지 한글 → t('error.errorPrefix') 통일**: - detection/parent-inference/admin 에서 `에러: {error}` 패턴 → `t('error.errorPrefix', { msg: error })` **결과**: tsc 0 errors / eslint 0 errors (84 warnings 기존)MR 승인 (via /mr skill) — PR #C 디자인 시스템