Skip to content

Refactor: Phase 1 shared 레이어 구축 + Phase 1.5 웹 접근성 보강#1

Merged
mayrang merged 8 commits intomainfrom
refactor/phase-1-shared-layer
Mar 20, 2026
Merged

Refactor: Phase 1 shared 레이어 구축 + Phase 1.5 웹 접근성 보강#1
mayrang merged 8 commits intomainfrom
refactor/phase-1-shared-layer

Conversation

@mayrang
Copy link
Copy Markdown
Owner

@mayrang mayrang commented Mar 20, 2026

개요

components/designSystem/의 31개 컴포넌트를 FSD 구조의 shared/ui/로 이전하고, 웹 접근성을 보강했습니다.

Phase 0: 기반 구축

  • Vitest + happy-dom 단위 테스트 환경 구성
  • Playwright E2E 테스트 설정
  • Tailwind v4 설치 (Emotion 공존)
  • FSD 디렉토리 스캐폴딩 (shared/entities/features/widgets)
  • CLAUDE.md 리팩토링 가이드라인 문서 작성

Phase 1: shared/ui 레이어 (113개 테스트)

그룹 컴포넌트 수 주요 변경
Button 6개 ButtonContainer 3중복 제거, 컴포지션 패턴
Badge/Select/Tag/Text 9개 Emotion → Tailwind 전환
Input 7개 clone 트릭 유지, shake 애니메이션 클래스화
Toast 5개 BaseToast 추출, ErrorToast FSD 위반 제거
Modal 9개 ModalDimmed/BaseModal/BottomSheetModal 추출
Profile 1개 RoundedImage
  • 모든 기존 import 경로 유지 (re-export 전략)
  • 버그 수정 7건 (opacity: 0px, clip-path camelCase, white-space 문자열 등)

Phase 1.5: 웹 접근성 보강 (134개 테스트)

  • jest-axe 도입 — 자동 WCAG 검사
  • RemoveButton: aria-label="삭제"
  • CloseButton: aria-label prop
  • Select: role=combobox/listbox/option, aria-expanded, aria-selected
  • StateInputField: aria-describedby 에러메시지 연결
  • CodeInput: 셀별 aria-label="{n}번째 숫자"
  • BaseModal/BottomSheetModal: role=dialog, aria-modal, focus trap, Escape 닫기

기타

  • 개발 서버 포트 9999 → 8080 (백엔드 CORS 대응)
  • next.config.js rewrites 프록시 추가 (CORS 우회)
  • src/api/index.ts MAX_RETRY_COUNT 50 → 5
  • globals.css CSS 리셋 전체 @layer base로 이동 (Tailwind utilities 우선순위 보장)
  • src/pages/ 삭제 (Next.js Pages Router 충돌 방지)

테스트

Test Files: 27 passed
Tests:      134 passed

🤖 Generated with Claude Code

## Phase 0: 기반 구축
- Vitest + happy-dom 테스트 환경 설정
- Playwright E2E 설정
- Tailwind v4 설치 (Emotion 공존)
- FSD 디렉토리 스캐폴딩 (shared/entities/features/widgets)
- CLAUDE.md 리팩토링 가이드라인 문서 작성

## Phase 1: shared/ui 레이어 구축 (113개 테스트)
- Button 그룹: Button/FilterButton/ApplyListButton/CloseButton/EditAndDeleteButton/ReportButton
  - ButtonContainer 3중복 제거, 컴포지션 패턴 적용
  - CloseButton API: setIsOpen → onClick으로 변경
- Badge/Select/Tag/Text 그룹
- Input 그룹: RemoveButton/InputField/StateInputField/ValidationInputField/TextareaField/CodeInput/CommentInput
- Toast 그룹: BaseToast 추출, ErrorToast FSD 위반 제거 (스토어 어댑터 패턴)
- Modal 그룹: ModalDimmed/BaseModal/BottomSheetModal 추출, window.innerWidth → Tailwind 대체
- Profile: RoundedImage
- Emotion → Tailwind 전환, 하위 호환 re-export 유지
- 버그 수정 7건 (opacity:0px, clip-path camelCase, white-space 문자열 등)

## Phase 1.5: 웹 접근성 보강 (134개 테스트)
- jest-axe 도입, setup.ts 전역 등록
- RemoveButton: aria-label="삭제"
- CloseButton: aria-label prop 추가
- Select: role=combobox/listbox/option, aria-expanded, aria-haspopup, aria-selected
- StateInputField: aria-describedby 에러메시지 연결 (errorMessageId prop)
- CodeInput: 각 셀 aria-label="{n}번째 숫자"
- BaseModal/BottomSheetModal: role=dialog, aria-modal, focus trap, Escape 닫기

## 기타 수정
- 개발 서버 포트 9999 → 8080 (백엔드 CORS 허용 목록 대응)
- next.config.js rewrites 프록시 추가 (CORS 우회)
- src/api/index.ts: MAX_RETRY_COUNT 50 → 5, 클라이언트/서버 baseURL 분기
- globals.css CSS 리셋 전체 @layer base로 이동 (Tailwind utilities 우선순위 보장)
- src/pages/ 디렉토리 제거 (Next.js Pages Router 충돌 방지)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@vercel
Copy link
Copy Markdown

vercel bot commented Mar 20, 2026

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

Project Deployment Actions Updated (UTC)
release-back Error Error Mar 21, 2026 9:46am
release-test Error Error Mar 21, 2026 9:46am

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
Vercel 환경에서 API_BASE_URL 환경변수가 없을 경우
rewrites destination이 "undefined/api/:path*"가 되어 빌드가 실패하는 문제 수정.
환경변수가 없으면 rewrites를 빈 배열로 반환.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
- Button/ApplyListButton에 deprecated addStyle prop 추가 (style의 alias)
- Terms.tsx disabled Button의 중복 addStyle 제거
- MyPage.tsx onClick 타입 불일치 수정 (MouseEvent → 타입 추론)
- stories의 잘못된 CSS weight 프로퍼티 → fontWeight로 수정

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
vercel.json 없이 배포 시 Vite로 감지되어 dist 폴더를 찾는 문제 수정.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
anthropics/claude-code-action이 OIDC 토큰 발급에 필요한 권한.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
CHROMATIC_PROJECT_TOKEN 없이 매번 실패하는 Chromatic CI 제거.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
anthropics/claude-code-action@v1에서 direct_prompt는 유효하지 않은 입력.
올바른 파라미터명은 prompt.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
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