Skip to content

공용 UI 요소를 PresentationShared 모듈로 분리한다 #662

Description

@opficdev

배경

탭 기반 모듈 분리를 진행하려면 각 탭 모듈이 공통 UI, 공통 라우팅 보조 타입, 공통 Presentation 구조를 직접 중복해서 소유하지 않도록 먼저 공용 모듈이 필요함.

현재 DevLogPresentation 안에는 Common, Structure, Routing, 일부 Extension처럼 여러 화면에서 함께 사용하는 코드가 섞여 있음. 탭 모듈을 먼저 분리하면 공통 코드 소유권이 불명확해지고 탭 모듈끼리 직접 의존할 가능성이 생김.

목표

PresentationShared 모듈을 만들고, 탭 모듈에서 공통으로 사용하는 UI/라우팅/Presentation 보조 타입을 이 모듈로 분리함.

작업 범위

  • 기존 Application/Shared 설정 폴더와 충돌하지 않는 위치에 PresentationShared Tuist framework target 추가
  • 공용 UI 컴포넌트와 presentation helper 이동
  • LoadingFeature, LoadingView, NavigationRouter 등 여러 탭에서 재사용되는 타입의 소유권 검토
  • DevLogPresentation과 이후 탭 모듈이 PresentationShared를 의존하도록 구성
  • 이동 대상의 access control 조정
  • 관련 테스트가 있다면 PresentationShared 테스트 타깃으로 이동

제외 범위

  • Home/Today/Notification/Profile 탭 모듈 분리
  • Domain/Data/Infra/Persistence 경계 변경
  • TCA reducer/action/state 책임 변경
  • 기능 동작 변경

검증

  • 이동한 Swift 파일 대상 SwiftLint 실행
  • PresentationShared build 실행
  • DevLogPresentation build 또는 build-for-testing 실행
  • 탭 모듈끼리 직접 의존하지 않는 구조인지 확인

의존 방향 정책

  • PresentationShared는 Presentation 계층 내부에서 탭들이 공유하는 feature, UI, routing 보조 타입을 소유함
  • Presentation과 각 탭 모듈은 공통 Presentation feature가 필요할 때 PresentationShared를 의존함
  • PresentationShared는 공유 presentation feature 구현에 필요한 경우 DomainCore를 직접 참조할 수 있음
  • PresentationSharedPresentation 또는 개별 탭 모듈을 import하지 않음
  • 각 탭 모듈은 서로를 import하지 않음
  • 공통 feature에서 root navigation이나 탭 전환이 필요하면 Presentation 타입 의존 대신 public value, route value, closure boundary로 연결함

기대 효과

  • 탭 모듈 분리 전 공통 코드 의존 방향 정리
  • 탭 모듈 간 직접 import 방지
  • 이후 HomeTab, TodayTab, NotificationTab, ProfileTab 분리의 기반 마련

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions