Refactor: migrate saved locations and place search to new :feature:fi…#208
Conversation
…nder KMP module
This commit extracts the saved locations and place search functionality from the `app` and `common-ui` modules into a dedicated Kotlin Multiplatform (KMP) feature module.
- **Module Creation & Restructuring:**
- Created `:feature:finder` as a KMP module supporting Android and iOS.
- Moved `SavedLocationsScreen` and `PlaceSearchDialog` from `:common-ui` to the new module.
- Relocated domain logic (UseCases) and data mapping logic from the `app` module to `:feature:finder`.
- Updated `README.md` and module diagrams to include the new architecture.
- **ViewModel & State Management:**
- Offloaded location management and search logic from `MainViewModel` to feature-specific `SavedLocationsViewModel` and `PlaceSearchViewModel`.
- Implemented an MVI-style pattern with `Intent`, `State`, and `Effect` for the finder feature.
- Introduced `SavedLocationsFinderRoute` as the public entry point for the feature, utilizing `internal` ViewModels.
- **Dependency Injection & Setup:**
- Migrated location-related DI from Hilt to Koin within the finder module.
- Introduced `finderDomainModule` and `finderViewModelModule` Koin modules.
- Wrapped `AppContent` in `KoinContext` in `MainActivity` to support Multiplatform ViewModel resolution via `koinViewModel()`.
- **Code Cleanup:**
- Removed unused device metadata and Firebase utility methods from `Extension.kt`.
- Deleted deprecated `SavedLocationsUseCase` and `SearchPlacesUseCase` from the `app` module.
- Cleaned up unused `kotlinx-datetime` dependency in `:feature:payment`.
- Simplified `AppNavigation` by delegating location UI state to the new finder route.
|
Warning Review limit reached
Next review available in: 57 minutes Enable usage-based reviews in Billing to review now. Otherwise, wait until the next included review is available. How can I continue?After more reviews become available, a review can be triggered using the To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews. How do review limits work?CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability. For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window. Please refer docs for additional details. Review details⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (39)
✨ Finishing Touches🧪 Generate unit tests (beta)
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 |
Test Results4 tests 4 ✅ 6s ⏱️ Results for commit bb54f03. |
What was changed?
This commit extracts the saved locations and place search functionality from the
appandcommon-uimodules into a dedicated Kotlin Multiplatform (KMP) feature module.:feature:finderas a KMP module supporting Android and iOS.SavedLocationsScreenandPlaceSearchDialogfrom:common-uito the new module.appmodule to:feature:finder.README.mdand module diagrams to include the new architecture.MainViewModelto feature-specificSavedLocationsViewModelandPlaceSearchViewModel.Intent,State, andEffectfor the finder feature.SavedLocationsFinderRouteas the public entry point for the feature, utilizinginternalViewModels.finderDomainModuleandfinderViewModelModuleKoin modules.AppContentinKoinContextinMainActivityto support Multiplatform ViewModel resolution viakoinViewModel().Extension.kt.SavedLocationsUseCaseandSearchPlacesUseCasefrom theappmodule.kotlinx-datetimedependency in:feature:payment.AppNavigationby delegating location UI state to the new finder route.