[Feat/#164] 등록 뷰 배송가격 수정 가능하게 변경 - #165
Conversation
domain 모델 그대로 사용 시 선택된 아이템 리스트 별도로 관리하기 번거로워, 선택 여부를 갖는 UiModel 구현
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: 📒 Files selected for processing (2)
💤 Files with no reviewable changes (1)
🚧 Files skipped from review as they are similar to previous changes (1)
📝 WalkthroughWalkthrough배송 옵션 상태를 Changes배송 옵션 등록 흐름
Estimated code review effort: 3 (Moderate) | ~20 minutes Sequence Diagram(s)sequenceDiagram
participant CreateDeliverySetting
participant PartyCreateScreen
participant PartyCreateViewModel
participant createPartyUseCase
CreateDeliverySetting->>PartyCreateScreen: 배송 가격 입력
PartyCreateScreen->>PartyCreateViewModel: OnDeliveryPriceChange
PartyCreateViewModel->>PartyCreateViewModel: deliveryOptions 가격 및 오류 상태 갱신
PartyCreateScreen->>PartyCreateViewModel: 등록 요청
PartyCreateViewModel->>createPartyUseCase: 선택 배송 옵션 변환 및 전달
Possibly related PRs
Suggested reviewers: 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 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 |
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Inline comments:
In
`@app/src/main/java/com/poti/android/presentation/party/create/model/DeliveryOptionUiModel.kt`:
- Around line 3-8: 배송비 입력 오류가 0원으로 변환되지 않도록 편집값과 검증된 가격을 분리하세요.
app/src/main/java/com/poti/android/presentation/party/create/model/DeliveryOptionUiModel.kt#L3-L8에서는
원본 가격 문자열과 유효한 도메인 가격을 표현하도록 모델을 조정하고,
app/src/main/java/com/poti/android/presentation/party/create/component/CreateDeliverySetting.kt#L48-L50에서는
toIntOrNull() ?: 0 대신 원본 입력을 전달하세요.
app/src/main/java/com/poti/android/presentation/party/create/PartyCreateViewModel.kt#L429-L438에서는
필수값과 Int 범위를 검증한 뒤 유효한 값만 등록 요청에 포함하고 잘못된 값은 등록 상태에 반영하지 않도록 수정하세요.
🪄 Autofix (Beta)
Fix all unresolved CodeRabbit comments on this PR:
- Push a commit to this branch (recommended)
- Create a new PR with the fixes
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro Plus
Run ID: ff27cdf4-87cc-4c5c-9ad2-5d620690a4f0
📒 Files selected for processing (5)
app/src/main/java/com/poti/android/presentation/party/create/PartyCreateScreen.ktapp/src/main/java/com/poti/android/presentation/party/create/PartyCreateViewModel.ktapp/src/main/java/com/poti/android/presentation/party/create/component/CreateDeliverySetting.ktapp/src/main/java/com/poti/android/presentation/party/create/model/Contracts.ktapp/src/main/java/com/poti/android/presentation/party/create/model/DeliveryOptionUiModel.kt
| @@ -64,8 +65,9 @@ data class CreateUiState( | |||
| val isMemberBottomSheetTouched: Boolean = false, | |||
| val memberError: FieldError? = null, | |||
| val deliveriesState: ApiState<List<DeliveryOption>> = ApiState.Init, | |||
There was a problem hiding this comment.
p3: 사용을 확인해보니까, API 상태만 표현하고 별도로 활용하지 않는 변수같아요
Related issue 🛠️
Work Description ✏️
DeliveryOption도메인 모델로만 관리했는데 서버 기본값 리스트, 현재 수정 중인 배송옵션 리스트, 선택된 옵션 리스트 3개를 별도로 관리해야 합니다. 그래서isSelected필드를 갖는DeliveryOptionUiModel로 리팩토링했습니다.선택된 멤버 가격 미입력케이스와 동일하게 에러처리 했습니다. (자동 스크롤+에러 문구)Screenshot 📸
default.mp4
default.mp4
Uncompleted Tasks 😅
To Reviewers 📢
포티 화이팅!!
Summary by CodeRabbit
요약 (CodeRabbit)
새로운 기능
개선