-
Notifications
You must be signed in to change notification settings - Fork 0
Fix/#151 QA 반영 #155
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/#151 QA 반영 #155
Changes from all commits
bf33046
954c2c2
9179889
44f5121
39290d5
0bfdf42
62d5b10
79bfc0f
42f8feb
aa822f2
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 | ||||||||||||||||||||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
|
@@ -14,24 +14,31 @@ struct NoTreatmentFilterView: View { | |||||||||||||||||||||||||||||||
| VStack(spacing: 0) { | ||||||||||||||||||||||||||||||||
| TitleHeaderView(title: viewModel.selectedCategory?.title ?? "") | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||
| .frame(height: 10.adjustedH) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ScrollView(.vertical, showsIndicators: false){ | ||||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||
| .frame(height: 10.adjustedH) | ||||||||||||||||||||||||||||||||
| .frame(height: 18.adjustedH) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| ForEach(viewModel.treatments, id: \.id) { treatment in | ||||||||||||||||||||||||||||||||
| TreatmentRowView( | ||||||||||||||||||||||||||||||||
| displayMode: .checkBoxView, | ||||||||||||||||||||||||||||||||
| treatmentEntity: treatment, | ||||||||||||||||||||||||||||||||
| isSelected: .constant(viewModel.isSelected(treatment)), | ||||||||||||||||||||||||||||||||
| action: { viewModel.addTreatment(treatment) } | ||||||||||||||||||||||||||||||||
| action: { | ||||||||||||||||||||||||||||||||
| if viewModel.isSelected(treatment) { | ||||||||||||||||||||||||||||||||
| viewModel.removeTreatment(treatment) | ||||||||||||||||||||||||||||||||
| } else { | ||||||||||||||||||||||||||||||||
| viewModel.addTreatment(treatment) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
Comment on lines
+26
to
+33
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 토글 로직 구현이 적절합니다. ViewModel의 다만, 31번 줄에 불필요한 빈 줄이 있어 정리하면 좋겠습니다. ♻️ 제안된 수정 action: {
if viewModel.isSelected(treatment) {
viewModel.removeTreatment(treatment)
} else {
viewModel.addTreatment(treatment)
-
}
}📝 Committable suggestion
Suggested change
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||
| ) | ||||||||||||||||||||||||||||||||
| .padding(.horizontal, 34.adjustedW) | ||||||||||||||||||||||||||||||||
| .padding(.horizontal, 25.adjustedW) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||
| .frame(height: 198.adjustedH) | ||||||||||||||||||||||||||||||||
|
Comment on lines
+38
to
+39
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 매직 넘버에 대한 설명 추가 권장
🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| .task { | ||||||||||||||||||||||||||||||||
| await viewModel.fetchNoTreatments() | ||||||||||||||||||||||||||||||||
|
|
@@ -44,16 +51,16 @@ private struct TitleHeaderView: View { | |||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| var body: some View { | ||||||||||||||||||||||||||||||||
| VStack(spacing: 4.adjustedH) { | ||||||||||||||||||||||||||||||||
| VStack(alignment: .leading) { | ||||||||||||||||||||||||||||||||
| VStack(alignment: .leading, spacing: 0) { | ||||||||||||||||||||||||||||||||
| HStack(spacing: 6.adjustedW) { | ||||||||||||||||||||||||||||||||
| TypographyText(title, style: .title1_sb_18, color: .gray1000) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .frame(height: 27.adjustedH) | ||||||||||||||||||||||||||||||||
| TypographyText("관련 시술 리스트", style: .title1_sb_18, color: .gray1000) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .frame(height: 27.adjustedH) | ||||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| .frame(height: 27.adjustedH) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| HStack(spacing: 4.adjustedW) { | ||||||||||||||||||||||||||||||||
| VStack { | ||||||||||||||||||||||||||||||||
|
|
@@ -62,20 +69,17 @@ private struct TitleHeaderView: View { | |||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| VStack(alignment: .leading) { | ||||||||||||||||||||||||||||||||
| VStack(alignment: .leading, spacing: 0) { | ||||||||||||||||||||||||||||||||
| TypographyText("본 정보는 인터넷 빅테이터 검색 및 분석을 통해 수집된 정보이며, ", style: .body3_r_12, color: .gray600) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| TypographyText("관련 시술 리스트", style: .body3_r_12, color: .gray600) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| .frame(height: 17.adjustedH) | ||||||||||||||||||||||||||||||||
| TypographyText("공식적인 의료 정보가 아닙니다.", style: .body3_r_12, color: .gray600) | ||||||||||||||||||||||||||||||||
| .frame(height: 17.adjustedH) | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| .frame(height: 34.adjustedH) | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| .padding(.horizontal, 25.adjustedW) | ||||||||||||||||||||||||||||||||
| .padding(.vertical, 20.adjustedH) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| .background(Color.gray100) | ||||||||||||||||||||||||||||||||
| .overlay(alignment: .top) { | ||||||||||||||||||||||||||||||||
|
|
@@ -88,7 +92,7 @@ private struct TitleHeaderView: View { | |||||||||||||||||||||||||||||||
| .frame(height: 1.adjustedH) | ||||||||||||||||||||||||||||||||
| .gray500() | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| .frame(height: 105) | ||||||||||||||||||||||||||||||||
| .frame(height: 105.adjustedH ) | ||||||||||||||||||||||||||||||||
|
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 불필요한 공백 제거
♻️ 제안된 수정- .frame(height: 105.adjustedH )
+ .frame(height: 105.adjustedH)🤖 Prompt for AI Agents |
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -79,6 +79,15 @@ struct NoTreatmentView: View { | |
|
|
||
| case .treatmentFilter: | ||
| NoTreatmentFilterView(viewModel: viewModel) | ||
| .overlay(alignment: .bottom) { | ||
| if viewModel.state == .treatmentFilter, !viewModel.selectedTreatments.isEmpty { | ||
| SelectedTreatmentSheetView( | ||
| selectedTreatments: viewModel.selectedTreatments, | ||
| removeTreatment: viewModel.removeTreatment(_:) | ||
| ) | ||
|
|
||
| } | ||
| } | ||
|
Comment on lines
+82
to
+90
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 중복 상태 체크 제거 권장
♻️ 제안된 수정 NoTreatmentFilterView(viewModel: viewModel)
.overlay(alignment: .bottom) {
- if viewModel.state == .treatmentFilter, !viewModel.selectedTreatments.isEmpty {
+ if !viewModel.selectedTreatments.isEmpty {
SelectedTreatmentSheetView(
selectedTreatments: viewModel.selectedTreatments,
removeTreatment: viewModel.removeTreatment(_:)
)
-
}
}🤖 Prompt for AI Agents |
||
|
|
||
| case .downTimeSetting: | ||
| DownTimeSettingView( | ||
|
|
@@ -101,13 +110,6 @@ struct NoTreatmentView: View { | |
| @ViewBuilder | ||
| private func bottomView() -> some View { | ||
| VStack(spacing: 0) { | ||
| if viewModel.state == .treatmentFilter, !viewModel.selectedTreatments.isEmpty { | ||
| SelectedTreatmentSheetView( | ||
| selectedTreatments: viewModel.selectedTreatments, | ||
| removeTreatment: viewModel.removeTreatment(_:) | ||
| ) | ||
| } | ||
|
|
||
| CherrishButton( | ||
| title: "다음", | ||
| type: .large, | ||
|
|
@@ -157,28 +159,33 @@ private struct TreatmentSelectedCategory: View { | |
| style: .title1_sb_18, | ||
| color: .gray1000 | ||
| ) | ||
| .frame(height: 27.adjustedH) | ||
|
|
||
| TypographyText( | ||
| "외모 고민은 무엇인가요?", | ||
| style: .title1_sb_18, | ||
| color: .gray1000 | ||
| ) | ||
|
|
||
| .frame(height: 27.adjustedH) | ||
| Spacer() | ||
| .frame(height: 4.adjustedH) | ||
| TypographyText( | ||
| "선택한 고민을 기준으로 시술 정보를 정리해줘요.", | ||
| style: .body1_m_14, | ||
| color: .gray700 | ||
| ) | ||
| .frame(height: 20.adjustedH) | ||
|
|
||
| } | ||
| .frame(height: 78.adjustedH) | ||
|
|
||
| Spacer() | ||
| } | ||
| .padding(.horizontal, 34.adjustedW) | ||
| Spacer() | ||
| .frame(height: 40.adjustedH) | ||
|
|
||
| ScrollView(.vertical, showsIndicators:false) { | ||
| Spacer() | ||
| .frame(height: 40.adjustedH) | ||
| LazyVGrid(columns: columns, spacing: 12.adjustedH) { | ||
| ForEach(viewModel.categories, id: \.id) { category in | ||
| SelectionChip( | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -51,28 +51,45 @@ struct SelectedTreatmentSheetView: View { | |
| y: -5 | ||
| ) | ||
| ZStack { | ||
| ScrollView(.vertical, showsIndicators: false) { | ||
| VStack(spacing: spacing) { | ||
| if selectedTreatments.count > 3 { | ||
| scrollViewTopMarkerView | ||
| .allowsHitTesting(false) | ||
| } | ||
| ForEach(selectedTreatments, id: \.id) { treatment in | ||
| TreatmentRowView( | ||
| displayMode: .summary, | ||
| treatmentEntity: treatment, | ||
| isSelected: .constant(true), | ||
| action: { removeTreatment(treatment) } | ||
| ) | ||
| .frame(height: itemHeight) | ||
| ScrollViewReader { proxy in | ||
| ScrollView(.vertical, showsIndicators: false) { | ||
| VStack(spacing: spacing) { | ||
| if selectedTreatments.count > 3 { | ||
| scrollViewTopMarkerView | ||
| .allowsHitTesting(false) | ||
| } | ||
| ForEach(selectedTreatments, id: \.id) { treatment in | ||
| TreatmentRowView( | ||
| displayMode: .summary, | ||
| treatmentEntity: treatment, | ||
| isSelected: .constant(true), | ||
| action: { removeTreatment(treatment) } | ||
| ) | ||
| .id(treatment.id) | ||
| .frame(height: itemHeight) | ||
| } | ||
| .padding(.horizontal, 24.5.adjustedW) | ||
|
Comment on lines
+70
to
+71
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 🧩 Analysis chain🏁 Script executed: find . -name "SelectedTreatmentSheetView.swift" -type fRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 175 🏁 Script executed: # Check the context around lines 70-71 in the file
sed -n '60,80p' Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/SelectedTreatmentSheetView.swiftRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 1132 🏁 Script executed: # Run the verification script to check padding patterns with TreatmentRowView
rg -n "TreatmentRowView" --type swift -A 5 -B 5Repository: TEAM-Cherrish/Cherrish-iOS Length of output: 8805 🏁 Script executed: # Check padding application in DownTimeSettingView
sed -n '30,50p' Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/DownTimeSettingView.swiftRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 1016 🏁 Script executed: # Check padding application in TreatmentFilterView
sed -n '45,65p' Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/Treatment/TreatmentFilterView.swiftRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 1036 🏁 Script executed: # Check padding application in NoTreatmentFilterView
sed -n '15,35p' Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/NoTreatment/NoTreatmentFilterView.swiftRepository: TEAM-Cherrish/Cherrish-iOS Length of output: 1042
🤖 Prompt for AI Agents |
||
|
|
||
| if selectedTreatments.count > 3 { | ||
| scrollViewBottomMarkerView | ||
| .allowsHitTesting(false) | ||
| } | ||
|
|
||
| Color.clear | ||
| .frame(height: 1) | ||
| .id("scrollBottom") | ||
| } | ||
| if selectedTreatments.count > 3 { | ||
| scrollViewBottomMarkerView | ||
| .allowsHitTesting(false) | ||
| .padding(.vertical, 14.adjustedH) | ||
| } | ||
| .onChange(of: selectedTreatments.count) { oldCount, newCount in | ||
| if newCount > oldCount { | ||
| withAnimation { | ||
| proxy.scrollTo("scrollBottom", anchor: .bottom) | ||
| } | ||
| } | ||
| } | ||
| .padding(.vertical, 14.adjustedH) | ||
| } | ||
|
|
||
| if selectedTreatments.count > 3 { | ||
| GradientBox(isTop: true) | ||
| .frame(height: 42.adjustedH) | ||
|
|
@@ -86,12 +103,10 @@ struct SelectedTreatmentSheetView: View { | |
| .opacity(shouldShowGradientBottom ? 1 : 0) | ||
| .frame(maxHeight: .infinity, alignment: .bottom) | ||
| } | ||
|
|
||
|
|
||
|
|
||
| } | ||
| .background(.gray0) | ||
| .frame(height: scrollViewHeight) | ||
| .padding(.horizontal, 24.5.adjustedW) | ||
|
|
||
| .coordinateSpace(name: "SelectedTreatmentScroll") | ||
| .onPreferenceChange(ScrollTopPreferenceKey.self) { minY in | ||
| if initialTopGlobalY == nil { initialTopGlobalY = minY } | ||
|
|
@@ -100,7 +115,9 @@ struct SelectedTreatmentSheetView: View { | |
| .onPreferenceChange(ScrollBottomPreferenceKey.self) { height in | ||
| bottomOffsetY = height | ||
| } | ||
|
|
||
| } | ||
|
|
||
| } | ||
| } | ||
|
|
||
|
|
||
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
레이아웃 구조가 명확합니다
명시적인 높이 프레임을 사용하여 일관된 레이아웃을 구현했습니다. 코드 내 불필요한 빈 줄(74, 79-80행)을 정리하면 가독성이 향상됩니다.
♻️ 코드 정리 제안
private var titleView: some View { HStack(spacing: 0) { 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) - - - Spacer() .frame(height: 4.adjustedH) TypographyText("시술을 선택하셨는지 확인할게요.", style: .body1_r_14, color: .gray700) .frame(height: 20.adjustedH) } .frame(height: 78.adjustedH) Spacer() } }📝 Committable suggestion
🤖 Prompt for AI Agents