Conversation
1. 기존 DesignSystem -> MLSDesignSystem 2. BaseFeature의 SharedView 이전 3. 디자인 컴포넌트 + 공용뷰 + 디자인 팩토리 + Utils 4. 각 Feature에서 UI관련하여 해당 모듈을 의존 5. UIImage 직접접근 코드 수정 6. @mainactor 설정
There was a problem hiding this comment.
Code Review
This pull request introduces a new example application, MLSDesignSystemExample, to demonstrate and test various UI components within the MLSDesignSystem framework. The changes include the addition of numerous test view controllers for components such as badges, cards, and buttons, along with the necessary project configuration updates. Feedback identifies a typo in the project's tool version setting and an inconsistent module import in the main view controller. Additionally, the reviewer suggests addressing architectural inconsistencies regarding the BottomTabBarController dependency and cleaning up commented-out code within the newly added test files to improve maintainability.
MLS/MLSDesignSystemExample/ComponentsTest/CardListTestViewController.swift
Outdated
Show resolved
Hide resolved
MLS/MLSDesignSystemExample/ComponentsTest/GuideAlertTestViewController.swift
Outdated
Show resolved
Hide resolved
…SDesignSystem-Module
BaseViewController를 Core 모듈로 옮기고 TabbarController 직접참조를 제거하여 DesignSystem의 의존성을 분리
dongglehada
left a comment
There was a problem hiding this comment.
수고하셨습니다! 모듈 설계 방향 자체는 좋다고 생각합니다. DesignSystem 순수 UI 모듈로 정리한 거랑 외부 주입 방식으로 변경한 부분 특히 동의해요 👍
PS에 언급하신 UIViewController extension 위치 관련해서는 제가 이해가 조금 부족해서 구두로 설명 부탁드려도 될까요?
|
BaseViewController에서 탭바 숨김 처리를 공통으로 제공하기 위해 CustomTabBarController 타입을 직접 참조하고 있었고, 이로 인해 Core 모듈이 UI 구현을 알게 되는 의존성 문제가 발생했습니다
|
1. 모듈 구조 설계
DesignSystem은 Presentation 레이어에서 사용되는 순수 UI 요소만 관리하는 모듈로 구성했습니다.
DesignSystem은 앱 구조 요소를 포함하지 않고 순수 UI 모듈로 유지하는 것을 목표로 합니다.
2. 역할 재정의
기존 DesignSystem과 BaseFeature에는 다음과 같은 요소들이 포함되어 역할이 모호했습니다.
이를 해결하기 위해 각 모듈의 역할을 다음과 같이 재정의했습니다.
DesignSystem
→ 순수 UI 모듈
3. 공용 View 이전
기존 Base 모듈에 위치하던 공통 View들을 DesignSystem으로 이전했습니다.
이전 기준:
이 기준에 맞는 View만 DesignSystem에 포함하도록 정리했습니다.
4. 의존성 방향
정리된 의존성 구조는 다음과 같습니다.
DesignSystem은 다른 모듈에 의존하지 않으며,
단방향 UI 의존성만 유지하도록 구성했습니다.
5. 의존성 제거 작업
1. SnackbarFactory → ImageLoader 의존 제거
기존
문제
수정
→ UI 모듈 순수성 유지
2. BaseViewController → CustomTabBar 의존 제거
문제
수정
6. SPM 리소스 접근 방식 변경
SPM 모듈 분리로 인해 Asset 접근 방식이 변경되었습니다.
기존
변경
SPM 번들 리소스 접근을 위해 Asset Helper를 추가하고
기존 UIImage 직접 접근 코드를 수정했습니다.
결론