-
Notifications
You must be signed in to change notification settings - Fork 0
refactor: feature 모듈간 의존성 제거 #39
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
294372a
[BOOK-121] refactor: feature 모듈간 의존성 제거
easyhooon c5be4ab
Merge branch 'develop' into BOOK-121-refactor/#36
easyhooon 0a23b1f
[BOOK-121] refactor: 누락된 약관 동의 화면 변경 반영
easyhooon f29412d
[BOOK-121] chore: 필요 없는 Suppress 구문 제거
easyhooon b0d1817
[BOOK-121] feat: 프로젝트 모듈 의존성 그래프 생성 스크립트 추가
easyhooon 869669b
[BOOK-121] chore: code style check success
easyhooon 0a3ddd1
[BOOK-121] chore: projectDependencyGraph.gradle 파일 네이밍 수정
easyhooon e24d4a6
[BOOK-121] chore: 토끼 리뷰 반영
easyhooon File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -41,3 +41,7 @@ allprojects { | |
| } | ||
| } | ||
| } | ||
|
|
||
| apply { | ||
| from("gradle/projectDependencyGraph.gradle") | ||
| } | ||
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
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
10 changes: 10 additions & 0 deletions
10
feature/home/src/main/kotlin/com/ninecraft/booket/feature/home/HomeUiState.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| package com.ninecraft.booket.feature.home | ||
|
|
||
| import com.slack.circuit.runtime.CircuitUiEvent | ||
| import com.slack.circuit.runtime.CircuitUiState | ||
|
|
||
| data class HomeUiState( | ||
| val eventSink: (HomeUiEvent) -> Unit, | ||
| ) : CircuitUiState | ||
|
|
||
| sealed interface HomeUiEvent : CircuitUiEvent | ||
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,8 +16,6 @@ ksp { | |
|
|
||
| dependencies { | ||
| implementations( | ||
| projects.feature.login, | ||
|
|
||
| libs.logger, | ||
| ) | ||
| } | ||
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
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
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -20,37 +20,14 @@ import com.ninecraft.booket.core.designsystem.component.button.ReedButton | |
| import com.ninecraft.booket.core.designsystem.component.button.ReedButtonColorStyle | ||
| import com.ninecraft.booket.core.designsystem.component.button.largeButtonStyle | ||
| import com.ninecraft.booket.core.designsystem.theme.ReedTheme | ||
| import com.ninecraft.booket.screens.LibraryScreen | ||
| import com.slack.circuit.codegen.annotations.CircuitInject | ||
| import com.slack.circuit.runtime.CircuitUiEvent | ||
| import com.slack.circuit.runtime.CircuitUiState | ||
| import com.slack.circuit.runtime.screen.Screen | ||
| import dagger.hilt.android.components.ActivityRetainedComponent | ||
| import kotlinx.parcelize.Parcelize | ||
|
|
||
| @Parcelize | ||
| data object LibraryScreen : Screen { | ||
| data class State( | ||
| val isLoading: Boolean = false, | ||
| val nickname: String = "", | ||
| val email: String = "", | ||
| val sideEffect: SideEffect? = null, | ||
| val eventSink: (Event) -> Unit, | ||
| ) : CircuitUiState | ||
|
|
||
| sealed interface SideEffect { | ||
| data class ShowToast(val message: String) : SideEffect | ||
| } | ||
|
|
||
| sealed interface Event : CircuitUiEvent { | ||
| data object InitSideEffect : Event | ||
| data object OnLogoutButtonClick : Event | ||
| } | ||
| } | ||
|
|
||
| @CircuitInject(LibraryScreen::class, ActivityRetainedComponent::class) | ||
| @Composable | ||
| internal fun Library( | ||
| state: LibraryScreen.State, | ||
| state: LibraryUiState, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| HandleLibrarySideEffects( | ||
|
|
@@ -72,7 +49,7 @@ internal fun Library( | |
|
|
||
| @Composable | ||
| internal fun LibraryContent( | ||
| state: LibraryScreen.State, | ||
| state: LibraryUiState, | ||
| modifier: Modifier = Modifier, | ||
| ) { | ||
| Column( | ||
|
|
@@ -94,7 +71,7 @@ internal fun LibraryContent( | |
| } | ||
| ReedButton( | ||
| onClick = { | ||
| state.eventSink(LibraryScreen.Event.OnLogoutButtonClick) | ||
| state.eventSink(LibraryUiEvent.OnLogoutButtonClick) | ||
| }, | ||
| modifier = Modifier | ||
| .fillMaxWidth() | ||
|
|
@@ -118,7 +95,7 @@ internal fun LibraryContent( | |
| private fun LibraryPreview() { | ||
| ReedTheme { | ||
| Library( | ||
| state = LibraryScreen.State( | ||
| state = LibraryUiState( | ||
| nickname = "홍길동", | ||
| email = "[email protected]", | ||
| eventSink = {}, | ||
|
|
||
21 changes: 21 additions & 0 deletions
21
feature/library/src/main/kotlin/com/ninecraft/booket/feature/library/LibraryUiState.kt
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,21 @@ | ||
| package com.ninecraft.booket.feature.library | ||
|
|
||
| import com.slack.circuit.runtime.CircuitUiEvent | ||
| import com.slack.circuit.runtime.CircuitUiState | ||
|
|
||
| data class LibraryUiState( | ||
| val isLoading: Boolean = false, | ||
| val nickname: String = "", | ||
| val email: String = "", | ||
| val sideEffect: LibrarySideEffect? = null, | ||
| val eventSink: (LibraryUiEvent) -> Unit, | ||
| ) : CircuitUiState | ||
|
|
||
| sealed interface LibrarySideEffect { | ||
| data class ShowToast(val message: String) : LibrarySideEffect | ||
| } | ||
|
|
||
| sealed interface LibraryUiEvent : CircuitUiEvent { | ||
| data object InitSideEffect : LibraryUiEvent | ||
| data object OnLogoutButtonClick : LibraryUiEvent | ||
| } |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -16,8 +16,6 @@ ksp { | |
|
|
||
| dependencies { | ||
| implementations( | ||
| projects.feature.home, | ||
|
|
||
| libs.logger, | ||
| libs.kakao.auth, | ||
| ) | ||
|
|
||
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
Oops, something went wrong.
Oops, something went wrong.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
🛠️ Refactor suggestion
UI 상태 구조 개선 및 일관성 검토 필요
HomeUiState도 SearchUiState와 동일한 문제를 가지고 있습니다. 실제 홈 화면에 필요한 상태 정보가 없고, 이벤트 정의도 비어있습니다.
홈 기능에 필요한 구체적인 상태를 정의해주세요:
패턴 일관성 유지 권장사항
모든 feature 모듈에서 동일한 UiState/UiEvent 패턴을 사용하고 있으므로, 각 기능별로 적절한 상태와 이벤트를 정의하여 일관성을 유지해주세요.
다른 feature 모듈들(library, login, termsagreement)에도 동일한 패턴을 적용하는 데 도움이 필요하시면 알려주세요.
📝 Committable suggestion
🤖 Prompt for AI Agents