Skip to content

[FEAT/#59] 마이페이지 뷰 컴포넌트 조립 #61

Merged
hyeminililo merged 12 commits intodevelopfrom
feat/#59-mypage-view
Jan 15, 2026
Merged

[FEAT/#59] 마이페이지 뷰 컴포넌트 조립 #61
hyeminililo merged 12 commits intodevelopfrom
feat/#59-mypage-view

Conversation

@hyeminililo
Copy link
Copy Markdown
Contributor

@hyeminililo hyeminililo commented Jan 14, 2026

Related issue 🛠

Work Description ✏️

  • 기존 컴포넌트 헤더 조립
  • MyPageBody Compose 생성
  • MyPageUiState 생성
  • MyPageViewModel 생성 및 적용
  • Preview 추가로 UI 확인 가능하도록 구성
  • 코드 스타일 정리 및 ktLint 실행

Screenshot 📸

image

Uncompleted Tasks 😅

N/A

To Reviewers 📢

마이페이지 관련 작업입니다. UI State와 Model 생성을 했는데, Model을 아직은 활용하지못했습니다 !!
hilt 적용을 최대한 오비님 코드 보고 구현했는데 부족한 점 말씀해주세용 ~~!!

Summary by CodeRabbit

  • New Features

    • 마이페이지가 상태 기반으로 작동해 성공 상태의 사용자 정보(닉네임, 스킨케어 일수)를 화면에 표시합니다.
    • 전체 레이아웃 개선: 헤더, 구분선, 중앙 이미지, 안내 문구("앗! 아직 준비중이에요.") 및 배경/간격이 추가되어 화면 구성이 향상되었습니다.
    • 미리보기가 추가되어 화면을 예시 상태로 확인할 수 있습니다.
  • Refactor

    • 프로필 아이콘 표시 방식이 이미지 기반으로 개선되었습니다.

✏️ Tip: You can customize this high-level summary in your review settings.

- MyPage-Component 내에 있는 Header 조립
- MyPage 내에 MyPage_Body 구현
- MyPagePreview 구현
- ktLint 실행
- MyPage 내에 MyPage_Body Icon을 Box로 감싸는 구조로 변경
- ktLint 실행
- MyPageInfo Model 클래스 구현
- companion object로 Fake data 구현
- companion object로 Fake data 구현
- MypageViewModel 구현
- 관련 UIState 수정
- MypageViewModel loadMyPage 관련 코드 삭제
- UiState 변수 이름 변경
- ViewModel과 Screen 적용
- ktLint 실행
- 코드 정리
@hyeminililo hyeminililo requested a review from a team as a code owner January 14, 2026 19:15
@hyeminililo hyeminililo self-assigned this Jan 14, 2026
@hyeminililo hyeminililo added FEAT✨ 새로운 기능 구현 혜민🍒 혜민 담당 labels Jan 14, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Jan 14, 2026

Walkthrough

MyPageRoute가 Hilt로 MyPageViewModel을 주입하고 uiState를 collectAsStateWithLifecycle로 구독해 UiState.Success일 때 MyPageScreen에 MyPageUiState를 전달하여 렌더링하도록 변경되었고, MyPageUiState·MyPageViewModel·MyPageInfo 및 MyPageScreen의 UI 레이아웃(헤더, 구분선, 이미지, 프리뷰 등)이 추가되었습니다.

Changes

Cohort / File(s) 변경 요약
마이페이지 라우트 및 화면
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt
MyPageRouteviewModel: MyPageViewModel = hiltViewModel() 추가. uiStatecollectAsStateWithLifecycle로 구독해 UiState.Success일 때 MyPageScreen(paddingValues, uiState.data) 호출. MyPageScreen 시그니처에 uiState: MyPageUiState 추가 및 Column 기반 전체 UI(헤더, 구분선, 이미지, 텍스트, Spacer 등)와 Preview 추가.
UI 상태 정의
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageUiState.kt
data class MyPageUiState(val nicknameText: String = "", val skinCareDay: Int = 0) 추가 및 예제 인스턴스 FakeUsers 정의.
뷰모델 구현
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageViewModel.kt
@HiltViewModel 적용된 MyPageViewModel 추가. _uiState: MutableStateFlow<UiState<MyPageUiState>>UiState.Success(MyPageUiState.FakeUsers)로 초기화하고 uiState: StateFlow<UiState<MyPageUiState>>로 노출.
데이터 모델
app/src/main/java/com/cherrish/android/presentation/mypage/model/MyPageInfo.kt
@Immutable 어노테이션의 data class MyPageInfo(nickname: String, skinCareDay: Int) 추가.
헤더 컴포넌트 변경
app/src/main/java/com/cherrish/android/presentation/mypage/component/MyPageHeader.kt
프로필 아이콘 렌더링을 Icon/vectorResource에서 Image/painterResource로 변경(임포트 정리).

Sequence Diagram(s)

sequenceDiagram
    participant Route as MyPageRoute
    participant VM as MyPageViewModel
    participant State as StateFlow<UiState<MyPageUiState>>
    participant Screen as MyPageScreen
    participant UI as 사용자 인터페이스

    Route->>VM: hiltViewModel()로 ViewModel 주입
    VM->>State: _uiState 초기화 (UiState.Success(FakeUsers))
    Route->>State: uiState.collectAsStateWithLifecycle()
    State-->>Route: UiState.Success(MyPageUiState)
    Route->>Screen: MyPageUiState 전달 (paddingValues, uiState.data)
    Screen-->>UI: nicknameText, skinCareDay 등 렌더링
Loading

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • sohee6989
  • usuuhyn
  • nhyeonii
🚥 Pre-merge checks | ✅ 4 | ❌ 1
❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목이 마이페이지 뷰 컴포넌트 조립을 명확하게 설명하며, 주요 변경사항인 MyPage 컴포넌트 구성과 일치합니다.
Description check ✅ Passed PR 설명이 템플릿의 필수 섹션(Related issue, Work Description, Screenshot, Uncompleted Tasks, To Reviewers)을 모두 충족하며 완벽하게 작성되어 있습니다.
Linked Issues check ✅ Passed 마이페이지 헤더 조립, MyPageBody, MyPageUiState, MyPageViewModel 생성 및 적용이 이슈 #59의 요구사항과 완전히 일치합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 마이페이지 뷰 조립에 집중되어 있으며, 이슈 #59 범위 내에서 적절하게 구현되었습니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings

🧹 Recent nitpick comments
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt (2)

77-91: Weight 비율 단순화를 고려해보세요.

현재 110f120f를 사용하고 있는데, 동일한 비율을 유지하면서 11f12f 또는 1.1f1.2f처럼 더 작은 값을 사용하면 가독성이 향상됩니다.

♻️ 선택적 리팩터링
-        Spacer(Modifier.weight(weight = 110f))
+        Spacer(Modifier.weight(weight = 11f))
         
         // ... Image and Text ...
         
-        Spacer(Modifier.weight(weight = 120f))
+        Spacer(Modifier.weight(weight = 12f))

85-89: 문자열 리소스와 Typography 스타일 적용을 권장합니다.

하드코딩된 문자열을 strings.xml로 이동하면 i18n 지원이 용이해집니다. 또한 다른 Text 컴포넌트들과 일관성을 위해 CherrishTheme.typography에서 적절한 스타일을 적용하는 것이 좋습니다.

♻️ 선택적 리팩터링

strings.xml에 추가:

<string name="mypage_preparing">앗! 아직 준비중이에요.</string>

코드 수정:

         Text(
-            text = "앗! 아직 준비중이에요.",
+            text = stringResource(R.string.mypage_preparing),
             color = CherrishTheme.colors.gray600,
-            modifier = Modifier.padding(top = 20.dp)
+            modifier = Modifier.padding(top = 20.dp),
+            style = CherrishTheme.typography.body1M14
         )

📜 Recent review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between f6e5c5f and 693c66c.

📒 Files selected for processing (1)
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt
🧠 Learnings (1)
📚 Learning: 2026-01-12T19:49:27.085Z
Learnt from: nhyeonii
Repo: TEAM-Cherrish/Cherrish-Android PR: 41
File: app/src/main/java/com/cherrish/android/presentation/challenge/ChallengeScreen.kt:30-39
Timestamp: 2026-01-12T19:49:27.085Z
Learning: When a Jetpack Compose screen composable receives a Scaffold paddingValues: PaddingValues parameter (commonly from Scaffold), apply it to the root container's modifier first (e.g., .padding(paddingValues)) before applying any additional padding. This ensures content respects system bars (status/navigation) and avoids layout overlap. This pattern should be followed across presentation screens under app/src/main/java/com/cherrish/android/presentation/ to maintain consistent insets handling.

Applied to files:

  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt (1)
app/src/main/java/com/cherrish/android/presentation/mypage/component/MyPageHeader.kt (1)
  • MyPageHeader (21-55)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: PR Lint Check
  • GitHub Check: PR Build Check
🔇 Additional comments (3)
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt (3)

57-64: Modifier 체인 순서가 올바르게 적용되었습니다.

backgroundpadding(paddingValues) 전에 적용하여 배경색이 시스템 바 영역까지 확장되고, paddingValues를 추가 padding 전에 적용하여 콘텐츠가 시스템 바와 겹치지 않도록 처리되었습니다. Based on learnings, 이 패턴이 올바릅니다.


65-70: MyPageHeader 연결이 적절합니다.

PR 목표에 따라 프로필 아이콘은 placeholder drawable을 사용하고, nicknameTextskinCareDayuiState에서 바인딩하고 있습니다. 나중에 서버 연동 시 profileIcon도 동적으로 변경할 수 있도록 uiState에서 가져오는 방식을 고려해보세요.


100-107: Preview 구현이 적절합니다.

FakeUsers를 사용하여 UI 검증용 mock 데이터를 제공하고 있으며, Preview 설정이 올바르게 구성되었습니다.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.


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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai Bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 2

🤖 Fix all issues with AI agents
In
`@app/src/main/java/com/cherrish/android/presentation/mypage/model/MyPageInfo.kt`:
- Around line 5-9: MyPageInfo is an unused duplicate of MyPageUiState (both
define nicknameText and skinCareDay); remove the MyPageInfo data class to
eliminate dead code, or if you intend to keep it, add a clear TODO comment on
the MyPageInfo declaration explaining its future purpose and ensure any intended
usages are implemented or referenced from MyPageUiState to avoid duplication.

In `@app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt`:
- Around line 33-48: UiState 처리에서 Loading과 Failure에 대한 UI가 빠져있고 else로 Empty를
암묵적으로 처리하고 있으니, when 블록을 수정해 UiState.Loading 케이스에서 로딩 인디케이터(예:
CircularProgressIndicator)를 렌더링하고 UiState.Failure 케이스에서 에러 메시지/재시도 버튼을 렌더링하도록
추가하고, else -> {} 대신 명시적으로 UiState.Empty 케이스를 추가해 빈 상태용 콘텐츠(또는 아무것도 렌더링하지 않는 의도라면
주석으로 명시)를 구현하세요; 해당 변경은 MyPageScreen 호출부와 동일한 when 문(변수명 uiState, 상태 클래스
UiState.Loading/Failure/Empty)을 수정하면 됩니다.
🧹 Nitpick comments (1)
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageUiState.kt (1)

5-16: @immutable 적용과 UiState 구조가 적절합니다.

불변 타입(String, Int)만 포함하고 있어 @Immutable 어노테이션이 올바르게 적용되었습니다. Compose의 안정성(stability) 보장에 도움이 됩니다.

다만, FakeUsers는 단일 사용자 데이터를 나타내므로 FakeUser로 네이밍하는 것이 더 명확합니다.

♻️ 네이밍 개선 제안
     companion object {
-        val FakeUsers =
+        val FakeUser =
             MyPageUiState(
                 nicknameText = "홍길동",
                 skinCareDay = 3
             )
     }
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c50d82b and bf9fa3d.

📒 Files selected for processing (4)
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageUiState.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageViewModel.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/model/MyPageInfo.kt
🧰 Additional context used
📓 Path-based instructions (1)
**/*.kt

⚙️ CodeRabbit configuration file

**/*.kt: - Jetpack Compose 구조, 상태 관리, recomposition 최적화에 집중

  • ViewModel, UiState, 단방향 데이터 흐름 패턴 검토
  • 불필요한 recomposition 가능성, remember/derivedStateOf 적절한 사용 확인
  • 네이밍 컨벤션, 가독성, Google 권장 Android 아키텍처 준수 여부

Files:

  • app/src/main/java/com/cherrish/android/presentation/mypage/model/MyPageInfo.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageViewModel.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageUiState.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt
🧠 Learnings (1)
📚 Learning: 2026-01-12T19:49:27.085Z
Learnt from: nhyeonii
Repo: TEAM-Cherrish/Cherrish-Android PR: 41
File: app/src/main/java/com/cherrish/android/presentation/challenge/ChallengeScreen.kt:30-39
Timestamp: 2026-01-12T19:49:27.085Z
Learning: When a Jetpack Compose screen composable receives a Scaffold paddingValues: PaddingValues parameter (commonly from Scaffold), apply it to the root container's modifier first (e.g., .padding(paddingValues)) before applying any additional padding. This ensures content respects system bars (status/navigation) and avoids layout overlap. This pattern should be followed across presentation screens under app/src/main/java/com/cherrish/android/presentation/ to maintain consistent insets handling.

Applied to files:

  • app/src/main/java/com/cherrish/android/presentation/mypage/model/MyPageInfo.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageViewModel.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageUiState.kt
  • app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt
🧬 Code graph analysis (1)
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt (1)
app/src/main/java/com/cherrish/android/presentation/mypage/component/MyPageHeader.kt (1)
  • MyPageHeader (22-56)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (2)
  • GitHub Check: PR Build Check
  • GitHub Check: PR Lint Check
🔇 Additional comments (3)
app/src/main/java/com/cherrish/android/presentation/mypage/MyPageViewModel.kt (1)

11-18: ViewModel 기본 구조가 적절합니다.

Hilt 주입과 StateFlow 패턴이 올바르게 구현되었습니다. asStateFlow()를 사용하여 읽기 전용으로 노출하는 것도 좋습니다.

현재 UiState.Success로 초기화되어 있고, 실제 데이터 로딩 로직이 없습니다. 추후 Repository/UseCase를 주입받아 데이터를 불러올 때 UiState.LoadingSuccess/Failure 전환 로직이 필요합니다.

app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt (2)

51-88: MyPageScreen 구현이 적절합니다.

  • paddingValues가 루트 컨테이너에 먼저 적용되어 시스템 바(status/navigation bar) 처리가 올바릅니다.
  • MyPageHeaderuiState의 데이터가 정확히 전달되고 있습니다.
  • Boxweight(1f)를 사용하여 유연한 레이아웃을 구성한 점이 좋습니다.

플레이스홀더 아이콘(ic_launcher_foreground)은 PR 목표에 따라 임시로 사용된 것으로 이해됩니다. Based on learnings, paddingValues가 올바르게 적용되었습니다.


90-97: Preview 구성이 적절합니다.

@Preview 어노테이션과 FakeUsers를 활용한 미리보기 설정이 올바르게 구현되었습니다. UI 검증에 유용합니다.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +5 to +9
@Immutable
data class MyPageInfo(
val nicknameText: String,
val skinCareDay: Int
)
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# MyPageInfo 사용 현황 확인
rg -n "MyPageInfo" --type=kt

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 100


🏁 Script executed:

# MyPageUiState 정의 찾기 (구조 비교용)
rg -n "class MyPageUiState|data class MyPageUiState" --type=kt -A 5

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 100


🏁 Script executed:

# MyPageInfo 사용 현황 확인 (파일 타입 제약 제거)
rg -n "MyPageInfo" --include="*.kt"

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 515


🏁 Script executed:

# MyPageUiState 정의 찾기 (구조 비교용)
rg -n "class MyPageUiState|data class MyPageUiState" --include="*.kt" -A 6

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 515


🏁 Script executed:

# MyPageInfo.kt 파일의 전체 내용 확인
cat -n app/src/main/java/com/cherrish/android/presentation/mypage/model/MyPageInfo.kt

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 326


🏁 Script executed:

# MyPageInfo 사용 현황 확인
rg "MyPageInfo" app/src/main/java

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 175


🏁 Script executed:

# MyPageUiState 정의 찾기 (구조 비교)
rg "data class MyPageUiState|class MyPageUiState" app/src/main/java -A 6

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 773


🏁 Script executed:

# MyPageInfo import 확인
rg "import.*MyPageInfo" app/src/main/java

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 56


🏁 Script executed:

# MyPageUiState.kt 전체 내용 확인
cat -n app/src/main/java/com/cherrish/android/presentation/mypage/MyPageUiState.kt

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 556


MyPageInfo는 사용되지 않는 중복 코드입니다.

MyPageInfoMyPageUiState가 동일한 프로퍼티(nicknameText, skinCareDay)를 가지고 있으며, MyPageInfo는 코드베이스 어디에서도 임포트되거나 사용되지 않고 있습니다. 현재 완전히 미사용 상태인 코드이므로, 명확한 사용 계획이 없다면 삭제하거나 TODO 주석으로 의도를 명시할 것을 권장합니다.

🤖 Prompt for AI Agents
In
`@app/src/main/java/com/cherrish/android/presentation/mypage/model/MyPageInfo.kt`
around lines 5 - 9, MyPageInfo is an unused duplicate of MyPageUiState (both
define nicknameText and skinCareDay); remove the MyPageInfo data class to
eliminate dead code, or if you intend to keep it, add a clear TODO comment on
the MyPageInfo declaration explaining its future purpose and ensure any intended
usages are implemented or referenced from MyPageUiState to avoid duplication.

Comment on lines +33 to +48
when (val state = uiState) {
is UiState.Loading -> {
}

is UiState.Failure -> {
}

is UiState.Success -> {
MyPageScreen(
paddingValues = paddingValues,
uiState = state.data
)
}

else -> {}
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

⚠️ Potential issue | 🟡 Minor

🧩 Analysis chain

🏁 Script executed:

# Find UiState definition
rg -n "sealed class UiState|sealed interface UiState|data class UiState|enum class UiState" --type=kt -A 10

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 100


🏁 Script executed:

# Search for UiState definition with broader pattern
rg -n "class UiState|interface UiState" --type=kt -B 2 -A 8 | head -50

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 100


🏁 Script executed:

# Examine the MyPageScreen.kt file
cat -n app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 3746


🏁 Script executed:

# Find UiState definition in the core.common.state package
find . -path "*/core/common/state/*" -name "*.kt" | head -20

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 143


🏁 Script executed:

# Search for UiState definition more broadly
rg -l "UiState" --glob="*.kt" | xargs grep -l "sealed class UiState\|sealed interface UiState\|class UiState\|interface UiState" | head -10

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 141


🏁 Script executed:

# Examine the UiState definition
cat -n ./app/src/main/java/com/cherrish/android/core/common/state/UiState.kt

Repository: TEAM-Cherrish/Cherrish-Android

Length of output: 444


Loading/Failure 상태에 대한 UI 처리가 누락되었으며, Empty 상태도 명시적으로 처리해야 합니다.

현재 UiState.LoadingUiState.Failure 상태에서 아무것도 렌더링하지 않으므로 데이터 로딩 시 사용자 피드백이 부족합니다. 또한 UiState가 sealed interface인 경우, Line 47의 else -> {} 분기는 UiState.Empty 케이스를 암묵적으로 처리하고 있습니다. Empty 상태도 명시적으로 처리하거나, 해당 상태가 발생하지 않아야 한다면 아무것도 렌더링하지 않는 것을 명확히 해야 합니다.

  • Loading/Failure: 로딩 인디케이터, 에러 메시지 등의 UI 피드백 필요
  • Empty: 명시적 케이스 처리 필요 (현재 else로 암묵적 처리 중)
🤖 Prompt for AI Agents
In `@app/src/main/java/com/cherrish/android/presentation/mypage/MyPageScreen.kt`
around lines 33 - 48, UiState 처리에서 Loading과 Failure에 대한 UI가 빠져있고 else로 Empty를
암묵적으로 처리하고 있으니, when 블록을 수정해 UiState.Loading 케이스에서 로딩 인디케이터(예:
CircularProgressIndicator)를 렌더링하고 UiState.Failure 케이스에서 에러 메시지/재시도 버튼을 렌더링하도록
추가하고, else -> {} 대신 명시적으로 UiState.Empty 케이스를 추가해 빈 상태용 콘텐츠(또는 아무것도 렌더링하지 않는 의도라면
주석으로 명시)를 구현하세요; 해당 변경은 MyPageScreen 호출부와 동일한 when 문(변수명 uiState, 상태 클래스
UiState.Loading/Failure/Empty)을 수정하면 됩니다.

Comment on lines +34 to +45
is UiState.Loading -> {
}

is UiState.Failure -> {
}

is UiState.Success -> {
MyPageScreen(
paddingValues = paddingValues,
uiState = state.data
)
}
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

비어있는 분기 처리에 대해 주석 등으로 설명이 있다면 좀더 이해하기 쉽지 않을까요?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 감사합니다 ^^ 그런데 분기처리는 서버와 연결 할 때 연결할 예정입니다아 ~~😊

Copy link
Copy Markdown
Contributor

@sohee6989 sohee6989 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수고하셨습니다!
리뷰 한 번만 확인 부탁드립니다~!!


@Immutable
data class MyPageInfo(
val nicknameText: String,
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3: nickname 같은 경우에는 변수명으로 nicknameText 대신 nickname으로 써도 의미가 잘 전달될 것 같은데 nickname은 어떠신가요??

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

오 그러네요 아마 거의 nickName은 String 값일테니까요 !! 그리고 nickName은 Text 대신 따로 없으니까요 ! 좋습니당

profileIcon = R.drawable.ic_launcher_foreground,
nicknameText = uiState.nicknameText,
skinCareDay = uiState.skinCareDay,
modifier = Modifier.fillMaxWidth()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3: (단순 궁금) 여기 fillMaxWidth 안 줘도 지 않나여?!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아 얘도 아까 #58 이거랑 같은 이유군요 !! 넵 삭제하겠습니당 :)

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p999: fillMaxWidth 사냥꾼 ㄷㄷ

modifier = Modifier.height(height = 10.dp)
)

Box(
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p3: 여기 Box 안 써도 되지 않나여?!

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

추가로 [디바이더 a 아이콘 b 디바이더] a,b에 weight 1f 먹이면 그 공간 사이에 1:1 비율로 가지면서 기기대응도 잘 될겁니다~!!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

box를 주지 않고 weight를 각각 주면 Icon이 center로 오지 않더라고요 ,,! 그래서 Box로 묶어주고 양 위에 weight를 구현했습니다 !

Icon(
imageVector = ImageVector.vectorResource(id = R.drawable.ic_launcher_foreground),
contentDescription = null,
modifier = Modifier.padding(horizontal = 52.dp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p2: 만약 피그마 임시 영역처럼 주고 싶으면
fillMaxWidth 써야되여~!!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 넵네 수정했습니다 !!

Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿 ~~ 고생해써용 ㅎㅎ 리뷰 한번만 확인해주세여 ~~

Text(
text = "MyPage",
modifier = modifier.padding(paddingValues)
Column(modifier = modifier.padding(paddingValues)) {
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 요기 .fillMaxSize() 속성 필요할 것 같아유 !

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

.background(color = Cherrish.colors.gray0) 설정도 필요합니다아 ~~

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 넵넵 추가 하겠습니다 ! 그런데 Column이 최상위에 있어서 .fillMaxSize()를 사용하는 건가요 ??


HorizontalDivider(
color = CherrishTheme.colors.gray100,
modifier = Modifier.height(height = 10.dp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 얘는 Divider 이니까 modifier보다는 thickness = 10.dp 사용해줄까요??!

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 찾아보니 Modifier는 보통 레이아웃을 적고, thickness는 스타일에 사용하는 거군요 !!! 감사합니당 ~


HorizontalDivider(
color = CherrishTheme.colors.gray100,
modifier = Modifier.height(height = 10.dp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 얘도 thickness = 10.dp로 줍시당 ㅎㅎㅎ

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

넵 수정했습니당 !

Comment on lines +10 to +16
companion object {
val FakeUsers =
MyPageUiState(
nicknameText = "홍길동",
skinCareDay = 3
)
}
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿 ~~

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

휴 다행입니당 ~~

- 기존 Box가 아닌 Spacer로 변경
- Divider는 thichness를 10.dp 설정
- 불필요한 Modifier 삭제
- ktLint 실행
Copy link
Copy Markdown
Contributor

@usuuhyn usuuhyn left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

굿굿띠 소히 나현 리뷰 덕에 쓸 게 없네용 ㅎㅎ 화이팅 ~~!!!

profileIcon = R.drawable.ic_launcher_foreground,
nicknameText = uiState.nicknameText,
skinCareDay = uiState.skinCareDay,
modifier = Modifier.fillMaxWidth()
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

p999: fillMaxWidth 사냥꾼 ㄷㄷ

- 앱 내 프로필이미지 추가
- 앱 내 body 추가
- 마이페이지 image 적용
- 마이페이지 Icon() -> Image()로 변경
- 전체적인 패딩 수정
Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

리뷰 확인 부탁드립니동 ~~

Comment on lines +58 to +61
.fillMaxSize()
.padding(paddingValues)
.padding(top = 44.dp)
.background(color = CherrishTheme.colors.gray0),
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P1 : 이거 padding 적용하기 전에 backgroundcolor를 먼저 적용해야 컬러가 제대로 들어갈 수 있어요 ! 모디파이어 순서 확인해보시는것도 좋을 것 같아요

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 넵 감사합니다 !!!!! 바로 수정하겠습니다

profileIcon = R.drawable.img_mypage_profile,
nicknameText = uiState.nicknameText,
skinCareDay = uiState.skinCareDay,
modifier = Modifier.padding(horizontal = 16.dp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

P1 : vertical padding 적용 안되어잇어요 ~~


)

Spacer(Modifier.weight(weight = 1f))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

P1: 이거 줄라면 120f로 줘야할 거 가트요

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 요것도 수정되어있습니다 😭

thickness = 10.dp
)

Spacer(Modifier.weight(weight = 1f))
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

P1: 이거 줄라면 110f로 줘야할 거 가트요

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

아아 요것도 수정되어있습니다 😭

Comment on lines +79 to +82
Image(
painter = painterResource(id = R.drawable.img_mypage_preparing),
contentDescription = null,
modifier = Modifier.padding(horizontal = 26.dp)
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

image

P1 : 이거 텍스트 안들어가 잇어요 ~

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

앗 이거 적용한 버전이 git push가 안되어있었어요 ㅜㅜ 죄송해요 다시 바로 push 할게요 !!

- 마이페이지 텍스트구현
- weghit로 변경
- ktLint 실행
- 불필요한 공백 삭제
- 줄 바꿈 정리
- ktLint 실행
Copy link
Copy Markdown
Contributor

@nhyeonii nhyeonii left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM !! 🚀🚀🚀🚀🚀🚀🚀

@hyeminililo hyeminililo merged commit a047b74 into develop Jan 15, 2026
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

FEAT✨ 새로운 기능 구현 혜민🍒 혜민 담당

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[FEAT] 마이페이지 뷰 조립

5 participants