Skip to content

Comments

Style/#73 다운타임 바텀시트 UI 구현#79

Merged
y-eonee merged 6 commits intodevelopfrom
style/#73-다운타임-바텀시트
Jan 18, 2026

Hidden character warning

The head ref may contain hidden characters: "style/#73-\ub2e4\uc6b4\ud0c0\uc784-\ubc14\ud140\uc2dc\ud2b8"
Merged

Style/#73 다운타임 바텀시트 UI 구현#79
y-eonee merged 6 commits intodevelopfrom
style/#73-다운타임-바텀시트

Conversation

@y-eonee
Copy link
Contributor

@y-eonee y-eonee commented Jan 16, 2026

🔗 연결된 이슈

📄 작업 내용

  • 재선오빠가 한 델리게이트한 ㅋㅋ 바텀시트 UI 구현했습니다.
  • 앱 아이콘 추가했어요
구현 내용 IPhone 16 pro IPhone 13 mini
GIF

@y-eonee y-eonee requested a review from a team January 16, 2026 16:01
@y-eonee y-eonee self-assigned this Jan 16, 2026
@y-eonee y-eonee requested review from soseoyo12, sum130 and wotjs020708 and removed request for a team January 16, 2026 16:01
@y-eonee y-eonee 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

📝 Walkthrough

Walkthrough

다운타임 바텀시트용 새로운 SwiftUI 뷰(DowntimeBottomSheetView)와 관련 자산(아이콘 파일명 추가, dimColor 색상 세트, speechBubble 이미지 세트)을 추가하고, 피커 컴포넌트 이름 변경 및 사소한 문법 정리를 포함합니다.

Changes

Cohort / File(s) 변경 사항
자산: AppIcon
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
AppIcon 항목의 세 이미지 엔트리에 filename 필드 3개 추가
자산: 색상
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/dimColor.colorset/Contents.json
새로운 색상 세트 추가(라이트/다크 변형, sRGB 정의, 메타데이터 포함)
자산: 이미지
Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Contents.json
speechBubble 이미지 세트 추가(1x/2x/3x 변형 선언)
UI 컴포넌트 추가
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift
새로운 SwiftUI 바텀시트 뷰 추가: 상태(selectedDowntime, rate), 진행 바, speech bubble, 피커 등 서브뷰 포함
컴포넌트 리네임
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishPicker.swift
CustomWheelPickerCherrishPicker로 타입명 변경 (기능 동일)
사소한 정리
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift
후행 쉼표 제거(문법 정리)

Sequence Diagram(s)

(해당 변경은 주로 UI/자산 추가 및 경미한 리네이밍으로, 다중 컴포넌트 간의 명확한 시퀀스 흐름을 시각화할 필요가 없어 다이어그램을 생략합니다.)

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • sum130
  • wotjs020708
  • soseoyo12
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed PR 제목 'Style/#73 다운타임 바텀시트 UI 구현'은 변경사항의 주요 목표인 다운타임 바텀시트 UI 구현을 명확하게 설명합니다.
Description check ✅ Passed PR 설명에서 다운타임 바텀시트 UI 구현과 앱 아이콘 추가라는 변경사항을 관련 내용으로 기술하고 있습니다.
Linked Issues check ✅ Passed 코드 변경사항에서 DowntimeBottomSheetView 구현, CherrishPicker 컴포넌트, 애셋 추가 등이 #73 이슈의 다운타임 바텀시트 UI 구현 목표를 충족합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 #73 이슈의 다운타임 바텀시트 UI 구현 범위 내에 있으며, 부가적인 범위 외 변경은 없습니다.
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/#73-다운타임-바텀시트

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

