Merged
Conversation
도메인에서 설정의 기본값을 결정하도록 변경했습니다.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This pull request refactors the user configuration repository to better adhere to clean architecture principles by introducing a use case layer and streamlining configuration handling.
- Introduces SettingPageUseCase to decouple the view model from the repository.
- Updates configuration entity handling by migrating default value logic to enum default properties and removing redundant caching in the repository.
- Adjusts dependency injection registration across Domain, Data, and App assemblies.
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
| Projects/Domain/Interface/UseCase/SettingPageUseCase.swift | New use case interface for setting page. |
| Projects/Domain/Interface/Repository/UserConfigurationRepository.swift | Updated repository protocol returning optionals. |
| Projects/Domain/Interface/Entity/Configuration/*.swift | Removed savingValue properties and added defaultValue properties. |
| Projects/Domain/Concrete/UseCase/DefaultSettingPageUseCase.swift | Use case implementation using nil-coalescing to supply defaults. |
| Projects/Domain/Concrete/UseCase/DefaultAllMarketTickersUseCase.swift | Updated grid type retrieval to use nil-coalescing. |
| Projects/Data/Tests/UserConfigurationDataSourceTests.swift | New tests for the user configuration data source. |
| Projects/Data/Repository/DefaultUserConfigurationRepository.swift | Refactored repository to use the data source and removed caching. |
| DI Assemblies (SharedAssembly.swift, DomainAssembly.swift, DataAssembly.swift) | Updated dependency registrations for the refactored services and use cases. |
Comments suppressed due to low confidence (1)
Projects/Data/Tests/UserConfigurationDataSourceTests.swift:15
- [nitpick] The function name 'checkConfiguratonSaving' contains a typo; consider renaming it to 'checkConfigurationSaving' for better clarity.
func checkConfiguratonSaving() {
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
변경된 점
유저 설정 레포지토리 리팩토링
기존 구현의 경우 클린 아키텍처 관점에서 역할 분배가 재대로 되어 있지 않다고 판단하여 수정하였습니다.
ViewModel이 레포지토리에 직접 접근하지 않고SettingPageUseCase를 거치도록 수정했습니다.개념적 통용을 위해
UseCase를 생성하는 것이 올바르다고 판단했습니다.※ 설정 값이 올바르게 쓰기, 읽기 되는지 확인하기 위해 데이터 소스 테스트코드를 작성했습니다.