Skip to content

Comments

Style/#72 다운타임 세팅 뷰 구현#82

Merged
wotjs020708 merged 7 commits intodevelopfrom
style/#72-downtimesettingview
Jan 18, 2026
Merged

Style/#72 다운타임 세팅 뷰 구현#82
wotjs020708 merged 7 commits intodevelopfrom
style/#72-downtimesettingview

Conversation

@wotjs020708
Copy link
Contributor

🔗 연결된 이슈

📄 작업 내용

  • 어쩌구저쩌구
구현 내용 IPhone 16 pro IPhone 13 mini
GIF

💻 주요 코드 설명

코드 설명할 파일 이름 (ex: HomeView)

  • viewModel 대신 [TreatmentEntity]를 받아 사용
    var treatments: [TreatmentEntity]

162dd79e80fa43dd

@wotjs020708 wotjs020708 requested a review from a team January 16, 2026 17:53
@wotjs020708 wotjs020708 self-assigned this Jan 16, 2026
@wotjs020708 wotjs020708 requested review from soseoyo12, sum130 and y-eonee and removed request for a team January 16, 2026 17:53
@wotjs020708 wotjs020708 added 재선🐻 Feature 새로운 기능 구현 및 API 연결 labels Jan 16, 2026
@wotjs020708 wotjs020708 linked an issue Jan 16, 2026 that may be closed by this pull request
1 task
@coderabbitai
Copy link

coderabbitai bot commented Jan 16, 2026

Caution

Review failed

The pull request is closed.

📝 Walkthrough

Walkthrough

다운타임 설정 화면을 렌더링하는 새로운 SwiftUI 뷰 DownTimeSettingView를 추가하고, NoTreatment 흐름에 해당 뷰를 연결하는 등 여러 캘린더 관련 뷰의 레이아웃과 텍스트를 조정했습니다.

Changes

Cohort / File(s) 변경 요약
새로운 UI 컴포넌트
\Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/Model/DownTimeSettingView.swift``
다운타임 조정 화면을 렌더링하는 새로운 SwiftUI 뷰 추가. TreatmentEntity 배열을 받아 각 항목을 TreatmentRowView로 표시하고, 하단 면책 문구(◎ 포함)와 전체에 가로 패딩 적용.
NoTreatment 흐름 통합
\Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/View/NoTreatmentView.swift``
.downTimeSetting 케이스의 플레이스홀더를 DownTimeSettingView(treatments: viewModel.selectedTreatments)로 교체하여 뷰모델 데이터를 연결. 일부 레이아웃·패딩·스페이서 조정.
선택/헤더/세부 UI 조정
\Cherrish-iOS/Presentation/Feature/Calendar/SelectTreatment/SelectTreatmentView.swift`, `Cherrish-iOS/Presentation/Feature/Calendar/Treatment/Components/SelectedTreatmentView.swift`, `Cherrish-iOS/Presentation/Feature/Calendar/Treatment/Components/TargetDdaySettingView.swift``
타이포그래피 텍스트 라인 추가, 스페이서·프레이밍·패딩 조정으로 세로·가로 레이아웃 변경. SelectedTreatmentView HStack에 Spacer() 추가로 수평 배치 변경. D-day 선택 상태 바인딩 확장.
필터/리스트 UI 변경 (체크박스형 렌더링)
\Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/View/NoTreatmentFilterView.swift``
헤더 확장 및 설명문 추가, 치료 항목을 ScrollView + ForEach로 렌더링하도록 변경. TreatmentRowView 호출이 displayMode:, treatmentEntity:, isSelected:, action: 시그니처로 사용되도록 업데이트(호출부 변경).
경미한 포맷/문서 정리
\Cherrish-iOS/Presentation/Feature/Calendar/CalendarView.swift`, `Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/Model/NoTreatment.swift`, `Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/ViewModel/NoTreatmentViewModel.swift`, `Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/Model/TreatmentCategory.swift``
불필요 공백 및 포맷 정리, 로직 변경 없음(무해한 레이아웃/빈 줄 추가/삭제).

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • y-eonee
  • soseoyo12
  • sum130
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목 'Style/#72 다운타임 세팅 뷰 구현'은 주요 변경사항인 DownTimeSettingView 구현을 명확하게 설명합니다.
Description check ✅ Passed PR 설명은 다운타임 설정 뷰 구현과 관련된 내용을 포함하고 있으며, UI 데모와 주요 코드 변경사항을 설명합니다.
Linked Issues check ✅ Passed 연결된 이슈 #72의 '화면 구현' 요구사항이 충족되었으며, DownTimeSettingView가 구현되어 피그마 기준 다운타임 설정 화면이 완성되었습니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #72의 다운타임 설정 뷰 구현 범위 내에 있으며, 스타일 조정과 뷰 연결만 포함되어 있습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch style/#72-downtimesettingview

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Contributor