@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/DowntimeBottomSheetView.swift`:
- Around line 11-12: The rate state is fixed at 0.5 and not updated when the
user changes selectedDowntime in DowntimeBottomSheetView; update rate by
deriving it from selectedDowntime (e.g., make rate a computed value like
Double(selectedDowntime)/12.0) or add an onChange(of: selectedDowntime) handler
that sets rate = Double(newValue)/12.0 so the progress/progress bar that reads
rate updates correctly (adjust any references to rate in the view accordingly).
- Around line 11-12: 현재 DowntimeBottomSheetView의 `@State` 프로퍼티 selectedDowntime와
rate가 public으로 선언되어 있으니 SwiftUI 모범 사례에 따라 두 속성에 private 접근 제어자를 추가해 뷰 외부에서 직접
접근/수정되지 않도록 하세요; 만약 외부에서 초기값이나 바인딩이 필요하면 selectedDowntime과 rate 대신 init에 Binding
파라미터를 받아 처리하거나 별도의 `@Binding/외부` 프로퍼티를 추가해 값을 노출하도록 변경하세요.
- Line 73: The code contains an extra space between the identifier and its
parentheses for the SwiftUI view Spacer in DowntimeBottomSheetView (currently
written as "Spacer ()"); update the invocation to remove the space and use
"Spacer()" wherever "Spacer ()" appears (e.g., in the body of
DowntimeBottomSheetView) to follow Swift style and avoid inconsistent
formatting.
📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between b13a523 and 68e7179.

⛔ Files ignored due to path filters (6)
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon 1.png is excluded by !**/*.png
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon 2.png is excluded by !**/*.png
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/app icon.png is excluded by !**/*.png
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406.png is excluded by !**/*.png
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406@2x.png is excluded by !**/*.png
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Group 2085667406@3x.png is excluded by !**/*.png
📒 Files selected for processing (6)
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/AppIcon.appiconset/Contents.json
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/Color/dimColor.colorset/Contents.json
  • Cherrish-iOS/Cherrish-iOS/Assets.xcassets/speechBubble.imageset/Contents.json
  • Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift
  • Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishPicker.swift
  • Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/Treatment/TreatmentRowView.swift
🔇 Additional comments (5)
Cherrish-iOS/Cherrish-iOS/Presentation/Global/Components/CherrishPicker.swift (1)

11-28: 레거시 이름 CustomWheelPicker 사용 기록 없음 - 호환성 우려 불필요

CustomWheelPicker는 현재 코드베이스에 존재하지 않습니다. 전체 코드베이스를 검색한 결과 CustomWheelPicker에 대한 참조가 없으며, CherrishPicker는 내부(internal) 스코프의 구조체이므로 공개 API 호환성 문제가 없습니다. 이미 모든 코드가 새 이름으로 통일되어 있고(DowntimeBottomSheetView에서 사용), 제안된 typealias는 불필요합니다.

Likely an incorrect or invalid review comment.

Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift (4)

99-105: 하드코딩된 날짜 값에 대한 검토가 필요합니다.

현재 "1월 2일", "1월 14일" 등 날짜가 하드코딩되어 있습니다. UI 목업 단계라면 괜찮지만, 실제 기능 구현 시에는 동적으로 계산된 날짜를 사용해야 합니다.

델리게이트 기반 구현이라고 명시되어 있는데, 날짜 데이터는 외부에서 주입받을 계획인지 확인이 필요합니다.


48-64: scaledToFill()frame의 조합을 검토하세요.

scaledToFill()은 이미지가 프레임을 넘어갈 수 있습니다. 다양한 화면 크기에서 이미지가 잘리거나 레이아웃이 깨지지 않는지 확인이 필요합니다. scaledToFit()이 더 안전할 수 있습니다.


117-134: LGTM!

피커 뷰의 레이아웃과 바인딩 구현이 적절합니다. CherrishPickerselectedDowntime의 연결이 올바르게 설정되어 있습니다.


14-44: 구조가 잘 정리되어 있습니다.

확장(extension)을 활용한 서브뷰 분리와 adjustedH/adjustedW를 사용한 반응형 사이징이 일관되게 적용되어 있습니다.

✏️ Tip: You can disable this entire section by setting review_details to false in your review settings.

Comment on lines +11 to +12
@State var selectedDowntime: Int = 5
@State var rate: Double = 0.5
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

rate 값이 selectedDowntime 변경에 따라 갱신되지 않습니다.

현재 rate는 0.5로 고정되어 있어, 사용자가 피커에서 다운타임 값을 변경해도 프로그레스 바가 업데이트되지 않습니다. rateselectedDowntime 기반으로 계산하거나 onChange를 사용하여 동기화해야 합니다.

🐛 제안된 수정 (computed property 사용)
-    `@State` var rate: Double = 0.5
+    private var rate: Double {
+        // 예: 총 기간이 12일이고 다운타임이 selectedDowntime일 경우
+        Double(selectedDowntime) / 12.0
+    }

또는 onChange를 사용하여 동기화:

.onChange(of: selectedDowntime) { newValue in
    rate = Double(newValue) / 12.0
}

Also applies to: 86-92

🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift`
around lines 11 - 12, The rate state is fixed at 0.5 and not updated when the
user changes selectedDowntime in DowntimeBottomSheetView; update rate by
deriving it from selectedDowntime (e.g., make rate a computed value like
Double(selectedDowntime)/12.0) or add an onChange(of: selectedDowntime) handler
that sets rate = Double(newValue)/12.0 so the progress/progress bar that reads
rate updates correctly (adjust any references to rate in the view accordingly).

