Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions Cherrish-iOS/Cherrish-iOS.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,8 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down Expand Up @@ -320,7 +321,8 @@
INFOPLIST_KEY_UILaunchScreen_Generation = YES;
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPad = "UIInterfaceOrientationPortrait UIInterfaceOrientationPortraitUpsideDown UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
INFOPLIST_KEY_UISupportedInterfaceOrientations_iPhone = "UIInterfaceOrientationPortrait UIInterfaceOrientationLandscapeLeft UIInterfaceOrientationLandscapeRight";
IPHONEOS_DEPLOYMENT_TARGET = 16.6;
INFOPLIST_KEY_UIUserInterfaceStyle = Light;
IPHONEOS_DEPLOYMENT_TARGET = 17.6;
LD_RUNPATH_SEARCH_PATHS = (
"$(inherited)",
"@executable_path/Frameworks",
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"info" : {
"author" : "xcode",
"version" : 1
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
{
"images" : [
{
"filename" : "illustration_my.png",
"idiom" : "universal",
"scale" : "1x"
},
{
"filename" : "illustration_my@2x.png",
"idiom" : "universal",
"scale" : "2x"
},
{
"filename" : "illustration_my@3x.png",
"idiom" : "universal",
"scale" : "3x"
}
],
"info" : {
"author" : "xcode",
"version" : 1
}
}
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"images" : [
{
"filename" : "체리.svg",
"filename" : "illustration_profile.svg",
"idiom" : "universal"
}
],
Expand Down
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion Cherrish-iOS/Cherrish-iOS/Info.plist
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,6 @@
<string>Pretendard-SemiBold.otf</string>
</array>
<key>UIDesignRequiresCompatibility</key>
<true/>
<false/>
</dict>
</plist>
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,63 @@ import SwiftUI

struct MyPageView: View {
var body: some View {
ZStack {
Color.red500
Text("MyPageView")
VStack {
Spacer()
.frame(height: 52.adjustedH)
headerView
grayEmptyBar
prepareView
.padding(.horizontal, 35)
grayEmptyBar
}
}
}

extension MyPageView {
private var headerView: some View {
HStack (spacing: 14.adjustedW) {
Image(.illustrationProfile)
.resizable()
.frame(width: 48.adjustedW, height: 48.adjustedH)

VStack(alignment: .leading, spacing: 0){
TypographyText("안녕하세요, 김채채 님", style: .title1_sb_18, color: .gray1000)
.frame(height: 27.adjustedH)

TypographyText("관리 시작 D + 13", style: .body1_m_14, color: .gray800)
.frame(height: 20.adjustedH)
Comment on lines +25 to +36
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

사용자 정보 하드코딩 제거 필요

실사용 화면에서 사용자명이 고정으로 표시되고 D+ 값도 고정됩니다. 뷰 모델/입력 파라미터로 전달받도록 변경해 주세요. 프리뷰도 함께 갱신이 필요합니다.

🛠️ 개선 예시
-struct MyPageView: View {
+struct MyPageView: View {
+    let userDisplayName: String
+    let daysSinceStart: Int
     var body: some View {
         VStack {
             Spacer()
                 .frame(height: 52.adjustedH)
             headerView
             grayEmptyBar
             prepareView
                 .padding(.horizontal, 35)
             grayEmptyBar
         }
     }
 }
 
 extension MyPageView {
     private var headerView: some View {
         HStack (spacing: 14.adjustedW) {
             Image(.illustrationProfile)
                 .resizable()
                 .frame(width: 48.adjustedW, height: 48.adjustedH)
             
             VStack(alignment: .leading, spacing: 0){
-                TypographyText("안녕하세요, 김채채 님", style: .title1_sb_18, color: .gray1000)
+                TypographyText("안녕하세요, \(userDisplayName) 님", style: .title1_sb_18, color: .gray1000)
                     .frame(height: 27.adjustedH)
                 
-                TypographyText("관리 시작 D + 13", style: .body1_m_14, color: .gray800)
+                TypographyText("관리 시작 D + \(daysSinceStart)", style: .body1_m_14, color: .gray800)
                     .frame(height: 20.adjustedH)
             }
             
             Spacer()
         }
         .frame(maxWidth: .infinity)
         .padding(.leading, 24.adjustedW)
     }
 }
 
 `#Preview`  {
-    MyPageView()
+    MyPageView(userDisplayName: "김채채", daysSinceStart: 13)
 }

Also applies to: 69-71

🤖 Prompt for AI Agents
In `@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/MyPage/MyPageView.swift`
around lines 25 - 36, The header currently hardcodes the user name and D+ value
inside the headerView (TypographyText calls); refactor headerView to read those
values from the view's data source (e.g., inject a MyPageViewModel or accept
parameters like userName: String and daysSinceStart: Int) and replace the
hardcoded strings ("안녕하세요, 김채채 님" and "관리 시작 D + 13") with computed values
(e.g., "안녕하세요, \(userName) 님" and "관리 시작 D + \(daysSinceStart)"). Update any
other hardcoded usages around the same area (noted also at the block around
lines 69–71) and refresh the SwiftUI preview to supply sample userName and
daysSinceStart so the preview renders correctly. Ensure bindings/observed object
property names (e.g., MyPageViewModel, userName, daysSinceStart) are referenced
consistently where used.

}

Spacer()
}
.frame(maxWidth: .infinity)
.padding(.leading, 24.adjustedW)

}

private var prepareView: some View {
VStack(alignment: .center) {
Spacer()
.frame(height: 100.adjustedH)

Image(.illustrationMy)
.resizable()
.frame(width: 308.adjustedW, height: 250.adjustedH)

TypographyText("앗! 아직 준비 중이에요.", style: .body1_m_14, color: .gray500)
Comment on lines +46 to +55
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

장식 이미지 접근성 처리 + 문구 로컬라이징 권장

장식용 일러스트는 VoiceOver 노이즈를 줄이기 위해 숨기는 편이 좋고, 안내 문구는 로컬라이징 대상으로 분리하는 것이 안전합니다.

🔧 예시
-            Image(.illustrationMy)
+            Image(.illustrationMy)
                 .resizable()
                 .frame(width: 308.adjustedW, height: 250.adjustedH)
+                .accessibilityHidden(true)
             
-            TypographyText("앗! 아직 준비 중이에요.", style: .body1_m_14, color: .gray500)
+            TypographyText("앗! 아직 준비 중이에요.", style: .body1_m_14, color: .gray500) // 로컬라이징 분리 권장
🤖 Prompt for AI Agents
In `@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/MyPage/MyPageView.swift`
around lines 46 - 55, The decorative illustration Image(.illustrationMy) should
be hidden from VoiceOver and the hard-coded Korean message in TypographyText
should be localized; update prepareView by adding .accessibilityHidden(true) (or
.accessibilityHidden(true) modifier) to Image(.illustrationMy) so it’s ignored
by assistive tech, and replace the literal "앗! 아직 준비 중이에요." with a localized
string lookup (e.g., use LocalizedStringKey or NSLocalizedString with a key like
"mypage_preparing_message") in TypographyText and add the corresponding entry to
Localizable.strings.


Spacer()
.frame(height: 110.adjustedH)
}
}

private var grayEmptyBar: some View {
Rectangle()
.fill(.gray100)
.frame(height: 10.adjustedH)
}
}

#Preview {
MyPageView()
}
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ private struct TreatmentCheckBoxView: View {
isSelected: Binding<Bool>,
isCompleted: Binding<Bool>,
isCompletedView: Bool = false,
action: @escaping () -> Void,
action: @escaping () -> Void
) {
self.treatmentEntity = treatmentEntity
self._isSelected = isSelected
Expand Down