@y-eonee y-eonee left a comment

Choose a reason for hiding this comment

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

서버 연결하고 바로 리팩토링합시다 ........

Comment on lines +25 to +26
ForEach(treatments, id: \.self) { treatment in
TreatmentRowView(displayMode: .completeBoxView, treatmentEntity: treatment, isSelected: .constant(false), isCompleted: .constant(false), action: {})
Copy link
Contributor

Choose a reason for hiding this comment

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

개행좀 해주세요

Comment on lines 63 to 65
#Preview {
DownTimeSettingView(treatments: TreatmentEntity.mockData)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

님아프리뷰좀지워주셈

Comment on lines 35 to 50
// MARK: - Navigation
extension NoTreatment {
mutating func next() {
let allCases = Self.allCases
guard let currentIndex = allCases.firstIndex(of: self),
currentIndex + 1 < allCases.count else { return }
self = allCases[allCases.index(after: currentIndex)]
}

mutating func previous() {
let allCases = Self.allCases
guard let currentIndex = allCases.firstIndex(of: self),
currentIndex > 0 else { return }
self = allCases[allCases.index(before: currentIndex)]
}
}
Copy link
Contributor

Choose a reason for hiding this comment

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

프로토콜로 리팩토링해보시면 좋을 것 같아요 ~ ~~

.frame(height: 1.adjustedH)
.gray500()
}
.frame(height: 105)
Copy link
Contributor

Choose a reason for hiding this comment

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

기기대응 plz

Comment on lines 13 to 15
init(viewModel: NoTreatmentViewModel = NoTreatmentViewModel()) {
_viewModel = StateObject(wrappedValue: viewModel)
}
Copy link
Contributor

Choose a reason for hiding this comment

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

여기도 뷰모델 인잇 어쩌구 수정해주세염

}
}

//MARK: - TreatmentSelectedCategoryView
Copy link
Contributor

Choose a reason for hiding this comment

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

마크주석 삭제 부탁

@wotjs020708 wotjs020708 added Style UI 구현 and removed Feature 새로운 기능 구현 및 API 연결 labels Jan 18, 2026
Copy link
Contributor

@sum130 sum130 left a comment

Choose a reason for hiding this comment

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

어푸푸~ 나연리(드) 잘 부탁해요.. 팟팅슨!!

Copy link
Contributor

@soseoyo12 soseoyo12 left a comment

Choose a reason for hiding this comment

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

어푸

Copy link

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 3

🤖 Fix all issues with AI agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/Model/DownTimeSettingView.swift`:
- Around line 36-52: Replace the three separate TypographyText views inside the
VStack with a single TypographyText that uses a multiline string (with explicit
\n line breaks) so the same text, style (.body3_r_12) and color (.gray600) are
preserved; ensure the \n placements match the current visual line breaks/design
and keep the VStack alignment/spacing unchanged (refer to the VStack and
TypographyText usages in DownTimeSettingView.swift to locate the code to
update).
- Around line 1-11: DownTimeSettingView is a SwiftUI view declared as struct
DownTimeSettingView and currently lives in the Model folder; move the
DownTimeSettingView.swift file into the project's View (or
Presentation/Feature/Calendar/Treatment/View) folder to match project
conventions, update any module or target membership if needed, and verify
imports/usage of TreatmentEntity remain valid (adjust import statements or
access levels if the move causes visibility issues) and update any file
references in project settings so builds and references to DownTimeSettingView
compile correctly.
- Around line 25-26: The ForEach is using id: \.self which hashes entire
TreatmentEntity objects; change it to use the entity's unique identifier by
switching to id: \.id so SwiftUI can diff efficiently. Locate the ForEach over
treatments (the call rendering TreatmentRowView with displayMode:
.completeBoxView and treatmentEntity: treatment) and update its id parameter to
.id (ensure TreatmentEntity exposes an id property or provide the correct
identifier property) so identity is stable and performance improves.
♻️ Duplicate comments (1)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/Model/DownTimeSettingView.swift (1)

63-65: Preview 코드 삭제가 필요합니다.

이전 리뷰에서 지적된 대로 Preview 코드를 삭제해주세요.

Comment on lines +1 to +11
//
// DownTimeSettingView.swift
// Cherrish-iOS
//
// Created by 어재선 on 1/16/26.
//

import SwiftUI

struct DownTimeSettingView: View {
var treatments: [TreatmentEntity]
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

파일 위치가 적절하지 않습니다.

DownTimeSettingView.swift 파일이 Model 폴더에 위치해 있지만, 이 파일은 SwiftUI View입니다. 프로젝트 구조의 일관성을 위해 View 폴더로 이동하는 것이 좋습니다.

🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/Model/DownTimeSettingView.swift`
around lines 1 - 11, DownTimeSettingView is a SwiftUI view declared as struct
DownTimeSettingView and currently lives in the Model folder; move the
DownTimeSettingView.swift file into the project's View (or
Presentation/Feature/Calendar/Treatment/View) folder to match project
conventions, update any module or target membership if needed, and verify
imports/usage of TreatmentEntity remain valid (adjust import statements or
access levels if the move causes visibility issues) and update any file
references in project settings so builds and references to DownTimeSettingView
compile correctly.