🧹 Nitpick | 🔵 Trivial

@State 프로퍼티에 private 접근 제어자를 추가하세요.

SwiftUI 모범 사례에 따르면, @State 프로퍼티는 뷰 내부에서만 관리되어야 하므로 private으로 선언하는 것이 권장됩니다. 외부에서 직접 초기화하려면 init을 통해 바인딩하거나 별도의 프로퍼티를 사용하세요.

♻️ 제안된 수정
-    `@State` var selectedDowntime: Int = 5
-    `@State` var rate: Double = 0.5
+    `@State` private var selectedDowntime: Int = 5
+    `@State` private var rate: Double = 0.5
📝 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
@State var selectedDowntime: Int = 5
@State var rate: Double = 0.5
`@State` private var selectedDowntime: Int = 5
`@State` private var rate: Double = 0.5
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift`
around lines 11 - 12, 현재 DowntimeBottomSheetView의 `@State` 프로퍼티 selectedDowntime와
rate가 public으로 선언되어 있으니 SwiftUI 모범 사례에 따라 두 속성에 private 접근 제어자를 추가해 뷰 외부에서 직접
접근/수정되지 않도록 하세요; 만약 외부에서 초기값이나 바인딩이 필요하면 selectedDowntime과 rate 대신 init에 Binding
파라미터를 받아 처리하거나 별도의 `@Binding/외부` 프로퍼티를 추가해 값을 노출하도록 변경하세요.


TypographyText("다운타임 \(selectedDowntime)일", style: .title2_m_16, color: .red600)

Spacer ()
Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟡 Minor

타이포 수정: Spacer ()Spacer()

괄호 앞에 불필요한 공백이 있습니다.

🔧 제안된 수정
-                Spacer ()
+                Spacer()
📝 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
Spacer ()
Spacer()
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift`
at line 73, The code contains an extra space between the identifier and its
parentheses for the SwiftUI view Spacer in DowntimeBottomSheetView (currently
written as "Spacer ()"); update the invocation to remove the space and use
"Spacer()" wherever "Spacer ()" appears (e.g., in the body of
DowntimeBottomSheetView) to follow Swift style and avoid inconsistent
formatting.

Copy link
Contributor

Choose a reason for hiding this comment

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

요거 해줭

Copy link
Contributor

@wotjs020708 wotjs020708 left a comment

Choose a reason for hiding this comment

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

어푸푸 고생하셨습니다.
KakaoTalk_Photo_2026-01-09-22-59-50 020

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
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.

프리뷰랑 기기대응(adjusted들) 수정해주세용! 굿!!

TypographyText("개인 다운타임으로 설정해주세요.", style: .title1_sb_18, color: .gray1000)
.frame(height: 27.adjustedH)
.frame(maxWidth: .infinity, alignment: .leading)
.padding(.leading, 25)
Copy link
Contributor

Choose a reason for hiding this comment

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

.adjustedW써주면 좋을 것 같아용~~~

Copy link
Contributor Author

Choose a reason for hiding this comment

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

제가잠시미쳣엇나봐요 다 수정함

Comment on lines 36 to 41
.padding(.horizontal, 25)

pickerView

grayLineView
.padding(.horizontal, 25)
Copy link
Contributor

Choose a reason for hiding this comment

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

요것두!! .adjustedW해주세욘!

Comment on lines 58 to 62
.padding(.horizontal, 18)
.offset(y: -4.adjustedH)

}
.padding(.horizontal, 25)
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 137 to 139
#Preview {
DowntimeBottomSheetView()
}
Copy link
Contributor

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: 1

