Skip to content

refactor(fe): 다중 컴포넌트 파일을 파일당 하나로 분리#119

Merged
seongbin9786 merged 1 commit into
mainfrom
refactor/fe-split-multi-component-files
Jul 19, 2026
Merged

refactor(fe): 다중 컴포넌트 파일을 파일당 하나로 분리#119
seongbin9786 merged 1 commit into
mainfrom
refactor/fe-split-multi-component-files

Conversation

@seongbin9786

Copy link
Copy Markdown
Contributor

한 파일에서 여러 컴포넌트를 export하면 파일명이 내용을 담지 못하고 "한 파일은 한 컴포넌트만 export" 규칙(docs/mustpass/component-placement.md)에 어긋난다. 다중 컴포넌트 파일 네 개를 export 단위로 나누고, 배럴 없이 파일 경로로 직접 import하는 저장소 규칙에 맞춰 옮긴 심볼의 importer를 모두 새 경로로 갱신했다. 코드는 그대로 옮기기만 했고 동작 변화는 없다.

변경 사항

  • list-group.tsx에서 ListGroupLabel, ListGroupItem, ListGroupFooter, ListGroupInset를 각각의 파일로 분리하고 ListGroup은 남겨 기존 importer를 유지했다
  • timeline-filters.tsxtimeline-category-filters, timeline-person-filters, timeline-filter-reset로 분리하고 원본을 삭제했다
  • person-fields.tsxlist-field, relation-type-field로 분리하고 두 곳에서 쓰던 FieldLabelfield-label로 추출한 뒤 원본을 삭제했다
  • mongle-logo.tsx에서 MongleIconmongle-icon으로 분리하고 MongleLogo는 남겨 기존 importer를 유지했다
  • 옮긴 심볼을 참조하던 importer(탭, activity, 도메인 컴포넌트, 스토리, 테스트)의 import 경로를 모두 새 파일로 갱신했다

Docs

컴포넌트를 파일별로 나눈 만큼 스토리도 파일마다 하나씩 두도록 재배치했다. 기존 스토리의 시나리오는 그대로 유지했고, 원래 한 파일에서 조합으로 보여 주던 예시를 분리된 컴포넌트별 스토리로 나눠 담았다.

한 파일에 여러 컴포넌트를 두면 파일명이 내용을 담지 못하고 "한 파일은 한 컴포넌트만 export" 규칙에 어긋나서, 컴포넌트를 export 단위로 파일을 나눴다. 배럴 없이 직접 import하는 저장소 규칙에 맞춰 옮긴 심볼의 import 경로를 모두 새 파일로 갱신했고, 스토리도 파일별로 재배치했다.

- list-group.tsx에서 ListGroupLabel, ListGroupItem, ListGroupFooter, ListGroupInset를 각각의 파일로 분리(ListGroup은 유지)
- timeline-filters.tsx를 timeline-category-filters, timeline-person-filters, timeline-filter-reset로 분리
- person-fields.tsx를 list-field, relation-type-field로 분리하고 공통 FieldLabel을 field-label로 추출
- mongle-logo.tsx에서 MongleIcon을 mongle-icon으로 분리(MongleLogo는 유지)

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@vercel

vercel Bot commented Jul 19, 2026

Copy link
Copy Markdown

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

Project Deployment Actions Updated (UTC)
mongle Ready Ready Preview, Comment Jul 19, 2026 7:45am

@seongbin9786
seongbin9786 marked this pull request as ready for review July 19, 2026 07:57
@seongbin9786
seongbin9786 merged commit bc6d549 into main Jul 19, 2026
3 checks passed
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