-
Notifications
You must be signed in to change notification settings - Fork 1
Feature/navigation3 #118
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
Feature/navigation3 #118
Changes from all commits
418a26e
41ea89a
e27226d
238521e
f0ae0a5
3a95524
cc87906
e2cd51c
235cbd3
9c40b00
01640b1
fb0ef43
f276731
43d4ac3
52836c0
f2f6405
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,180 @@ | ||
| ## ํ๋ก์ ํธ ์ปจํ ์คํธ | ||
|
|
||
| - **๊ธฐ์ ์คํ**: Kotlin, Jetpack Compose, MVVM/MVI ์ํคํ ์ฒ, Multi-module | ||
| - **๋ชจ๋ ๊ตฌ์กฐ**: | ||
| - `feature/*`: ๊ธฐ๋ฅ๋ณ ๋ชจ๋ (home, cargo-detail, myinfo ๋ฑ) | ||
| - `core/*`: ๊ณตํต ๋ชจ๋ (designsystem, data, domain, network ๋ฑ) | ||
|
|
||
| ## ์ปค๋ฐ ๋ฉ์์ง ํ์ | ||
|
|
||
| ``` | ||
| ํ์ : ๊ฐ๋จํ ์ ๋ชฉ (ํ๊ตญ์ด, 50์ ์ด๋ด) | ||
|
|
||
| - ๋ณ๊ฒฝ ์ฌํญ 1 (๊ตฌ์ฒด์ ์ผ๋ก) | ||
| - ๋ณ๊ฒฝ ์ฌํญ 2 (ํ์ผ๋ช ํฌํจ ๊ถ์ฅ) | ||
| - ๋ณ๊ฒฝ ์ฌํญ 3 (์ ๋ณ๊ฒฝํ๋์ง ํฌํจ) | ||
| ``` | ||
|
|
||
| ## ํ์ ์ ์ | ||
|
|
||
| ๋ณ๊ฒฝ์ฌํญ์ ๋ถ์ํ์ฌ ๊ฐ์ฅ ์ ํฉํ ํ์ ํ๋๋ฅผ ์ ํํ์ธ์: | ||
|
|
||
| - **feat**: ์๋ก์ด ๊ธฐ๋ฅ ์ถ๊ฐ | ||
| - ์: ์๋ก์ด ํ๋ฉด, ์๋ก์ด ์ปดํฌ๋ํธ, ์๋ก์ด API ์ฐ๋ | ||
|
|
||
| - **fix**: ๋ฒ๊ทธ ์์ | ||
| - ์: ํฌ๋์ ์์ , ์๋ชป๋ ๋ก์ง ์์ , UI ๋ฒ๊ทธ ์์ | ||
|
|
||
| - **refactor**: ์ฝ๋ ๋ฆฌํฉํ ๋ง (๊ธฐ๋ฅ ๋ณ๊ฒฝ ์์) | ||
| - ์: ํจ์ ๋ถ๋ฆฌ, ๋ณ์๋ช ๋ณ๊ฒฝ, ๊ตฌ์กฐ ๊ฐ์ | ||
|
|
||
| - **style**: UI/๋์์ธ ๋ณ๊ฒฝ (์ฝ๋ ์คํ์ผ X) | ||
| - ์: ์์ ๋ณ๊ฒฝ, ๊ฐ๊ฒฉ ์กฐ์ , ํฐํธ ์์ | ||
|
|
||
| - **test**: ํ ์คํธ ์ฝ๋ ์ถ๊ฐ/์์ | ||
| - ์: ๋จ์ ํ ์คํธ, UI ํ ์คํธ, Integration ํ ์คํธ | ||
|
|
||
| - **chore**: ๋น๋, ์ค์ , ์์กด์ฑ ๊ด๋ จ | ||
| - ์: Gradle ์ ๋ฐ์ดํธ, ๋ผ์ด๋ธ๋ฌ๋ฆฌ ์ถ๊ฐ, CI/CD ์ค์ | ||
|
|
||
| ## ์์ฑ ๊ท์น | ||
|
|
||
| ### 1. ์ ๋ชฉ ์์ฑ | ||
| - ํ๊ตญ์ด๋ก ์์ฑ | ||
| - 50์ ์ด๋ด๋ก ๊ฐ๊ฒฐํ๊ฒ | ||
| - ๋ง์นจํ ์์ด ๋ช ๋ นํ์ผ๋ก ์์ฑ | ||
| - ๋ฌด์์ ํ๋์ง ๋ช ํํ๊ฒ | ||
|
|
||
| ### 2. ๋ณธ๋ฌธ ์์ฑ | ||
| - ๊ฐ ํญ๋ชฉ์ `-`๋ก ์์ | ||
| - ๊ตฌ์ฒด์ ์ธ ํ์ผ๋ช ์ด๋ ์ปดํฌ๋ํธ๋ช ํฌํจ | ||
| - ๋ณ๊ฒฝ ์ด์ ๋ ๋งฅ๋ฝ ํฌํจ (ํ์์) | ||
| - ๋ชจ๋ ๊ฒฝ๋ก ๋ช ์ (`feature/home`, `core/designsystem` ๋ฑ) | ||
|
|
||
| โ ์ข์ ์: | ||
| ``` | ||
| - HomeScreenRedesign.kt: ์ฌ์ฉ์ ์ ๋ณด ์นด๋ ์ปดํฌ๋ํธ ์ถ๊ฐ | ||
| - CargoItemCard.kt: ํ๋ฌผ ์ํ๋ณ ์์ ๊ตฌ๋ถ ๋ก์ง ๊ตฌํ | ||
| - Figma ๋์์ธ(node-id: 1942-56177) ๊ธฐ๋ฐ ๋ ์ด์์ ์ ์ฉ | ||
| - Material 3 ๋์์ธ ์์คํ ์ ์ฉ | ||
| ``` | ||
|
|
||
| โ ๋์ ์: | ||
| ``` | ||
| - ์ฝ๋ ์์ | ||
| - ํ์ผ ์ถ๊ฐ | ||
| - ์์ ์๋ฃ | ||
| ``` | ||
|
|
||
| ## ๋ณ๊ฒฝ์ฌํญ ๋ถ์ ์ฒดํฌ๋ฆฌ์คํธ | ||
|
|
||
| ์ปค๋ฐ ๋ฉ์์ง๋ฅผ ์์ฑํ๊ธฐ ์ ์ ๋ค์์ ํ์ธํ์ธ์: | ||
|
|
||
| 1. **์ด๋ค ํ์ผ์ด ๋ณ๊ฒฝ๋์๋๊ฐ?** | ||
| - ํ์ผ๋ช ๊ณผ ๊ฒฝ๋ก ํ์ธ | ||
|
|
||
| 2. **๋ฌด์์ด ์ถ๊ฐ/์์ /์ญ์ ๋์๋๊ฐ?** | ||
| - ์๋ก์ด ํจ์/ํด๋์ค/์ปดํฌ๋ํธ | ||
| - ์์ ๋ ๋ก์ง | ||
| - ์ญ์ ๋ ์ฝ๋ | ||
|
|
||
| 3. **์ ์ด ๋ณ๊ฒฝ์ด ํ์ํ๋๊ฐ?** | ||
| - ๋ฒ๊ทธ ์์ | ||
| - ๊ธฐ๋ฅ ์ถ๊ฐ | ||
| - ์ฑ๋ฅ ๊ฐ์ | ||
| - ๋์์ธ ๋ฐ์ | ||
|
|
||
| 4. **์ด ๋ณ๊ฒฝ์ ์ํฅ ๋ฒ์๋?** | ||
| - ๋ค๋ฅธ ๋ชจ๋์ ์ํฅ | ||
| - Breaking Change ์ฌ๋ถ | ||
| - ํ ์คํธ ํ์ ์ฌ๋ถ | ||
|
|
||
| ## ์ค์ ์์ | ||
|
|
||
| ### ์์ 1: ์ ํ๋ฉด ์ถ๊ฐ | ||
| ``` | ||
| feat: ํ๋ฌผ ์์ธ ํ๋ฉด ์ถ๊ฐ | ||
|
|
||
| - CargoDetailScreen.kt: ์ ํ๋ฉด ๊ตฌํ | ||
| - CargoDetailViewModel.kt: ์ํ ๊ด๋ฆฌ | ||
| - CargoDetailUiState.kt: UI ์ํ ์ ์ | ||
| - ํ๋ฌผ ์ ๋ณด, ์ฐจ์ฃผ ์ ๋ณด, ๊ฒฝ๋ก ์ ๋ณด ํ์ | ||
| - ์ ํ/๋ฌธ์ ๋ฒํผ ๊ธฐ๋ฅ ๊ตฌํ | ||
| - Navigation ์ฐ๊ฒฐ ์๋ฃ | ||
| ``` | ||
|
|
||
| ### ์์ 2: ๋ฒ๊ทธ ์์ | ||
| ``` | ||
| fix: ํ๋ฌผ ๋ฑ๋ก ์ ๋ ์ง ์ ํ ์ค๋ฅ ์์ | ||
|
|
||
| - DatePicker.kt: ์๊ฐ๋ ์ฒ๋ฆฌ ๋ก์ง ์์ | ||
| - LocalDateTime์ ZonedDateTime์ผ๋ก ๋ณ๊ฒฝ | ||
| - ์๋ฒ์ ์๊ฐ๋ ๋ถ์ผ์น๋ก ๋ฐ์ํ ์ค๋ฅ ํด๊ฒฐ | ||
| - ํ ์คํธ ์ผ์ด์ค ์ถ๊ฐ: DatePickerTest.kt | ||
| ``` | ||
|
|
||
| ### ์์ 3: ๋ฆฌํฉํ ๋ง | ||
| ``` | ||
| refactor: Repository ๋ ์ด์ด ๋ถ๋ฆฌ ๋ฐ ์ ๋ฆฌ | ||
|
|
||
| - CargoRepository.kt: Local/Remote ๋ถ๋ฆฌ | ||
| - CargoLocalDataSource.kt: ๋ก์ปฌ ๋ฐ์ดํฐ ์์ค | ||
| - CargoRemoteDataSource.kt: ๋ฆฌ๋ชจํธ ๋ฐ์ดํฐ ์์ค | ||
| - ๋จ์ผ ์ฑ ์ ์์น ์ ์ฉ | ||
| - ํ ์คํธ ์ฉ์ด์ฑ ๊ฐ์ | ||
| ``` | ||
|
|
||
| ### ์์ 4: UI ์คํ์ผ ๋ณ๊ฒฝ | ||
| ``` | ||
| style: ๋ฉ์ธ ํ ์นด๋ ๋์์ธ ์์ | ||
|
|
||
| - CargoItemCard.kt: ์นด๋ ์คํ์ผ ์กฐ์ | ||
| - elevation 2dp โ 4dp ๋ณ๊ฒฝ | ||
| - ๋ชจ์๋ฆฌ ๋ฐ๊ฒฝ 6dp โ 8dp ๋ณ๊ฒฝ | ||
| - ๊ทธ๋ฆผ์ ์์ ์กฐ์ (#000000 โ #0000001A) | ||
| - Figma ๋์์ธ๊ณผ ์ผ์นํ๋๋ก ์์ | ||
| ``` | ||
|
|
||
| ### ์์ 5: ์ฌ๋ฌ ํ์ ์ ๋ณ๊ฒฝ | ||
| ๊ฐ์ฅ ์ค์ํ ๋ณ๊ฒฝ์ฌํญ์ ํ์ ์ ์ฌ์ฉํ์ธ์: | ||
|
|
||
| ``` | ||
| feat: ๋ก๊ทธ์ธ ํ๋ฉด ๊ฐ์ | ||
|
|
||
| - LoginScreen.kt: UI ๋ฆฌ๋์์ธ (Figma ๊ธฐ๋ฐ) | ||
| - LoginViewModel.kt: ์๋ ๋ก๊ทธ์ธ ๊ธฐ๋ฅ ์ถ๊ฐ | ||
| - PreferencesManager.kt: ๋ก๊ทธ์ธ ์ํ ์ ์ฅ ๋ก์ง | ||
| - ๋ฒ๊ทธ ์์ : ๋น๋ฐ๋ฒํธ ์ ๋ ฅ ์ ํค๋ณด๋ ์จ๊น ์ฒ๋ฆฌ | ||
| ``` | ||
|
|
||
| ## ์ฃผ์์ฌํญ | ||
|
|
||
| 1. **ํ๋์ ์ปค๋ฐ์๋ ํ๋์ ๋ ผ๋ฆฌ์ ๋ณ๊ฒฝ๋ง** | ||
| - ์ฌ๋ฌ ๊ธฐ๋ฅ์ ํ ์ปค๋ฐ์ ์์ง ๋ง ๊ฒ | ||
| - ํ์์ ์ปค๋ฐ์ ๋ถ๋ฆฌ | ||
|
|
||
| 2. **WIP(Work In Progress) ์ปค๋ฐ ์ง์** | ||
| - ์์ ํ์ง ์์ ์์ ์ ์ปค๋ฐํ์ง ๋ง ๊ฒ | ||
| - ๋ถ๋์ดํ ๊ฒฝ์ฐ `[WIP]` ํ๊ทธ ์ฌ์ฉ | ||
|
|
||
| 3. **ํ์ผ ๊ฒฝ๋ก๋ ํ๋ก์ ํธ ์ด๋ฆ ๊ธฐ์ค** | ||
| - โ `HomeScreen.kt` | ||
|
|
||
| 4. **๋ฏผ๊ฐ ์ ๋ณด ํฌํจ ๊ธ์ง** | ||
| - API ํค, ๋น๋ฐ๋ฒํธ, ๊ฐ์ธ์ ๋ณด ์ ์ธ | ||
| - ํ๊ฒฝ ์ค์ ์ .env ํ์ผ ํ์ฉ | ||
|
|
||
| ## ๋ง์ง๋ง ์ฒดํฌ | ||
|
|
||
| ์ปค๋ฐํ๊ธฐ ์ ํ์ธ: | ||
| - [ ] ํ์ ์ด ๋ช ํํ๊ฐ? | ||
| - [ ] ์ ๋ชฉ์ด 50์ ์ด๋ด์ธ๊ฐ? | ||
| - [ ] ๋ณธ๋ฌธ์ ๊ตฌ์ฒด์ ์ธ ๋ด์ฉ์ด ์๋๊ฐ? | ||
| - [ ] ํ์ผ๋ช ์ด๋ ์ปดํฌ๋ํธ๋ช ์ด ํฌํจ๋์๋๊ฐ? | ||
| - [ ] ๋ณ๊ฒฝ ์ด์ ๊ฐ ๋ช ํํ๊ฐ? | ||
| - [ ] Breaking Change๊ฐ ์๋ค๋ฉด ๋ช ์ํ๋๊ฐ? | ||
|
|
||
| --- | ||
|
|
||
| ์ด ๊ฐ์ด๋๋ฅผ ๋ฐ๋ผ ์ผ๊ด์ฑ ์๊ณ ๋ช ํํ ์ปค๋ฐ ๋ฉ์์ง๋ฅผ ์์ฑํ์ธ์. | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,19 +1,19 @@ | ||
| package com.teambrake.brake.core.navigation.action | ||
|
|
||
| import androidx.navigation.NavOptions | ||
| import com.teambrake.brake.core.navigation.route.LaunchMode | ||
|
|
||
| interface NavigatorAction { | ||
| fun popBackStack(navOptions: NavOptions? = null) | ||
| fun navigateToLogin(navOptions: NavOptions? = null) | ||
| fun navigateToSignup(navOptions: NavOptions? = null) | ||
| fun navigateToGuide(navOptions: NavOptions? = null) | ||
| fun navigateToPrivacy(navOptions: NavOptions? = null) | ||
| fun navigateToTerms(navOptions: NavOptions? = null) | ||
| fun navigateToComplete(navOptions: NavOptions? = null) | ||
| fun navigateToPermission(navOptions: NavOptions? = null) | ||
| fun navigateToHome(navOptions: NavOptions? = null) | ||
| fun navigateToRegistry(groupId: Long?, navOptions: NavOptions? = null) | ||
| fun navigateToNickname(navOptions: NavOptions? = null) | ||
| fun navigateToOpinion(navOptions: NavOptions? = null) | ||
| fun navigateToInquiry(navOptions: NavOptions? = null) | ||
| fun popBackStack() | ||
| fun navigateToLogin(launchMode: LaunchMode = LaunchMode.CLEAR_ALL) | ||
| fun navigateToSignup(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToGuide(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToPrivacy(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToTerms(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToComplete(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToPermission(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToHome(launchMode: LaunchMode = LaunchMode.CLEAR_ALL) | ||
| fun navigateToRegistry(groupId: Long? = null, launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToNickname(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToOpinion(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| fun navigateToInquiry(launchMode: LaunchMode = LaunchMode.STANDARD) | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,7 @@ | ||
| package com.teambrake.brake.core.navigation.provider | ||
|
|
||
| import androidx.navigation.NavOptions | ||
| import com.teambrake.brake.core.navigation.route.Route | ||
|
|
||
| interface NavigatorProvider { | ||
| fun getNavOptionsClearingBackStack(): NavOptions | ||
| fun getPreviousDestination(): String | ||
| fun getPreviousDestination(): Route? | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,31 @@ | ||
| package com.teambrake.brake.core.navigation.route | ||
|
|
||
| /** | ||
| * ๋ค๋น๊ฒ์ด์ ์ ๋ฐฑ์คํ ๊ด๋ฆฌ ๋ฐฉ์์ ์ ์ํ๋ LaunchMode | ||
| * | ||
| * Android์ launchMode์ ์ ์ฌํ ๊ฐ๋ ์ผ๋ก ์ค๊ณ๋จ | ||
| */ | ||
| enum class LaunchMode { | ||
| /** | ||
| * ํญ์ ์๋ก์ด ์ธ์คํด์ค๋ฅผ ๋ฐฑ์คํ์ ์ถ๊ฐ | ||
| * ๊ธฐ๋ณธ ๋์ | ||
| */ | ||
| STANDARD, | ||
|
|
||
| /** | ||
| * ๋์ Route๊ฐ ์ด๋ฏธ ๋ฐฑ์คํ์ ์ต์๋จ์ ์์ผ๋ฉด ์ฌ์ฌ์ฉ | ||
| * ๊ทธ๋ ์ง ์์ผ๋ฉด ์๋ก ์ถ๊ฐ | ||
| */ | ||
| SINGLE_TOP, | ||
|
|
||
| /** | ||
| * ๋ฐฑ์คํ์์ ๋์ Route๋ฅผ ์ฐพ์ ๊ทธ ์์ ๋ชจ๋ Route๋ฅผ ์ ๊ฑฐ | ||
| * Route๊ฐ ๋ฐฑ์คํ์ ์์ผ๋ฉด ์๋ก ์ถ๊ฐ | ||
| */ | ||
| CLEAR_TOP, | ||
|
|
||
| /** | ||
| * ๋ฐฑ์คํ์ ์์ ํ ๋น์ฐ๊ณ ์๋ก์ด Route๋ง ๋จ๊น | ||
| */ | ||
| CLEAR_ALL, | ||
| } |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,15 +1,5 @@ | ||
| package com.teambrake.brake.core.navigation.route | ||
|
|
||
| import timber.log.Timber | ||
| import androidx.navigation3.runtime.NavKey | ||
|
|
||
| interface Route | ||
|
|
||
| /** | ||
| * 2025-08-03 ๊ธฐ์ค | ||
| * Jetpack Compose Type-Safe Navigation ๋ด๋ถ์์ Route ํ์ ์ ๋ฌธ์์ด๋ก ๋ณํํ๋ ๋ฐฉ์๊ณผ ๋์ผํ ๋ณํ ํจ์ | ||
| * Jetpack Compose Type-Safe Navigation ๋ด๋ถ ๋ณํ ๋ฐฉ์์ด ๋ณ๊ฒฝ๋ ์ ์์ | ||
| */ | ||
| fun Route.stringRoute(): String { | ||
| Timber.d("stringRoute: ${this::class.qualifiedName}") | ||
| return this::class.qualifiedName ?: "" | ||
| } | ||
| interface Route : NavKey |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,11 @@ | ||
| package com.teambrake.brake.core.navigation.route | ||
|
|
||
| data class RouteStack( | ||
| val backStack: List<Route> = emptyList(), | ||
| ) { | ||
| val current: Route? = backStack.lastOrNull() | ||
|
|
||
| val previous: Route? = backStack.dropLast(1).lastOrNull() | ||
|
|
||
| constructor(startDestination: Route) : this(backStack = listOf(startDestination)) | ||
|
Comment on lines
+3
to
+10
|
||
| } | ||
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
|
|
@@ -2,7 +2,7 @@ | |||||
| ## SDK version | ||||||
| compileSdk = "36" | ||||||
| minSdk = "28" | ||||||
| targetSdk = "35" | ||||||
| targetSdk = "36" | ||||||
|
||||||
| targetSdk = "36" | |
| targetSdk = "35" |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,13 @@ | ||
| package com.teambrake.brake.presentation.home.navEntry | ||
|
|
||
| import androidx.compose.foundation.layout.PaddingValues | ||
| import androidx.navigation3.runtime.EntryProviderScope | ||
| import androidx.navigation3.runtime.NavKey | ||
| import com.teambrake.brake.core.navigation.route.MainTabRoute | ||
| import com.teambrake.brake.presentation.home.HomeRoute | ||
|
|
||
| fun EntryProviderScope<NavKey>.homeNavEntry(padding: PaddingValues) { | ||
| entry<MainTabRoute.Home> { | ||
| HomeRoute(padding = padding) | ||
| } | ||
| } |
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.
This file appears to be unrelated to the Navigation3 migration described in the PR. It's a commit message guideline document. Consider whether this should be included in this PR or moved to a separate documentation update PR to keep changes focused and easier to review.