-
Notifications
You must be signed in to change notification settings - Fork 0
Feature/#135 search UI #142
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
Conversation
Walkthrough์ ๊ฒ์(feature/serach) ๋ฐ ๋๋ฉ์ธ(domain/search) ๋ชจ๋์ ์ถ๊ฐํ๊ณ , ๋ฉ์ธ ๋ด๋น๊ฒ์ด์ ์ ๊ฒ์ ๊ทธ๋ํ๋ฅผ ์ฐ๋ํ์ต๋๋ค. ์ฒซ ์คํ ์(Search ๋ฏธ์ง์ ์) ๊ฒ์ ํ๋ฉด์ผ๋ก ์ด๋ํ๋ ํ๋ฆ์ ๋์ ํ์ต๋๋ค. ๋์์ธ ์์คํ ์ ๊ฒ์๋ฐ ์ปดํฌ๋ํธ๋ฅผ ์ถ๊ฐํ๊ณ , PlaceCard ์์ด์ฝ ๋ฐฐ๊ฒฝ์ ๋งคํ์ ๋ณ๊ฒฝํ์ต๋๋ค. Gradle ์ค์ ๊ณผ ์ข ์์ฑ๋ ๊ฐฑ์ ๋์์ต๋๋ค. Changes
Sequence Diagram(s)sequenceDiagram
autonumber
actor User
participant Activity as MainActivity
participant MainScreen
participant Nav as NavController
participant Search as SearchGraph
User->>Activity: ์ฑ ์คํ
Activity->>MainScreen: setContent(isFreshLaunch = savedInstanceState == null)
alt isFreshLaunch == true
MainScreen->>Nav: observe current destination
MainScreen->>Nav: navigateSearch(navOptions: popUpTo(0), launchSingleTop)
Nav->>Search: show SearchRoute
else ๊ธฐ์กด ํ๋ฆ
MainScreen->>Nav: ๊ธฐ์กด ๊ทธ๋ํ ์ ์ง
end
sequenceDiagram
autonumber
actor User
participant UI as SearchScreen
participant VM as SearchViewModel
participant Nav as NavController
User->>UI: ํ
์คํธ ์
๋ ฅ/์์
UI->>VM: Intent.QueryChanged
VM->>VM: 250ms ๋๋ฐ์ด์ค ํ ๊ฒ์
VM->>UI: State(isLoading / results)
User->>UI: ์ํฐ/๊ฒ์ ์์ด์ฝ
UI->>VM: Intent.Submit
VM->>UI: State ์
๋ฐ์ดํธ
User->>UI: ๊ฒฐ๊ณผ ์์ดํ
ํด๋ฆญ
UI->>VM: Intent.ClickItem(id)
VM-->>UI: SideEffect.NavigateToPlaceDetail(townId, placeId)
UI->>Nav: navigate to PlaceDetail
User->>UI: "์ฐพ๋ ์ฅ์๊ฐ ์์ด์" ํด๋ฆญ
UI->>VM: Intent.ClickNoResult
VM-->>UI: SideEffect.NavigateToNoResult
UI->>Nav: navigate to NoResult
Estimated code review effort๐ฏ 4 (Complex) | โฑ๏ธ ~60 minutes Possibly related PRs
Suggested labels
Suggested reviewers
Poem
Pre-merge checks and finishing touchesโ Failed checks (3 warnings)
โ Passed checks (2 passed)
โจ Finishing touches
๐งช Generate unit tests
Tip ๐ฎ Agentic pre-merge checks are now available in preview!Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.
Please see the documentation for more information. Example: reviews:
pre_merge_checks:
custom_checks:
- name: "Undocumented Breaking Changes"
mode: "warning"
instructions: |
Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).Please share your feedback with us on this Discord post. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Actionable comments posted: 6
๐งน Nitpick comments (9)
domain/search/src/main/java/com/teamsolply/solply/search/MyClass.kt (1)
3-3: ์๋ฏธ ์๋ ํ๋ ์ด์คํ๋ ํด๋์ค ์ ๊ฑฐ ๊ฒํ
MyClass๊ฐ ๋น์ด ์๋ ์ํ๋ก ๋จ์ ์์ผ๋ฉด ์ถํ ์ค์ ๊ตฌํ๊ณผ ์ถฉ๋ํ๊ฑฐ๋ ๋ถํ์ํ ์ฐธ์กฐ๊ฐ ์๊ธธ ์ ์์ต๋๋ค. ์ง๊ธ ๋จ๊ณ์์ ์ฌ์ฉ ๋ชฉ์ ์ด ์๋ค๋ฉด ํ์ผ์ ์ ๊ฑฐํ๊ฑฐ๋, ํ์ํ ์ค์ ๋๋ฉ์ธ ๋ก์ง/๋ชจ๋ธ๋ก ๋์ฒดํ๋ ํธ์ด ์ข๊ฒ ์ต๋๋ค.feature/serach/src/main/java/com/teamsolply/solply/search/component/SearchItem.kt (1)
97-104: ํ๋ฆฌ๋ทฐ์ฉ PlaceType ๊ฐ ์คํ์ค์ enum ๊ฐ์ด
WALKING์ธ๋ฐ"WALK"์ผ๋ก ์ฐพ๊ณ ์์ด ํญ์PlaceType.ALL๋ก fallback ๋ฉ๋๋ค. ํ๋ฆฌ๋ทฐ๋ผ๋ ์๋์ ๋ค๋ฅด๋ ๊ฐ ๊ต์ ์ด ์ข๊ฒ ์ต๋๋ค.- val walk = PlaceType.entries.firstOrNull { it.name == "WALK" } ?: PlaceType.ALL + val walk = PlaceType.entries.firstOrNull { it.name == "WALKING" } ?: PlaceType.ALLfeature/main/build.gradle.kts (1)
14-14: ๋ชจ๋ ์ด๋ฆ ์ฒ ์serachโsearch๋ก ์ ๋น ํ์์ ๊ธฐ๋ฅ์ด โSearchโ๋ฅผ ์๋ฏธํ๋๋ฐ ๋ชจ๋/์์กด์ฑ ์ด๋ฆ์ด ๋ชจ๋
serach๋ก ๋ฑ๋ก๋์ด ์์ต๋๋ค. ์ง๊ธ ๋ฐ๋ก ์ ๋ฆฌํ์ง ์์ผ๋ฉด ์ดํ ๋ ์ด์ด ์ ๋ฐ์ ์คํ๊ฐ ๊ตณ์ด์ ธ ์ ์ง๋ณด์๊ฐ ์ด๋ ค์์ง๋๋ค. ๋ชจ๋ ๋๋ ํฐ๋ฆฌ์ Gradle ์๋ณ์๋ฅผsearch๋ก ํต์ผํด ์ฃผ์ธ์.feature/serach/src/main/java/com/teamsolply/solply/search/SearchContract.kt (2)
13-15: Public API์์ PersistentList ๋ ธ์ถ ์ง์(ImmutableList๋ก ์ํ ๊ถ์ฅ)๊ตฌํ ์ธ๋ถ(ํผ์์คํดํธ ์ปฌ๋ ์ ) ๋ ธ์ถ์ ์ค์ด๊ธฐ ์ํด
PersistentList๋์ImmutableList(๋๋ ๋จ์List)๋ก ํ๋ฉดํํ๋ ๊ฒ์ด ์ข์ต๋๋ค. ๊ธฐ๋ณธ๊ฐ์ ๊ทธ๋๋กpersistentListOf()๋ฅผ ์ฌ์ฉํด๋ ๋ฉ๋๋ค.import kotlinx.collections.immutable.PersistentList +import kotlinx.collections.immutable.ImmutableList import kotlinx.collections.immutable.persistentListOf data class SearchState( val query: String = "", val isLoading: Boolean = false, - val results: PersistentList<SearchItemUi> = persistentListOf(), + val results: ImmutableList<SearchItemUi> = persistentListOf(), val selectedTownId: Long? = null )Also applies to: 7-8
21-26: id ๋ค์ด๋ฐ์ placeId๋ก ๋ช ํํ(๊ฐ๋ ์ฑ/์ผ๊ด์ฑ ํฅ์)
SearchItemUi.id์ClickItem(id)๋ ์๋ฏธ์ ์ฅ์ ์๋ณ์์ด๋ฏ๋กplaceId๋ก ๋ณ๊ฒฝ ์ ์๋๊ฐ ์ ๋ช ํด์ง๋๋ค. ์ด๊ธฐ ๋จ๊ณ๋ผ๋ฉด ์ง๊ธ ๋ฐ์ํ๋ ํธ์ด ์ฅ๊ธฐ ์ ์ง๋ณด์์ ์ ๋ฆฌํฉ๋๋ค(ํธ์ถ๋ถ ์ ๋ฐ ์์ ํ์).data class SearchItemUi( - val id: Long, + val placeId: Long, val name: String, val tag: PlaceType, val address: String, val imageUrl: String ) sealed interface SearchIntent : UiIntent { data class QueryChanged(val value: String) : SearchIntent data object ClearQuery : SearchIntent data object Submit : SearchIntent - data class ClickItem(val id: Long) : SearchIntent + data class ClickItem(val placeId: Long) : SearchIntent data object ClickNoResult : SearchIntent data object Retry : SearchIntent }Also applies to: 32-33
feature/serach/src/main/java/com/teamsolply/solply/search/SearchScreen.kt (4)
41-50: LaunchedEffect ์ค๋ณต ๋ฐ ํค ๋ณด๊ฐ(๋ทฐ๋ชจ๋ธ์ ๋ฐ์ธ๋ฉํ๊ณ ํ๋๋ก ํฉ์น๊ธฐ)๋์ผ ํค(Unit)๋ก ๋ ๊ฐ์
LaunchedEffect๋ฅผ ์ฌ์ฉ ์ค์ ๋๋ค.viewModel์ ํค๋ก ํ๋์ ๋ธ๋ก์ ํฉ์น๋ฉด ์๋ช ๊ด๋ฆฌ๊ฐ ๋ช ํํด์ง๊ณ ์ฌ์์ง ์ด์๋ฅผ ์ค์ผ ์ ์์ต๋๋ค.- LaunchedEffect(Unit) { - viewModel.sideEffect.collectLatest { se -> - when (se) { - is SearchSideEffect.NavigateToPlaceDetail -> navigateToPlaceDetail(se.townId, se.placeId) - SearchSideEffect.NavigateToNoResult -> onNoPlaceClick() - } - } - } - LaunchedEffect(Unit) { viewModel.sendIntent(SearchIntent.Retry) } + LaunchedEffect(viewModel) { + viewModel.sendIntent(SearchIntent.Retry) + viewModel.sideEffect.collectLatest { se -> + when (se) { + is SearchSideEffect.NavigateToPlaceDetail -> navigateToPlaceDetail(se.townId, se.placeId) + SearchSideEffect.NavigateToNoResult -> onNoPlaceClick() + } + } + }
121-130: ๋ถํ์ํ toImmutableList ์ ๊ฑฐ ๋ฐ ๋ฆฌ์คํธ key ์ถ๊ฐ์ด๋ฏธ
PersistentList์ด๋ฏ๋ก ๋ณต์ฌ/๋ณํ ๋ถํ์ํฉ๋๋ค. ๋ํitemsIndexed์key๋ฅผ ์ ๊ณตํด ํญ๋ชฉ ์๋ณ ์์ ์ฑ๊ณผ ์ฑ๋ฅ์ ๊ฐ์ ํ์ธ์.-import kotlinx.collections.immutable.toImmutableList @@ - val items = state.results.toImmutableList() - itemsIndexed(items) { _, item -> + itemsIndexed( + state.results, + key = { _, item -> item.id } // placeId๋ก ์ด๋ฆ ๋ณ๊ฒฝ ์ item.placeId + ) { _, item -> SearchItem( - placeName = item.name, - placeTag = item.tag, - placeAddress = item.address, - placeImageUrl = item.imageUrl, - onClick = { onClickItem(item.id) } + placeName = item.name, + placeTag = item.tag, + placeAddress = item.address, + placeImageUrl = item.imageUrl, + onClick = { onClickItem(item.id) } // placeId๋ก ์ด๋ฆ ๋ณ๊ฒฝ ์ item.placeId ) }Also applies to: 29-29
82-84: ํ๋์ฝ๋ฉ ๋ฌธ์์ด โ stringResource๋ก i18n/์ ๊ทผ์ฑ ๊ฐํ๋ฌธ์์ด์ ๋ฆฌ์์ค๋ก ๋ถ๋ฆฌํ๊ณ
stringResource๋ฅผ ์ฌ์ฉํ์ธ์. ์ ๊ทผ์ฑ์ฉ contentDescription๋ ๋ฆฌ์์คํ ๊ถ์ฅํฉ๋๋ค.import androidx.compose.ui.res.painterResource +import androidx.compose.ui.res.stringResource +import com.teamsolply.solply.search.R @@ - SolplyTopBar( - barText = "๊ฒ์ํ๊ธฐ", + SolplyTopBar( + barText = stringResource(R.string.search_title), onBackButtonClick = onBack ) @@ - Text( - text = "๊ฒ์ ๊ฒฐ๊ณผ ${state.resultCount}๊ฐ", + Text( + text = stringResource(R.string.search_result_count, state.resultCount), style = SolplyTheme.typography.button14M, color = SolplyTheme.colors.gray800, modifier = Modifier.padding(start = 20.dp, top = 32.dp, bottom = 16.dp) ) @@ - Text( - text = "์ฐพ๋ ์ฅ์๊ฐ ์์ด์", + Text( + text = stringResource(R.string.search_no_result), style = SolplyTheme.typography.button14M, color = SolplyTheme.colors.gray700, modifier = Modifier.weight(1f) ) Icon( painter = painterResource(id = com.teamsolply.solply.designsystem.R.drawable.ic_arrow_right_icon), - contentDescription = "arrow-right-icon", + contentDescription = stringResource(R.string.cd_arrow_right), tint = SolplyTheme.colors.gray700 )์ถ๊ฐ ๋ฆฌ์์ค(์ฐธ๊ณ ):
<!-- feature/serach/src/main/res/values/strings.xml --> <resources> <string name="search_title">๊ฒ์ํ๊ธฐ</string> <string name="search_result_count">๊ฒ์ ๊ฒฐ๊ณผ %1$d๊ฐ</string> <string name="search_no_result">์ฐพ๋ ์ฅ์๊ฐ ์์ด์</string> <string name="cd_arrow_right">๋ค์์ผ๋ก ์ด๋</string> </resources>Also applies to: 101-106, 147-158, 21-22
1-1: ๋ชจ๋ ๊ฒฝ๋ก ์คํ: feature/serach โ feature/search๋ก ์ ๋ฆฌ ๊ถ์ฅ๊ฒฝ๋ก ์คํ๋ IDE ๊ฒ์/ํ์, ์คํฌ๋ฆฝํธ, ์ ๊ท ํ์์ ํ์์ฑ์ ํด์นฉ๋๋ค. ๋ชจ๋/ํจํค์ง/gradle ์ค์ ์ผ๊ด ๋ฆฌ๋ค์์ ๊ณ ๋ คํด์ฃผ์ธ์.
๐ Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
๐ Files selected for processing (22)
app/build.gradle.kts(1 hunks)core/designsystem/src/main/java/com/teamsolply/solply/designsystem/component/card/SolplyPlaceCard.kt(1 hunks)core/designsystem/src/main/java/com/teamsolply/solply/designsystem/component/searchbar/SolplySearchBar.kt(1 hunks)domain/search/.gitignore(1 hunks)domain/search/build.gradle.kts(1 hunks)domain/search/src/main/java/com/teamsolply/solply/search/MyClass.kt(1 hunks)feature/main/build.gradle.kts(1 hunks)feature/main/src/main/java/com/teamsolply/solply/main/MainActivity.kt(1 hunks)feature/main/src/main/java/com/teamsolply/solply/main/MainNavigator.kt(2 hunks)feature/main/src/main/java/com/teamsolply/solply/main/MainScreen.kt(3 hunks)feature/maps/src/main/java/com/teamsolply/solply/maps/component/bottomsheet/PlaceDetailBottomSheet.kt(0 hunks)feature/place/src/main/java/com/teamsolply/solply/place/PlaceScreen.kt(0 hunks)feature/serach/.gitignore(1 hunks)feature/serach/build.gradle.kts(1 hunks)feature/serach/proguard-rules.pro(1 hunks)feature/serach/src/main/AndroidManifest.xml(1 hunks)feature/serach/src/main/java/com/teamsolply/solply/search/SearchContract.kt(1 hunks)feature/serach/src/main/java/com/teamsolply/solply/search/SearchScreen.kt(1 hunks)feature/serach/src/main/java/com/teamsolply/solply/search/SearchViewModel.kt(1 hunks)feature/serach/src/main/java/com/teamsolply/solply/search/component/SearchItem.kt(1 hunks)feature/serach/src/main/java/com/teamsolply/solply/search/navigation/SearchNavigation.kt(1 hunks)settings.gradle.kts(1 hunks)
๐ค Files with no reviewable changes (2)
- feature/place/src/main/java/com/teamsolply/solply/place/PlaceScreen.kt
- feature/maps/src/main/java/com/teamsolply/solply/maps/component/bottomsheet/PlaceDetailBottomSheet.kt
๐ฎ Files not reviewed due to content moderation or server errors (5)
- app/build.gradle.kts
- feature/main/src/main/java/com/teamsolply/solply/main/MainNavigator.kt
- domain/search/build.gradle.kts
- feature/main/src/main/java/com/teamsolply/solply/main/MainActivity.kt
- feature/serach/build.gradle.kts
๐งฐ Additional context used
๐งฌ Code graph analysis (6)
feature/serach/src/main/java/com/teamsolply/solply/search/component/SearchItem.kt (4)
core/ui/src/main/java/com/teamsolply/solply/ui/text/TextUtil.kt (1)
formatTextToPlaceItemTitle(66-70)core/ui/src/main/java/com/teamsolply/solply/ui/image/AdaptationImage.kt (1)
AdaptationImage(15-69)core/designsystem/src/main/java/com/teamsolply/solply/designsystem/component/chip/PlaceTag.kt (1)
PlaceTag(15-54)core/designsystem/src/main/java/com/teamsolply/solply/designsystem/theme/Theme.kt (1)
SolplyTheme(46-53)
feature/serach/src/main/java/com/teamsolply/solply/search/SearchScreen.kt (3)
core/designsystem/src/main/java/com/teamsolply/solply/designsystem/component/topbar/SolplyTopBar.kt (1)
SolplyTopBar(21-54)core/designsystem/src/main/java/com/teamsolply/solply/designsystem/component/searchbar/SolplySearchBar.kt (1)
SolplySearchbar(27-85)feature/serach/src/main/java/com/teamsolply/solply/search/component/SearchItem.kt (1)
SearchItem(29-90)
core/designsystem/src/main/java/com/teamsolply/solply/designsystem/component/searchbar/SolplySearchBar.kt (1)
core/designsystem/src/main/java/com/teamsolply/solply/designsystem/theme/Theme.kt (1)
SolplyTheme(46-53)
feature/main/src/main/java/com/teamsolply/solply/main/MainScreen.kt (2)
feature/main/src/main/java/com/teamsolply/solply/main/MainNavigator.kt (1)
rememberMainNavigator(151-156)feature/serach/src/main/java/com/teamsolply/solply/search/navigation/SearchNavigation.kt (1)
searchNavGraph(16-30)
feature/serach/src/main/java/com/teamsolply/solply/search/navigation/SearchNavigation.kt (2)
feature/main/src/main/java/com/teamsolply/solply/main/MainNavigator.kt (1)
navigate(38-75)feature/serach/src/main/java/com/teamsolply/solply/search/SearchScreen.kt (1)
SearchRoute(32-61)
feature/serach/src/main/java/com/teamsolply/solply/search/SearchViewModel.kt (1)
core/ui/src/main/java/com/teamsolply/solply/ui/base/BaseViewModel.kt (2)
reduce(44-46)postSideEffect(48-52)
๐ Additional comments (7)
core/designsystem/src/main/java/com/teamsolply/solply/designsystem/component/card/SolplyPlaceCard.kt (1)
58-62: ๊ธฐ๋ณธ ํ์ ๋ฐฐ๊ฒฝ์ ๋ณ๊ฒฝ ์๋ ํ์ธ ํ์๊ธฐ๋ณธ(
else) ์ผ์ด์ค์ ๋ฐฐ๊ฒฝ์์purple500์ผ๋ก ๋ฐ๊พธ๋ฉด ์์ด์ฝ ์(gray400)๊ณผ์ ๋๋น๊ฐ ์ค์ด๋ค์ด ๊ฐ๋ ์ฑ์ด ๋จ์ด์ง ์ ์์ต๋๋ค. ์๋๋ ๋์์ธ์ธ์ง ํ ๋ฒ ๋ ํ์ธํด ์ฃผ์ธ์.feature/serach/.gitignore (1)
1-1: /build ๋ฌด์ ๊ท์น ์ถ๊ฐ ๐์ ๋ชจ๋์ ๋น๋ ์ฐ์ถ๋ฌผ์ ๊น๋ํ๊ฒ ์ ์ธํ ์ ์์ด์. ์ ์ ์ฉํ์ จ์ต๋๋ค.
domain/search/.gitignore (1)
1-1: /build ๋ฌด์ ๊ท์น ์ถ๊ฐ ๐๋๋ฉ์ธ ๋ชจ๋์์๋ ๋์ผํ ์ ์ธ ๊ท์น์ด ํ์ํ๋๋ฐ ์ ์ฑ๊ฒจ์ฃผ์ จ์ต๋๋ค.
feature/serach/src/main/AndroidManifest.xml (1)
1-4: ๋น ๋งค๋ํ์คํธ ๊ตฌ์ฑ OKํ์ฌ๋ ์ปดํฌ๋ํธ ์ ์ธ์ด ์์ง๋ง, ๋ชจ๋ ๋ฑ๋ก์ฉ ๊ธฐ๋ณธ ๋งค๋ํ์คํธ๋ก ์ ์ ํฉ๋๋ค.
feature/serach/proguard-rules.pro (1)
1-21: ํ๋ก๊ฐ๋ ๊ธฐ๋ณธ ํ ํ๋ฆฟ ํ๋ณด ์๋ฃํฅํ ๋๋ ํ ๊ท์น์ ์ถ๊ฐํ ๋ ์ฌ๊ธฐ์ ๋ฐ๋ก ๊ด๋ฆฌํ ์ ์์ด ์ข์ต๋๋ค.
settings.gradle.kts (1)
66-67: ๋ชจ๋ include ์ด๋ฆ๋search๋ก ํต์ผํด์ผ ํฉ๋๋ค์์์ ์ธ๊ธํ ๋๋ก feature ๋ชจ๋ ์ฒ ์ ์คํ๊ฐ settings์๋ ๋ฐ๋ณต๋๊ณ ์์ต๋๋ค. ์ค์ ๊ธฐ๋ฅ๋ช ์ ๋ฐ์ํ๋๋ก
:feature:search๋ก ์ ๋ฆฌํด ์ฃผ์ธ์.feature/serach/src/main/java/com/teamsolply/solply/search/SearchContract.kt (1)
37-40: ๊ณ์ฝ(์ฌ์ด๋ ์ดํํธ) ์ ์ ๊น๋ํฉ๋๋ค๋ค์ด๊ฒ์ด์ ๋ชฉ์ ์ ์ฌ์ด๋ ์ดํํธ ๋ถ๋ฆฌ์ ํ์ด๋ก๋ ๊ตฌ์ฑ ๋ชจ๋ ์ ์ ํฉ๋๋ค.
| BasicTextField( | ||
| value = query, | ||
| onValueChange = onQueryChange, | ||
| modifier = modifier | ||
| .weight(1f) | ||
| .fillMaxWidth() | ||
| .focusRequester(focusRequester), |
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.
weight import ๋๋ฝ์ผ๋ก ์ปดํ์ผ์ด ์คํจํฉ๋๋ค.
Line 58์์ .weight(1f)๋ฅผ ํธ์ถํ์ง๋ง androidx.compose.foundation.layout.weight import๊ฐ ์์ด์ ๋น๋๊ฐ ๋ฉ์ถฅ๋๋ค. ์๋์ฒ๋ผ import๋ฅผ ์ถ๊ฐํด ์ฃผ์ธ์.
+import androidx.compose.foundation.layout.weight๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| BasicTextField( | |
| value = query, | |
| onValueChange = onQueryChange, | |
| modifier = modifier | |
| .weight(1f) | |
| .fillMaxWidth() | |
| .focusRequester(focusRequester), | |
| // Add at the top of SolplySearchBar.kt alongside the other Compose imports | |
| import androidx.compose.foundation.layout.weight |
๐ค Prompt for AI Agents
In
core/designsystem/src/main/java/com/teamsolply/solply/designsystem/component/searchbar/SolplySearchBar.kt
around lines 54 to 60, the call to .weight(1f) causes a compile error because
the androidx.compose.foundation.layout.weight import is missing; add the import
statement for androidx.compose.foundation.layout.weight at the top of the file
(with the other imports) so Modifier.weight is resolved and the file compiles.
| LaunchedEffect(navController) { | ||
| val initialDestination = snapshotFlow { navController.currentBackStackEntry } | ||
| .filterNotNull() | ||
| .first() | ||
| .destination | ||
|
|
||
| if (!initialDestination.hasRoute(Search::class)) { | ||
| val initialNavOptions = navOptions { | ||
| popUpTo(0) { | ||
| inclusive = true | ||
| } | ||
| launchSingleTop = true | ||
| } | ||
| navigator.navigateToSearch(initialNavOptions) | ||
| } | ||
| } | ||
| } |
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.
์ด๊ธฐ ๋ฐฑ์คํ ์กฐํ๊ฐ ์์ํ ์๋ฃ๋์ง ์๋ ๋ฒ๊ทธ๊ฐ ์์ต๋๋ค
navController.currentBackStackEntry๋ Compose ์ค๋
์ท ์ํ๊ฐ ์๋์ด์ snapshotFlow๊ฐ ์ดํ ๋ณ๊ฒฝ์ ๊ฐ์งํ์ง ๋ชปํฉ๋๋ค. ์ฒซ ์ฝ๊ธฐ๊ฐ null์ด๋ฉด filterNotNull().first()๊ฐ ๋๊น์ง ๋๊ธฐํ์ฌ ๊ฒ์ ํ๋ฉด์ผ๋ก์ ์ด๊ธฐ ์ง์
์ด ์ ๋ ์คํ๋์ง ์์ต๋๋ค. ์ฝ๋ ์คํํธ์์ ์ค์ ๋ก ์ด๋ฐ ์ํฉ์ด ๋ฐ์ํ๊ธฐ ๋๋ฌธ์ ํ์ ์์ ์ด ํ์ํฉ๋๋ค.
LaunchedEffect(navController) {
- val initialDestination = snapshotFlow { navController.currentBackStackEntry }
- .filterNotNull()
- .first()
- .destination
+ val initialDestination = navController.currentBackStackEntryFlow
+ .filterNotNull()
+ .first()
+ .destinationimport androidx.navigation.currentBackStackEntryFlow ์ถ๊ฐ๋ ํจ๊ป ํ์ํฉ๋๋ค.
๐ค Prompt for AI Agents
In feature/main/src/main/java/com/teamsolply/solply/main/MainScreen.kt around
lines 71-87, the use of snapshotFlow { navController.currentBackStackEntry }
never observes later changes because currentBackStackEntry is not a Compose
snapshot state; replace it with navController.currentBackStackEntryFlow and
change the await to use filterNotNull().first() on that flow to obtain the
initial destination without hanging, and add the import
androidx.navigation.currentBackStackEntryFlow at the top of the file.
| import com.teamsolply.solply.model.PlaceType | ||
| import com.teamsolply.solply.ui.extension.customClickable | ||
| import com.teamsolply.solply.ui.image.AdaptationImage | ||
| import formatTextToPlaceItemTitle |
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.
์ํฌํธ ๊ตฌ๋ฌธ ๋๋ฌธ์ ์ปดํ์ผ์ด ์คํจํฉ๋๋ค
Kotlin ์ต์์ ํจ์๋ FQCN์ผ๋ก ์ํฌํธํด์ผ ํฉ๋๋ค. ํ์ฌ import formatTextToPlaceItemTitle๋ ํจํค์ง๋ช
์ด ์์ด ๋น๋ ์๋ฌ๊ฐ ๋ฐ์ํฉ๋๋ค.
์ ์ฉ diff๋ ์๋์ ๊ฐ์ต๋๋ค.
-import formatTextToPlaceItemTitle
+import com.teamsolply.solply.ui.text.formatTextToPlaceItemTitle๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| import formatTextToPlaceItemTitle | |
| import com.teamsolply.solply.ui.text.formatTextToPlaceItemTitle |
๐ค Prompt for AI Agents
In
feature/serach/src/main/java/com/teamsolply/solply/search/component/SearchItem.kt
around line 27, the import line "import formatTextToPlaceItemTitle" is missing
the package FQCN and causes a compile error; update the import to the function's
fully-qualified package name (e.g. import
com.teamsolply.solply.utils.formatTextToPlaceItemTitle or the actual package
where the top-level function is declared), save, and ensure the file compiles.
| fun NavController.navigateSearch(navOptions: NavOptions) { | ||
| navigate(Search, navOptions) | ||
| } |
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.
navigate ํ์ฅ ํจ์ import ๋๋ฝ์ผ๋ก ์ปดํ์ผ ์ค๋ฅ ๋ฐ์
Line 13์์ navigate(Search, navOptions)๋ฅผ ํธ์ถํ์ง๋ง, ์ด๋ฅผ ์ ๊ณตํ๋ com.teamsolply.solply.navigation.navigate ํ์ฅ ํจ์๋ฅผ importํ์ง ์์ ์ปดํ์ผ ๋จ๊ณ์์ Unresolved reference: navigate ์ค๋ฅ๊ฐ ๋ฐ์ํฉ๋๋ค. ์๋์ ๊ฐ์ด import๋ฅผ ์ถ๊ฐํด์ฃผ์ธ์.
import androidx.navigation.compose.composable
import com.teamsolply.solply.navigation.Route
+import com.teamsolply.solply.navigation.navigate๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| fun NavController.navigateSearch(navOptions: NavOptions) { | |
| navigate(Search, navOptions) | |
| } | |
| import androidx.navigation.compose.composable | |
| import com.teamsolply.solply.navigation.Route | |
| import com.teamsolply.solply.navigation.navigate |
๐ค Prompt for AI Agents
In
feature/serach/src/main/java/com/teamsolply/solply/search/navigation/SearchNavigation.kt
around lines 12 to 14, the call to navigate(Search, navOptions) fails to compile
because the extension function com.teamsolply.solply.navigation.navigate is not
imported; add an import for com.teamsolply.solply.navigation.navigate at the top
of the file so the extension function is resolved and the call compiles.
| onQueryChange = { | ||
| onQueryChanged(it) | ||
| if (it.isBlank()) { | ||
| onClearQuery() | ||
| } | ||
| }, |
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.
๋น ๋ฌธ์์ด ์ ๋ ฅ ์ ์ด์ค ์ธํ ํธ ์ ์ก ๊ฐ๋ฅ์ฑ ์ ๊ฑฐ
ํ์ฌ ๋น ๋ฌธ์์ด์ผ ๋ QueryChanged์ ClearQuery๊ฐ ๋ชจ๋ ํธ์ถ๋ ์ ์์ต๋๋ค. ์ค๋ณต ์์ฒญ/์ฐ์ฐ์ ์ค์ด๋๋ก ๋ถ๊ธฐ์์ ํ๋๋ง ๋ณด๋ด์ธ์.
- onQueryChange = {
- onQueryChanged(it)
- if (it.isBlank()) {
- onClearQuery()
- }
- },
+ onQueryChange = { text ->
+ if (text.isBlank()) onClearQuery() else onQueryChanged(text)
+ },๐ Committable suggestion
โผ๏ธ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| onQueryChange = { | |
| onQueryChanged(it) | |
| if (it.isBlank()) { | |
| onClearQuery() | |
| } | |
| }, | |
| onQueryChange = { text -> | |
| if (text.isBlank()) onClearQuery() else onQueryChanged(text) | |
| }, |
๐ค Prompt for AI Agents
feature/serach/src/main/java/com/teamsolply/solply/search/SearchScreen.kt around
lines 91-96: ํ์ฌ ๋น ๋ฌธ์์ด ์
๋ ฅ ์ onQueryChanged์ onClearQuery๊ฐ ๋ ๋ค ํธ์ถ๋์ด ์ค๋ณต ์ธํ
ํธ๊ฐ ๋ฐ์ํ ์
์์ผ๋, ์
๋ ฅ์ด ๋น ๋ฌธ์์ด์ธ์ง ๋จผ์ ๊ฒ์ฌํ์ฌ ๋น ๋ฌธ์์ด์ด๋ฉด onClearQuery๋ง ํธ์ถํ๊ณ ๊ทธ๋ ์ง ์์ผ๋ฉด onQueryChanged๋ฅผ
ํธ์ถํ๋๋ก ๋ถ๊ธฐ ์์๋ฅผ ๋ฐ๊ฟ(๋๋ early return ์ฌ์ฉ) ํ ๋ฒ๋ง ์คํ๋๊ฒ ์์ ํ์ธ์.
| id = 2, | ||
| name = "์ํ๋ฆฌ์ํ๋ฆฌ", | ||
| tag = PlaceType.BOOKSTORE, | ||
| imageUrl = "" | ||
| ), |
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.
ํ์ ์์ฑ์ ์ธ์ ๋๋ฝ์ผ๋ก ์ปดํ์ผ ์๋ฌ๊ฐ ๋ฉ๋๋ค
SearchItemUi๋ address๊ฐ ํ์ ํ๋ผ๋ฏธํฐ์ธ๋ฐ, ๋ ๋ฒ์งธ ๋๋ฏธ ๋ฐ์ดํฐ์์ ๋๋ฝ๋์ด ์ปดํ์ผ์ด ์คํจํฉ๋๋ค. ๊ฐ ์ถ๊ฐ๊ฐ ํ์ํฉ๋๋ค.
๋ค์ ์์ ์ผ๋ก ํด๊ฒฐํ ์ ์์ต๋๋ค:
SearchItemUi(
id = 2,
name = "์ํ๋ฆฌ์ํ๋ฆฌ",
tag = PlaceType.BOOKSTORE,
- imageUrl = ""
+ address = "์ฃผ์์ฃผ์์ฃผ์์ฃผ์",
+ imageUrl = ""
),๐ค Prompt for AI Agents
In feature/serach/src/main/java/com/teamsolply/solply/search/SearchViewModel.kt
around lines 104 to 108, the second dummy SearchItemUi is missing the required
constructor parameter `address`, causing a compile error; add a suitable address
value (e.g., an empty string or realistic dummy address) to that SearchItemUi
instantiation so all required parameters match the class constructor.
๐ PR ์์ฝ
๐ฑ ์์ ํ ๋ด์ฉ
๐ฑ PR ํฌ์ธํธ
๐ธ ์คํฌ๋ฆฐ์ท
๐ฎ ๊ด๋ จ ์ด์
Summary by CodeRabbit