Conversation
📝 WalkthroughWalkthrough치료 필터 뷰의 동적 간격 조정. 선택된 치료 항목이 없을 때와 있을 때를 구분하여 스페이서 높이를 조건부로 설정하는 레이아웃 수정입니다. Changes
Estimated code review effort🎯 2 (Simple) | ⏱️ ~8 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing touches
🧪 Generate unit tests (beta)
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. Comment |
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 Fix all issues with AI agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/NoTreatment/NoTreatmentFilterView.swift`:
- Around line 53-56: The frame height calculation applies the adjustedH scale
twice to scrollViewHeight causing excessive spacing; update the height
expression in the .frame call that uses viewModel.selectedTreatments and
scrollViewHeight so that scrollViewHeight is only scaled once (remove the extra
.adjustedH) and keep adjustedH applied to either scrollViewHeight or the added
constant (24) consistently to avoid double-scaling.
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/Treatment/TreatmentFilterView.swift`:
- Around line 78-81: The frame height applies .adjustedH twice to
scrollViewHeight; in the TreatmentFilterView replace the double-adjustment by
using scrollViewHeight directly (leave .adjustedH only on the empty case).
Update the .frame(height:) expression that references
viewModel.selectedTreatments and scrollViewHeight so it uses scrollViewHeight
(no .adjustedH) when not empty, keeping the existing 24.adjustedH on the empty
branch.
| .frame( | ||
| height: viewModel.selectedTreatments.isEmpty ? | ||
| 24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH | ||
| ) |
There was a problem hiding this comment.
scrollViewHeight 이중 스케일링으로 여백이 과해질 수 있습니다.
Line 53-56에서 scrollViewHeight 계산에 이미 adjustedH가 포함되어 있는데 다시 .adjustedH를 적용해 크기가 과장될 가능성이 있습니다. 동일하게 한 번만 적용해주세요.
🛠️ 수정 제안
- .frame(
- height: viewModel.selectedTreatments.isEmpty ?
- 24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH
- )
+ .frame(
+ height: viewModel.selectedTreatments.isEmpty ?
+ 24.adjustedH : scrollViewHeight + 24.adjustedH
+ )📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .frame( | |
| height: viewModel.selectedTreatments.isEmpty ? | |
| 24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH | |
| ) | |
| .frame( | |
| height: viewModel.selectedTreatments.isEmpty ? | |
| 24.adjustedH : scrollViewHeight + 24.adjustedH | |
| ) |
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/NoTreatment/NoTreatmentFilterView.swift`
around lines 53 - 56, The frame height calculation applies the adjustedH scale
twice to scrollViewHeight causing excessive spacing; update the height
expression in the .frame call that uses viewModel.selectedTreatments and
scrollViewHeight so that scrollViewHeight is only scaled once (remove the extra
.adjustedH) and keep adjustedH applied to either scrollViewHeight or the added
constant (24) consistently to avoid double-scaling.
| .frame( | ||
| height: viewModel.selectedTreatments.isEmpty ? | ||
| 24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH | ||
| ) |
There was a problem hiding this comment.
scrollViewHeight에 .adjustedH가 중복 적용됩니다.
Line 78-81에서 scrollViewHeight는 이미 adjustedH를 포함해 계산되므로 다시 .adjustedH를 적용하면 기기별로 간격이 과도하게 늘어날 수 있습니다. scrollViewHeight는 그대로 사용하세요.
🛠️ 수정 제안
- .frame(
- height: viewModel.selectedTreatments.isEmpty ?
- 24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH
- )
+ .frame(
+ height: viewModel.selectedTreatments.isEmpty ?
+ 24.adjustedH : scrollViewHeight + 24.adjustedH
+ )📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| .frame( | |
| height: viewModel.selectedTreatments.isEmpty ? | |
| 24.adjustedH : scrollViewHeight.adjustedH + 24.adjustedH | |
| ) | |
| .frame( | |
| height: viewModel.selectedTreatments.isEmpty ? | |
| 24.adjustedH : scrollViewHeight + 24.adjustedH | |
| ) |
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/View/Treatment/TreatmentFilterView.swift`
around lines 78 - 81, The frame height applies .adjustedH twice to
scrollViewHeight; in the TreatmentFilterView replace the double-adjustment by
using scrollViewHeight directly (leave .adjustedH only on the empty case).
Update the .frame(height:) expression that references
viewModel.selectedTreatments and scrollViewHeight so it uses scrollViewHeight
(no .adjustedH) when not empty, keeping the existing 24.adjustedH on the empty
branch.
🔗 연결된 이슈
📄 작업 내용