[Feat] 마이페이지 홈 ViewModel 및 UI 상태 구현 - #51
Conversation
* feat: add MyPageHomeViewModel using Orbit MVI * feat: define MyPageHomeUiState, MyPageHomeUiModel, and MyPageHomeSideEffect
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the ⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Plus Run ID: You can disable this status message by setting the Use the checkbox below for a quick retry:
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 |
* chore: feature:mypage 모듈 내 코드 포맷팅 및 임포트 정리 * chore: MyPageHomeViewModel 및 UI State 클래스 스타일 수정
| private suspend fun MyPageHomeSyntax.reduceIfSuccess( | ||
| reducer: MyPageHomeUiState.Success.() -> MyPageHomeUiState, | ||
| ) { | ||
| reduce { | ||
| (state as? MyPageHomeUiState.Success)?.reducer() ?: state | ||
| } | ||
| } |
| plugins { | ||
| id("todakun.feature") | ||
| } |
There was a problem hiding this comment.
저희 feature는 alias 말고 id로 가나요?
관련 이슈
작업 내용
마이페이지 홈 화면의 ViewModel과 UI 상태를 Orbit MVI로 구현했습니다.
변경사항 / 상세
feature:mypage모듈 신설,todakun.feature컨벤션 플러그인 적용MyPageHomeUiState:Loading/Success/Failsealed 상태MyPageHomeUiModel:User+SajuPalja를 화면에 필요한 형태로 묶은 UI 모델MyPageHomeSideEffect: 현재 케이스 없는 side effect 마커 (필요 시 확장)MyPageHomeViewModel:GetMyPageInfoUseCase를 호출해container의repeatOnSubscription에서 로드하고, 성공/실패를reduce로 반영reduceIfSuccess: 상태가Success일 때만 안전하게 부분 업데이트하기 위한 헬퍼 (아직 호출부 없음)중점 리뷰사항
repeatOnSubscription에서 매 구독마다loadMyPageInfo()가 다시 호출되는데, 이미Success인 상태에서도 재요청되는 게 의도된 동작인지 (예: 화면 재진입 시 새로고침 vs 캐시 유지)reduceIfSuccess가 아직 미사용이라 추후 실제 intent(새로고침 등)에서 사용 예정스크린샷 (선택)
N/A (ViewModel/상태 레이어 전용 변경, UI는 별도 작업)