-
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 7 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,21 +14,28 @@ struct NoTreatmentFilterView: View { | |||||||||||||||||||||||||||||||
| VStack(spacing: 0) { | ||||||||||||||||||||||||||||||||
| TitleHeaderView(title: viewModel.selectedCategory?.title ?? "") | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| Spacer() | ||||||||||||||||||||||||||||||||
| .frame(height: 10.adjustedH) | ||||||||||||||||||||||||||||||||
| // Spacer() | ||||||||||||||||||||||||||||||||
| // .frame(height: 18.adjustedH) | ||||||||||||||||||||||||||||||||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| 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) | ||||||||||||||||||||||||||||||||
|
|
||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
| } | ||||||||||||||||||||||||||||||||
|
|
@@ -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 |
|---|---|---|
|
|
@@ -24,6 +24,7 @@ struct SelectedTreatmentSheetView: View { | |
| @State private var topGlobalY: CGFloat = .zero | ||
| @State private var initialTopGlobalY: CGFloat? = nil | ||
| @State private var bottomOffsetY: CGFloat = .zero | ||
| @State private var scrollTargetID: UUID? | ||
coderabbitai[bot] marked this conversation as resolved.
Outdated
Show resolved
Hide resolved
|
||
|
|
||
| var body: some View { | ||
| VStack(spacing: 0) { | ||
|
|
@@ -51,28 +52,44 @@ struct SelectedTreatmentSheetView: View { | |
| y: -5 | ||
| ) | ||
| ZStack { | ||
| ScrollView(.vertical, showsIndicators: false) { | ||
| VStack(spacing: spacing) { | ||
| if selectedTreatments.count > 3 { | ||
| scrollViewTopMarkerView | ||
| .allowsHitTesting(false) | ||
| 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) | ||
| } | ||
| if selectedTreatments.count > 3 { | ||
| scrollViewBottomMarkerView | ||
| .allowsHitTesting(false) | ||
| } | ||
|
|
||
| // 스크롤 앵커용 더미 뷰 | ||
|
||
| Color.clear | ||
| .frame(height: 1) | ||
| .id("scrollBottom") | ||
| } | ||
| ForEach(selectedTreatments, id: \.id) { treatment in | ||
| TreatmentRowView( | ||
| displayMode: .summary, | ||
| treatmentEntity: treatment, | ||
| isSelected: .constant(true), | ||
| action: { removeTreatment(treatment) } | ||
| ) | ||
| .frame(height: itemHeight) | ||
| } | ||
| 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,9 +103,6 @@ struct SelectedTreatmentSheetView: View { | |
| .opacity(shouldShowGradientBottom ? 1 : 0) | ||
| .frame(maxHeight: .infinity, alignment: .bottom) | ||
| } | ||
|
|
||
|
|
||
|
|
||
| } | ||
| .frame(height: scrollViewHeight) | ||
| .padding(.horizontal, 24.5.adjustedW) | ||
|
|
||
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