Comment on lines +25 to +26
ForEach(treatments, id: \.self) { treatment in
TreatmentRowView(displayMode: .completeBoxView, treatmentEntity: treatment, isSelected: .constant(false), isCompleted: .constant(false), action: {})
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

ForEach에서 id: \.id 사용을 권장합니다.

id: \.self는 전체 객체를 해시하므로, TreatmentEntityid 속성을 가지고 있다면 id: \.id를 사용하는 것이 더 명확하고 성능상 유리합니다.

♻️ 제안하는 수정
-                ForEach(treatments, id: \.self) { treatment in
+                ForEach(treatments, id: \.id) { treatment in
                     TreatmentRowView(displayMode: .completeBoxView, treatmentEntity: treatment, isSelected: .constant(false), isCompleted: .constant(false), action: {})
                 }
📝 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.

Suggested change
ForEach(treatments, id: \.self) { treatment in
TreatmentRowView(displayMode: .completeBoxView, treatmentEntity: treatment, isSelected: .constant(false), isCompleted: .constant(false), action: {})
ForEach(treatments, id: \.id) { treatment in
TreatmentRowView(displayMode: .completeBoxView, treatmentEntity: treatment, isSelected: .constant(false), isCompleted: .constant(false), action: {})
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/Model/DownTimeSettingView.swift`
around lines 25 - 26, The ForEach is using id: \.self which hashes entire
TreatmentEntity objects; change it to use the entity's unique identifier by
switching to id: \.id so SwiftUI can diff efficiently. Locate the ForEach over
treatments (the call rendering TreatmentRowView with displayMode:
.completeBoxView and treatmentEntity: treatment) and update its id parameter to
.id (ensure TreatmentEntity exposes an id property or provide the correct
identifier property) so identity is stable and performance improves.

Comment on lines 36 to 52
VStack(alignment: .leading, spacing: 0) {
TypographyText(
"본 정보는 의료 상담이나 진단을 대체하지 않으며,",
style: .body3_r_12,
color: .gray600
)
TypographyText(
"실제 다운타임 및 회복 과정은 개인에 따라 다를 수 있습니다.",
style: .body3_r_12,
color: .gray600
)
TypographyText(
"정확한 내용은 의료진 상담을 통해 확인하세요.",
style: .body3_r_12,
color: .gray600
)
}
Copy link

Choose a reason for hiding this comment

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

🧹 Nitpick | 🔵 Trivial

면책 조항 텍스트를 하나의 문자열로 통합하는 것을 고려해보세요.

세 개의 TypographyText를 사용하는 대신 하나의 멀티라인 문자열로 통합하면 코드가 더 간결해질 수 있습니다. 단, 현재 방식이 특정 줄바꿈 위치를 보장해야 하는 디자인 요구사항이라면 현재 구현도 괜찮습니다.

🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/Treatment/NoTreatment/Model/DownTimeSettingView.swift`
around lines 36 - 52, Replace the three separate TypographyText views inside the
VStack with a single TypographyText that uses a multiline string (with explicit
\n line breaks) so the same text, style (.body3_r_12) and color (.gray600) are
preserved; ensure the \n placements match the current visual line breaks/design
and keep the VStack alignment/spacing unchanged (refer to the VStack and
TypographyText usages in DownTimeSettingView.swift to locate the code to
update).

@wotjs020708 wotjs020708 merged commit db7e598 into develop Jan 18, 2026
1 check was pending
@wotjs020708 wotjs020708 deleted the style/#72-downtimesettingview branch January 18, 2026 14:02
Kimgyuilli pushed a commit that referenced this pull request Jan 21, 2026
@coderabbitai coderabbitai bot mentioned this pull request Jan 22, 2026
@coderabbitai coderabbitai bot mentioned this pull request Jan 23, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Style] 다운 타임 설정 뷰

4 participants