🤖 Fix all issues with AI agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift`:
- Around line 71-76: DowntimeBottomSheetView currently hardcodes "여유기간 7일" and
the start/end date display; add properties let startDate: Date, let endDate:
Date, and let bufferDays: Int to the struct and replace hardcoded strings in the
TypographyText views with computed values: use a static DateFormatter
(dateFormatter) with locale "ko_KR" and format "M월 d일" and a helper func
dateText(_:) that returns Self.dateFormatter.string(from:); then display
bufferDays (e.g. "\(bufferDays)일") and dateText(startDate) / dateText(endDate)
in place of the hardcoded "7일", "1월 2일", "1월 14일" so the UI reflects injected
data.
♻️ Duplicate comments (3)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift (3)

11-12: 프로그레스 바가 선택값 변경에 동기화되지 않습니다.
Line 11-12의 rate가 고정값이라 selectedDowntime 변경 시 Line 86-92의 바가 갱신되지 않습니다. rate를 계산 속성으로 만들고 0...1로 클램프하세요.

🐛 제안된 수정
-    `@State` var rate: Double = 0.5
+    private var rate: Double {
+        let total = max(1, selectedDowntime + 7)
+        return min(Double(selectedDowntime) / Double(total), 1)
+    }

11-12: @Stateprivate로 제한하세요.
Line 11-12의 상태는 뷰 내부에서만 관리되도록 제한하는 편이 안전합니다.

♻️ 제안된 수정
-    `@State` var selectedDowntime: Int = 5
+    `@State` private var selectedDowntime: Int = 5

22-22: 수평 패딩에는 adjustedW를 사용하세요.
Line 22에서 수평 여백에 adjustedH를 사용하면 기기 비율에 따라 레이아웃이 틀어질 수 있습니다.

🔧 제안된 수정
-                .padding(.leading, 25.adjustedH)
+                .padding(.leading, 25.adjustedW)

Comment on lines +71 to +76
TypographyText("다운타임 \(selectedDowntime)일", style: .title2_m_16, color: .red600)

Spacer ()

TypographyText("여유기간 7일", style: .title2_m_16, color: .gray800)

Copy link

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🟠 Major

🧩 Analysis chain

🏁 Script executed:

find . -type f -name "DowntimeBottomSheetView.swift" | head -20

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 157


🏁 Script executed:

cd Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar && wc -l DowntimeBottomSheetView.swift

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 103


🏁 Script executed:

cd Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar && sed -n '1,150p' DowntimeBottomSheetView.swift | cat -n

Repository: TEAM-Cherrish/Cherrish-iOS

Length of output: 5031


여유기간 문자열과 날짜가 하드코딩되어 실제 데이터와 불일치할 수 있습니다.

Line 75의 "여유기간 7일"과 Line 99-105의 "1월 2일", "1월 14일"은 하드코딩된 상태입니다. 버퍼 일수와 시작/종료 날짜를 프로퍼티로 주입받아 표시하세요.

제안된 수정
-                TypographyText("여유기간 7일", style: .title2_m_16, color: .gray800)
+                TypographyText("여유기간 \(bufferDays)일", style: .title2_m_16, color: .gray800)
...
-                TypographyText("1월 2일", style: .body2_r_13, color: .gray700)
+                TypographyText(dateText(startDate), style: .body2_r_13, color: .gray700)
...
-                TypographyText("1월 14일", style: .body2_r_13, color: .gray700)
+                TypographyText(dateText(endDate), style: .body2_r_13, color: .gray700)

구조체에 아래와 같이 추가하세요:

let startDate: Date
let endDate: Date
let bufferDays: Int

private static let dateFormatter: DateFormatter = {
    let f = DateFormatter()
    f.locale = Locale(identifier: "ko_KR")
    f.dateFormat = "M월 d일"
    return f
}()

private func dateText(_ date: Date) -> String {
    Self.dateFormatter.string(from: date)
}
🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Calendar/DowntimeBottomSheetView.swift`
around lines 71 - 76, DowntimeBottomSheetView currently hardcodes "여유기간 7일" and
the start/end date display; add properties let startDate: Date, let endDate:
Date, and let bufferDays: Int to the struct and replace hardcoded strings in the
TypographyText views with computed values: use a static DateFormatter
(dateFormatter) with locale "ko_KR" and format "M월 d일" and a helper func
dateText(_:) that returns Self.dateFormatter.string(from:); then display
bufferDays (e.g. "\(bufferDays)일") and dateText(startDate) / dateText(endDate)
in place of the hardcoded "7일", "1월 2일", "1월 14일" so the UI reflects injected
data.

@y-eonee y-eonee merged commit d6cedff into develop Jan 18, 2026
1 check passed
@y-eonee y-eonee deleted the style/#73-다운타임-바텀시트 branch January 18, 2026 12:55
This was referenced Jan 18, 2026
Kimgyuilli pushed a commit that referenced this pull request Jan 21, 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