-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/#149 1์ฐจ QA #154
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Fix/#149 1์ฐจ QA #154
Changes from all commits
ce593b1
1406d9d
540c737
e2ce49c
a59ff84
967c20a
2183fc2
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -48,17 +48,20 @@ enum CherryLevel: Int { | |
| } | ||
|
|
||
| struct ChallengeProgressView: View { | ||
| @EnvironmentObject private var challengeCoordinator: ChallengeCoordinator | ||
| @StateObject var viewModel: ChallengeProgressViewModel | ||
|
|
||
|
Comment on lines
+51
to
53
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐งน Nitpick | ๐ต Trivial EnvironmentObject ์ฃผ์
๋ณด์ฅ ๋ฐ ์๋ก ์ถ๊ฐ๋ โป๏ธ `@StateObject` ์ ๊ทผ์ฑ ์ ๋ฆฌ ์ ์- `@StateObject` var viewModel: ChallengeProgressViewModel
+ `@StateObject` private var viewModel: ChallengeProgressViewModel
+
+ init(viewModel: ChallengeProgressViewModel) {
+ _viewModel = StateObject(wrappedValue: viewModel)
+ }#!/bin/bash
# ChallengeProgressView ์์ฑ ์์น์ EnvironmentObject ์ฃผ์
์ฌ๋ถ ํ์ธ
rg -n --type=swift -C3 '\bChallengeProgressView\b'
rg -n --type=swift -C3 '\.environmentObject\([^)]*ChallengeCoordinator'๐งฐ Tools๐ช SwiftLint (0.57.0)[Warning] 52-52: SwiftUI state properties should be private (private_swiftui_state) ๐ค Prompt for AI Agents |
||
| let buttonState: ButtonState = .active | ||
|
|
||
| var body: some View { | ||
| ScrollView { | ||
| VStack { | ||
| HStack { | ||
| TypographyText(viewModel.challengeTitle, style: .title1_sb_18, color: .gray1000) | ||
| .frame(height: 27.adjustedH) | ||
| .padding(.trailing, 12.adjustedW) | ||
| TypographyText("7์ผ ํ๋", style: .body3_m_12, color: .gray700) | ||
| .frame(height: 17.adjustedH) | ||
| .padding(.horizontal, 8.adjustedW) | ||
| .padding(.vertical, 3.adjustedH) | ||
| .overlay( | ||
|
|
@@ -82,25 +85,38 @@ struct ChallengeProgressView: View { | |
|
|
||
| extension ChallengeProgressView { | ||
| private var CherryGrowthView: some View { | ||
| VStack { | ||
| VStack { | ||
| VStack(spacing: 0) { | ||
| VStack(spacing: 0) { | ||
| HStack { | ||
| TypographyText("Lv.\(viewModel.cherryLevel.levelNumber) \(viewModel.cherryLevel.name)", style: .body1_m_14, color: .gray900) | ||
| TypographyText("Lv.\(viewModel.cherryLevel.levelNumber)", style: .body1_m_14, color: .gray900) | ||
| .frame(height: 20.adjustedH) | ||
| TypographyText("\(viewModel.cherryLevel.name)", style: .body1_m_14, color: .gray900) | ||
| .frame(height: 20.adjustedH) | ||
| .padding(.leading, 6.adjustedW) | ||
| Spacer() | ||
| } | ||
| viewModel.cherryLevel.cherryImage | ||
| .padding(.top, 14.adjustedH) | ||
| TypographyText("์ฒด๋ฆฌ๊ฐ ํฌ๋ ค๋ฉด \(viewModel.remainMissions)๊ฐ์ ๋ฏธ์ ์ ์ํํด์ผ ํด์!", style: .body2_r_13, color: .gray800) | ||
| .padding(.top, 14.adjustedH) | ||
| .frame(width: 154.adjustedW, height: 154.adjustedW) | ||
| .padding(.bottom, 5.adjustedH) | ||
| if viewModel.cherryLevel.levelNumber == 4 { | ||
| TypographyText("์ฑ๋ฆฐ์ง ์๋ฃ๊น์ง \(viewModel.remainMissions)๊ฐ์ ๋ฏธ์ ์ ์ํํด์ผ ํด์!", style: .body2_r_13, color: .gray800) | ||
| .frame(height: 18.adjustedH) | ||
| .padding(.bottom, 14.adjustedH) | ||
| }else { | ||
| TypographyText("์ฒด๋ฆฌ๊ฐ ํฌ๋ ค๋ฉด \(viewModel.remainMissions)๊ฐ์ ๋ฏธ์ ์ ์ํํด์ผ ํด์!", style: .body2_r_13, color: .gray800) | ||
| .frame(height: 18.adjustedH) | ||
| .padding(.bottom, 14.adjustedH) | ||
| } | ||
| } | ||
| .padding(.horizontal, 25.adjustedW) | ||
| Rectangle() | ||
| .fill(.gray300) | ||
| .frame(height: 1) | ||
| .padding(.vertical, 14.adjustedH) | ||
| .padding(.bottom, 14.adjustedH) | ||
| VStack { | ||
| HStack { | ||
| TypographyText("์ฑ๋ฆฐ์ง ๋ฌ์ฑ๋ฅ \(viewModel.progressRate)%", style: .body1_m_14, color: .gray900) | ||
| .frame(height: 20.adjustedH) | ||
| Spacer() | ||
| } | ||
| .padding(.bottom, 12.adjustedH) | ||
|
|
@@ -129,6 +145,7 @@ extension ChallengeProgressView { | |
| VStack { | ||
| HStack { | ||
| TypographyText("\(viewModel.currentDay)์ผ์ฐจ TO-DO ๋ฏธ์ ", style: .body1_sb_14, color: .gray1000) | ||
| .frame(height: 20.adjustedH) | ||
| Spacer() | ||
| } | ||
| Spacer() | ||
|
|
@@ -149,14 +166,21 @@ extension ChallengeProgressView { | |
| } | ||
|
|
||
| CherrishButton( | ||
| title: "์ค๋ ๋ฏธ์ ์ข ๋ฃํ๊ธฐ", | ||
| title: viewModel.isChallengeCompleted ? "์ฑ๋ฆฐ์ง ์ข ๋ฃํ๊ธฐ":"์ค๋ ๋ฏธ์ ์ข ๋ฃํ๊ธฐ", | ||
| type: .small, | ||
| state: .constant(buttonState), | ||
| leadingIcon: nil, | ||
| trailingIcon: nil | ||
| ) { | ||
| Task { | ||
| await viewModel.advanceDay() | ||
| if viewModel.isChallengeCompleted { | ||
| Task { | ||
| await viewModel.advanceDay() | ||
| challengeCoordinator.push(.startChallenge) | ||
| } | ||
| }else { | ||
| Task { | ||
| await viewModel.advanceDay() | ||
| } | ||
|
Comment on lines
168
to
+183
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ์๋ฃ ๋ถ๊ธฐ์์ advanceDay ์คํจ ์์๋ ๋ค๋น๊ฒ์ด์
๋ฉ๋๋ค. โ ์์ ์ ์- if viewModel.isChallengeCompleted {
- Task {
- await viewModel.advanceDay()
- challengeCoordinator.push(.startChallenge)
- }
- }else {
- Task {
- await viewModel.advanceDay()
- }
- }
+ if viewModel.isChallengeCompleted {
+ Task {
+ await viewModel.advanceDay()
+ guard viewModel.errorMessage == nil else { return }
+ challengeCoordinator.push(.startChallenge)
+ }
+ } else {
+ Task {
+ await viewModel.advanceDay()
+ }
+ }๐ค Prompt for AI Agents |
||
| } | ||
| } | ||
| .padding(.top, 10.adjustedH) | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,11 +18,17 @@ struct ChallengeSelectRoutineView: View { | |
| var body: some View { | ||
| VStack { | ||
| HStack{ | ||
| VStack(alignment: .leading){ | ||
| TypographyText("์ง๊ธ ๋์๊ฒ ๊ฐ์ฅ ํ์ํ\n๊ด๋ฆฌ ๋ฃจํด์ ์ ํํด์ฃผ์ธ์.", | ||
| VStack(alignment: .leading, spacing: 0){ | ||
| TypographyText("์ง๊ธ ๋์๊ฒ ๊ฐ์ฅ ํ์ํ", | ||
| style: .title1_sb_18, | ||
| color: .gray1000 | ||
| ) | ||
| .frame(height: 27.adjustedH) | ||
| TypographyText("๊ด๋ฆฌ ๋ฃจํด์ ์ ํํด์ฃผ์ธ์.", | ||
| style: .title1_sb_18, | ||
| color: .gray1000 | ||
| ) | ||
| .frame(height: 27.adjustedH) | ||
|
Comment on lines
+21
to
+31
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐งฉ Analysis chain๐ Script executed: # ํ์ผ ๊ตฌ์กฐ ํ์
find . -type f -name "*.swift" | grep -i typography | head -20Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 196 ๐ Script executed: # ChallengeSelectRoutineView.swift ์ ์ฒด ๋ด์ฉ ํ์ธ
find . -path "*ChallengeSelectRoutineView.swift" -type fRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 196 ๐ Script executed: # TypographyText ์ ์ ์ฐพ๊ธฐ
rg "struct TypographyText|class TypographyText" -A 10Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 1081 ๐ Script executed: # adjustedH ์ ์ ์ฐพ๊ธฐ
rg "adjustedH" -B 2 -A 2Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 50383 ๐ Script executed: # adjustedH ํ์ฅ ํจ์ ์ ์ ์ฐพ๊ธฐ
rg "adjustedH" -B 5 -A 2 | grep -A 7 "func adjustedH\|extension.*adjustedH\|var adjustedH"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 2224 ๐ Script executed: # TypographyText ์ ์ฒด ๊ตฌํ ํ์ธ
cat -n Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Font+.swift | head -100Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 3963 ๐ Script executed: # ๋ค์ด๋๋ฏน ํ์
์ง์ ์ฌ๋ถ ํ์ธ
rg "dynamicTypeSize|preferredContentSizeCategory|@Environment.*dynamicTypeSize" -A 3Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 52 ๊ณ ์ ๋์ด๋ก ๋ค์ค ์ธ์ด ํ๋ ๋ฐ ๋ค์ด๋๋ฏน ํ์ ์์ ํ ์คํธ ์๋ฆผ ์ํ
๐ค Prompt for AI Agents |
||
| } | ||
| Spacer() | ||
| } | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -18,7 +18,9 @@ struct ChallengeStartChallengeView: View { | |
| HStack { | ||
| VStack(alignment: .leading, spacing: 4) { | ||
| TypographyText("์ด๋ฒ์ ์ด๋ค ๋ฃจํด์ผ๋ก ๊ด๋ฆฌํ ๊น์?", style: .headline_sb_20, color: .gray1000) | ||
| .frame(height: 30.adjustedH) | ||
| TypographyText("๋ฃจํด์ ์งํฌ์๋ก ์ฒด๋ฆฌ๊ฐ ์ฑ์ฅํด์.", style: .title2_m_16, color: .gray800) | ||
| .frame(height: 24.adjustedH) | ||
|
Comment on lines
20
to
+23
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ๐งฉ Analysis chain๐ Script executed: fd "StartChallengeView.swift" --type fRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 160 ๐ Script executed: find . -name "StartChallengeView.swift" -type fRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 162 ๐ Script executed: git ls-files | grep -i "startchallenge"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 121 ๐ Script executed: wc -l "Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/StartChallengeView.swift"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 163 ๐ Script executed: cat -n "Cherrish-iOS/Cherrish-iOS/Presentation/Feature/ChallengeView/View/StartChallengeView.swift"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 2345 ๐ Script executed: rg "\.adjustedH" --type swift | head -20Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 2610 ๐ Script executed: rg "extension.*Int\|extension.*CGFloat" --type swift -A 3 | grep -A 5 "adjustedH"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 52 ๐ Script executed: fd "TypographyText" --type swiftRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 242 ๐ Script executed: rg "adjustedH" --type swift -B 2 -A 2 | grep -E "extension|computed|var" | head -20Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 2215 ๐ Script executed: find . -name "*TypographyText*" -o -name "*typography*" | grep -i swiftRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 52 ๐ Script executed: rg "struct TypographyText|class TypographyText" --type swiftRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 167 ๐ Script executed: cat -n "Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Adjust+.swift"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 1218 ๐ Script executed: cat -n "Cherrish-iOS/Cherrish-iOS/Presentation/Global/Extension/Font+.swift"Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 3963 ๊ณ ์ ๋์ด๊ฐ ํ ์คํธ ๋ํ๊ณผ ๋ก์ปฌ๋ผ์ด์ ์ด์ ์ ํ ์คํธ ์๋ฆผ ์ํ ๊ฐ๋ฅ ํ
์คํธ์ ๊ณ ์ height๋ฅผ ์ง์ ํ๋ฉด ๋ค์ค ๋ผ์ธ ํ
์คํธ๋ ๊ธด ์ธ์ด ๋ฌธ์์ด(ํ๊ตญ์ด ๋ฑ)์์ ๋์ด ์ด๊ณผ ์ ์๋ฆด ์ ์์ต๋๋ค. ํนํ 30.adjustedH(line 21)์ 24.adjustedH(line 23, 38)๋ ๋จ์ผ ๋ผ์ธ ๊ธฐ์ค์ผ๋ก ์ค์ ๋์์ผ๋, ํ
์คํธ๊ฐ ๋ํ๋ ๊ฒฝ์ฐ ์ฝํ
์ธ ๋ฅผ ๋ด๊ธฐ ๋ถ์กฑํ ์ ์์ต๋๋ค. ํ์์ ๐ค Prompt for AI Agents |
||
| } | ||
| Spacer() | ||
| } | ||
|
|
@@ -30,11 +32,12 @@ struct ChallengeStartChallengeView: View { | |
| .padding(.top, 10.adjustedH) | ||
| .padding(.horizontal, 24.adjustedW) | ||
|
|
||
| HStack(spacing: 12) { | ||
| HStack(spacing: 0) { | ||
| Image("info") | ||
| TypographyText("์ด ์ฑ๋ฆฐ์ง๋ ์ค์ ์์ ๋ถํฐ 7์ผ๊ฐ ์งํ๋ฉ๋๋ค.", style: .body3_m_12, color: .gray600) | ||
| .frame(height: 24.adjustedH) | ||
| } | ||
| .padding(.bottom, 12.adjustedH) | ||
| .padding(.top, 20.adjustedH) | ||
|
|
||
| CherrishButton( | ||
| title: "์ฑ๋ฆฐ์ง ์์ํ๊ธฐ", | ||
|
|
||
This file was deleted.
This file was deleted.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐งน Nitpick | ๐ต Trivial
์๋ฃ ๊ธฐ์ค(7์ผ) ํ๋์ฝ๋ฉ ํ์ธ ํ์.
์ฑ๋ฆฐ์ง ๊ธฐ๊ฐ์ด ๊ณ ์ 7์ผ์ด ์๋๋ผ๋ฉด ๋ฐ์ดํฐ/์์๋ก ๋ถ๋ฆฌํด ๊ธฐ์ค์ ๋ง์ถ๋ ํธ์ด ์์ ํฉ๋๋ค.
๐ค Prompt for AI Agents