[Feat-T3-110] 루틴 생성 화면 구현#25
Conversation
- 루틴 시작 시간 선택 버튼 - 서브 루틴 추가 버튼
Walkthrough여러 개의 새로운 아이콘 이미지셋(asterisk, checked, delete, routine_creation, unchecked)이 에셋 카탈로그에 추가되었으며, BitnagilIcon 열거형에 해당 아이콘을 불러오는 정적 프로퍼티가 추가되었습니다. 또한, 루틴 생성 화면 및 컴포넌트(입력 뷰, 시간 선택 버튼, 세부루틴 추가 버튼), 주간 요일 모델, 루틴 생성 뷰모델, 툴팁 뷰가 새롭게 구현되었습니다. 기존 마이페이지 셀의 chevron 아이콘 참조 방식도 변경되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant RoutineCreationView
participant RoutineCreationViewModel
User->>RoutineCreationView: 루틴명/세부루틴/반복/시간 등 입력
RoutineCreationView->>RoutineCreationViewModel: action(input:)
RoutineCreationViewModel->>RoutineCreationView: Output publisher로 상태 전달
RoutineCreationView->>RoutineCreationView: UI 갱신(입력뷰, 버튼, 툴팁 등)
User->>RoutineCreationView: 등록 버튼 클릭
RoutineCreationView->>RoutineCreationViewModel: action(.registerRoutine)
RoutineCreationViewModel->>RoutineCreationViewModel: 등록 로직 처리(추후 API 연동)
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20분 Possibly related PRs
Poem
Note ⚡️ Unit Test Generation is now available in beta!Learn more here, or try it out under "Finishing Touches" below. 📜 Recent review detailsConfiguration used: .coderabbit.yaml ⛔ Files ignored due to path filters (3)
📒 Files selected for processing (7)
🚧 Files skipped from review as they are similar to previous changes (6)
🧰 Additional context used🧠 Learnings (1)Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (4)Learnt from: choijungp Learnt from: choijungp Learnt from: choijungp Learnt from: taipaise 🪛 SwiftLint (0.57.0)Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift[Warning] 91-91: Remove overridden functions that don't do anything except call their super (unneeded_override) 🔇 Additional comments (5)
✨ Finishing Touches
🧪 Generate unit tests
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
Documentation and Community
|
There was a problem hiding this comment.
Actionable comments posted: 5
♻️ Duplicate comments (4)
Projects/Presentation/Resources/Images.xcassets/delete_icon.imageset/Contents.json (1)
2-18: 위chevron_down_icon과 동일한 개선 사항 적용 가능
rendering-intent설정과 PDF 벡터 자산 전환 여부를 함께 검토해 주세요.Projects/Presentation/Resources/Images.xcassets/checked_icon.imageset/Contents.json (1)
2-18: 위chevron_down_icon과 동일한 개선 사항 적용 가능템플릿 렌더링 및 단일 PDF 변환을 고려해 보세요.
Projects/Presentation/Resources/Images.xcassets/unchecked_icon.imageset/Contents.json (1)
2-18: 위chevron_down_icon과 동일한 개선 사항 적용 가능템플릿 렌더링 및 단일 PDF 변환을 고려해 보세요.
Projects/Presentation/Resources/Images.xcassets/asterisk_icon.imageset/Contents.json (1)
2-18: 위chevron_down_icon과 동일한 개선 사항 적용 가능템플릿 렌더링 및 단일 PDF 변환을 고려해 보세요.
🧹 Nitpick comments (8)
Projects/Presentation/Resources/Images.xcassets/chevron_down_icon.imageset/Contents.json (1)
2-18: 아이콘 세트 메타데이터 보강 권장모노톤 아이콘으로서 앱 전반에서 Tint Color로 재사용될 가능성이 높다면, 각 이미지 항목에
"rendering-intent": "template"필드를 추가해두면 시스템 Tint 적용이 자동으로 이뤄집니다. 또한 PDF 벡터(1 개 파일)로 대체하면 해상도별 비트맵을 관리할 필요가 없어 유지보수가 간편해집니다.Projects/Presentation/Sources/RoutineCreation/Model/Week.swift (1)
8-35: 구현이 깔끔하고 Swift 모범 사례를 따릅니다.
Int와CaseIterable프로토콜 준수로 순서와 반복이 가능하며, 한국어 지역화도 적절히 구현되었습니다.코드의 가독성을 위해 다음과 같은 개선을 고려해보세요:
/// 주간 요일을 나타내는 열거형 (월요일부터 시작하는 ISO 8601 표준) enum Week: Int, CaseIterable { case monday = 0 case tuesday = 1 case wednesday = 2 case thursday = 3 case friday = 4 case saturday = 5 case sunday = 6 /// 한국어 요일 약어 var koreanValue: String { // 기존 구현 유지 } }Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift (1)
1-7: 파일 헤더의 파일명이 실제 파일명과 일치하지 않습니다.헤더에는 "DetailRoutineAdditionButton.swift"로 표기되어 있지만, 실제 클래스명은
SubroutineAdditionButton입니다.-// DetailRoutineAdditionButton.swift +// SubroutineAdditionButton.swiftProjects/Presentation/Sources/Common/Component/TooltipView.swift (1)
1-7: 파일명 오타를 수정해주세요.헤더 주석의 파일명이 실제 파일명과 일치하지 않습니다.
-// ToolTipView.swift +// TooltipView.swiftProjects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift (2)
107-113: 매직 넘버를 상수로 추출해주세요.서브루틴 최대 개수를 상수로 정의하면 유지보수가 쉬워집니다.
+private enum Constants { + static let maxSubroutineCount = 3 +} + private func addSubRoutine() { var subRoutines = subRoutinesSubject.value - guard subRoutines.count <= 3 else { return } + guard subRoutines.count <= Constants.maxSubroutineCount else { return } subRoutines.append("") subRoutinesSubject.send(subRoutines) }
162-172: 메서드명 오타를 수정해주세요.
configurExecutionTime을configureExecutionTime으로 수정해야 일관성이 유지됩니다.-private func configurExecutionTime(time: ExecutionType) { +private func configureExecutionTime(time: ExecutionType) {Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (2)
91-93: 불필요한 오버라이드를 제거해주세요.부모 클래스의 동작만 호출하는 메서드는 제거하는 것이 좋습니다.
-override func viewDidLoad() { - super.viewDidLoad() -}
578-602: 탭 핸들링 로직을 개선해주세요.현재 로직은 중복이 많고 복잡합니다. 헬퍼 메서드로 분리하면 가독성이 향상됩니다.
+private func hideTooltipIfNeeded(for button: UIButton, tooltip: TooltipView, at location: CGPoint) { + if !button.frame.contains(location) && !tooltip.frame.contains(location) { + button.isSelected = false + tooltip.hideTooltip() + } +} + @objc private func handleTap(_ gesture: UITapGestureRecognizer) { let location = gesture.location(in: contentView) - // 탭한 곳이 버튼 영역인 경우 - if detailInfoButton.frame.contains(location) { - repeatInfoButton.isSelected = false - repeatToolTipView.hideTooltip() - return - } - if repeatInfoButton.frame.contains(location) { - detailInfoButton.isSelected = false - detailToolTipView.hideTooltip() - return - } - - // 탭한 곳이 tooltip 영역 밖인 경우 - if !detailToolTipView.frame.contains(location) { - detailInfoButton.isSelected = false - detailToolTipView.hideTooltip() - } - if !repeatToolTipView.frame.contains(location) { - repeatInfoButton.isSelected = false - repeatToolTipView.hideTooltip() - } + // 한 툴팁이 열려있을 때 다른 버튼을 탭하면 기존 툴팁 닫기 + if detailInfoButton.frame.contains(location) && repeatInfoButton.isSelected { + repeatInfoButton.isSelected = false + repeatToolTipView.hideTooltip() + } else if repeatInfoButton.frame.contains(location) && detailInfoButton.isSelected { + detailInfoButton.isSelected = false + detailToolTipView.hideTooltip() + } else { + // 툴팁 영역 밖을 탭하면 해당 툴팁 닫기 + hideTooltipIfNeeded(for: detailInfoButton, tooltip: detailToolTipView, at: location) + hideTooltipIfNeeded(for: repeatInfoButton, tooltip: repeatToolTipView, at: location) + } }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (21)
Projects/Presentation/Resources/Images.xcassets/asterisk_icon.imageset/asterisk_icon@1x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/asterisk_icon.imageset/asterisk_icon@2x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/asterisk_icon.imageset/asterisk_icon@3x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/checked_icon.imageset/checked_icon@1x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/checked_icon.imageset/checked_icon@2x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/checked_icon.imageset/checked_icon@3x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/chevron_down_icon.imageset/chevron_down_icon@1x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/chevron_down_icon.imageset/chevron_down_icon@2x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/chevron_down_icon.imageset/chevron_down_icon@3x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/delete_icon.imageset/delete_icon@1x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/delete_icon.imageset/delete_icon@2x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/delete_icon.imageset/delete_icon@3x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/info_icon.imageset/info_icon@1x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/info_icon.imageset/info_icon@2x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/info_icon.imageset/info_icon@3x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/routine_creation_icon.imageset/routine_creation_icon@1x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/routine_creation_icon.imageset/routine_creation_icon@2x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/routine_creation_icon.imageset/routine_creation_icon@3x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/unchecked_icon.imageset/unchecked_icon@1x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/unchecked_icon.imageset/unchecked_icon@2x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/unchecked_icon.imageset/unchecked_icon@3x.pngis excluded by!**/*.png
📒 Files selected for processing (15)
Projects/Presentation/Resources/Images.xcassets/asterisk_icon.imageset/Contents.json(1 hunks)Projects/Presentation/Resources/Images.xcassets/checked_icon.imageset/Contents.json(1 hunks)Projects/Presentation/Resources/Images.xcassets/chevron_down_icon.imageset/Contents.json(1 hunks)Projects/Presentation/Resources/Images.xcassets/delete_icon.imageset/Contents.json(1 hunks)Projects/Presentation/Resources/Images.xcassets/info_icon.imageset/Contents.json(1 hunks)Projects/Presentation/Resources/Images.xcassets/routine_creation_icon.imageset/Contents.json(1 hunks)Projects/Presentation/Resources/Images.xcassets/unchecked_icon.imageset/Contents.json(1 hunks)Projects/Presentation/Sources/Common/Component/TooltipView.swift(1 hunks)Projects/Presentation/Sources/Common/DesignSystem/BitnagilIcon.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/Model/Week.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineCreationInputView.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineTimePickerButton.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift(1 hunks)
🧰 Additional context used
🧠 Learnings (4)
Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift (2)
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Login/View/TermsAgreementView.swift:44-46
Timestamp: 2025-07-16T09:09:13.869Z
Learning: BaseViewController의 viewDidLoad() 메서드에서 이미 configureAttribute(), configureLayout(), bind()를 호출하므로, 하위 클래스에서 super.viewDidLoad()를 호출하면 이 메서드들이 자동으로 호출된다. 따라서 하위 클래스에서 추가로 호출할 필요가 없다.
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Login/View/TermsAgreementView.swift:44-46
Timestamp: 2025-07-16T09:09:13.869Z
Learning: BaseViewController의 viewDidLoad() 메서드에서 이미 configureAttribute(), configureLayout(), bind()를 호출하므로, 하위 클래스에서 super.viewDidLoad()를 호출하면 이 메서드들이 자동으로 호출된다. 따라서 하위 클래스에서 추가로 호출할 필요가 없다.
Projects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift (1)
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Onboarding/View/OnboardingRecommendedRoutineView.swift:57-59
Timestamp: 2025-07-16T09:21:15.038Z
Learning: OnboardingRecommendedRoutineView에서 viewWillAppear에 registerOnboarding 호출하는 것이 적절한 이유: 사용자가 이전 페이지에서 온보딩 선택지를 변경한 후 돌아올 때 새로운 선택지로 다시 등록해야 하기 때문. 홈 뷰에서는 이 뷰로 돌아올 수 없어서 중복 호출 문제가 발생하지 않음.
Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineCreationInputView.swift (1)
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Onboarding/View/OnboardingRecommendedRoutineView.swift:57-59
Timestamp: 2025-07-16T09:21:15.038Z
Learning: OnboardingRecommendedRoutineView에서 viewWillAppear에 registerOnboarding 호출하는 것이 적절한 이유: 사용자가 이전 페이지에서 온보딩 선택지를 변경한 후 돌아올 때 새로운 선택지로 다시 등록해야 하기 때문. 홈 뷰에서는 이 뷰로 돌아올 수 없어서 중복 호출 문제가 발생하지 않음.
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (3)
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Onboarding/View/OnboardingRecommendedRoutineView.swift:57-59
Timestamp: 2025-07-16T09:21:15.038Z
Learning: OnboardingRecommendedRoutineView에서 viewWillAppear에 registerOnboarding 호출하는 것이 적절한 이유: 사용자가 이전 페이지에서 온보딩 선택지를 변경한 후 돌아올 때 새로운 선택지로 다시 등록해야 하기 때문. 홈 뷰에서는 이 뷰로 돌아올 수 없어서 중복 호출 문제가 발생하지 않음.
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Login/View/TermsAgreementView.swift:44-46
Timestamp: 2025-07-16T09:09:13.869Z
Learning: BaseViewController의 viewDidLoad() 메서드에서 이미 configureAttribute(), configureLayout(), bind()를 호출하므로, 하위 클래스에서 super.viewDidLoad()를 호출하면 이 메서드들이 자동으로 호출된다. 따라서 하위 클래스에서 추가로 호출할 필요가 없다.
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Login/View/TermsAgreementView.swift:44-46
Timestamp: 2025-07-16T09:09:13.869Z
Learning: BaseViewController의 viewDidLoad() 메서드에서 이미 configureAttribute(), configureLayout(), bind()를 호출하므로, 하위 클래스에서 super.viewDidLoad()를 호출하면 이 메서드들이 자동으로 호출된다. 따라서 하위 클래스에서 추가로 호출할 필요가 없다.
🧬 Code Graph Analysis (4)
Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift (1)
Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineTimePickerButton.swift (2)
configureAttribute(31-49)configureLayout(51-65)
Projects/Presentation/Sources/Common/Component/TooltipView.swift (1)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (2)
configureAttribute(100-184)configureLayout(186-366)
Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineTimePickerButton.swift (1)
Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift (2)
configureAttribute(31-49)configureLayout(51-65)
Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineCreationInputView.swift (1)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (2)
routineCreationInputViewDidTapDeleteButton(606-610)routineCreationInputView(612-621)
🪛 SwiftLint (0.57.0)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift
[Warning] 91-91: Remove overridden functions that don't do anything except call their super
(unneeded_override)
🔇 Additional comments (7)
Projects/Presentation/Resources/Images.xcassets/info_icon.imageset/Contents.json (1)
1-23: 애셋 카탈로그 구성이 올바릅니다.표준 Xcode 애셋 카탈로그 형식을 정확히 따르고 있으며, 1x/2x/3x 스케일 변형이 모두 포함되어 있습니다.
Projects/Presentation/Resources/Images.xcassets/routine_creation_icon.imageset/Contents.json (1)
1-23: 애셋 카탈로그 구성이 표준을 준수합니다.다른 아이콘 애셋과 일관된 구조를 가지고 있으며, 모든 필수 스케일 변형이 포함되어 있습니다.
Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift (2)
21-29: 프로젝트 패턴을 일관되게 따르고 있습니다.
configureAttribute()와configureLayout()메서드 분리, SnapKit 사용, fatalError 처리 등이 프로젝트의 다른 컴포넌트와 일관된 패턴을 보여줍니다.
31-49: 디자인 시스템 활용이 적절합니다.
BitnagilColor,BitnagilFont,BitnagilIcon등 프로젝트의 디자인 시스템을 일관되게 사용하고 있어 UI 통일성이 보장됩니다.Projects/Presentation/Sources/Common/DesignSystem/BitnagilIcon.swift (2)
40-43: 아이콘 그룹화가 잘 구성되었습니다.기존 아이콘들을 "Mypage Icons" 섹션으로 분류하여 코드 구조가 더 명확해졌습니다.
44-51: 루틴 생성 아이콘들이 체계적으로 추가되었습니다.새로운 아이콘들이 일관된 네이밍 컨벤션과 로딩 패턴을 따르고 있으며, 해당하는 애셋 카탈로그 파일들과도 잘 매칭됩니다.
Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineTimePickerButton.swift (1)
11-70: 구현이 깔끔하고 일관성 있게 작성되었습니다!컴포넌트가 프로젝트의 다른 UI 컴포넌트들과 일관된 패턴을 따르고 있으며, 레이아웃과 스타일링이 적절합니다.
| plusImageView.image = BitnagilIcon | ||
| .routineCreationIcon? | ||
| .withRenderingMode(.alwaysTemplate) |
There was a problem hiding this comment.
💡 Verification agent
🧩 Analysis chain
아이콘 선택의 의미적 적합성을 확인해주세요.
플러스 버튼에 routineCreationIcon을 사용하고 있는데, 이름상 루틴 생성 전체를 나타내는 아이콘으로 보입니다. 플러스 기능에는 더 적합한 아이콘(예: plusIcon)을 사용하는 것이 의미적으로 맞을 것 같습니다.
기존 디자인 시스템의 plusIcon이 사용 가능한지 확인해보세요:
🏁 Script executed:
#!/bin/bash
# 기존 plusIcon의 사용 현황과 routineCreationIcon의 의도된 용도 확인
rg -A 3 -B 3 "plusIcon"
echo "---"
rg -A 3 -B 3 "routineCreationIcon"Length of output: 9717
플러스 버튼에 범용 plusIcon 사용 권장
SubroutineAdditionButton의 플러스 아이콘으로 현재 routineCreationIcon이 사용되고 있는데, 이는 “루틴 생성”을 나타내는 전용 아이콘입니다. 다른 곳의 플러스 버튼(추천 루틴 카드, 감정 등록 버튼 등)에는 BitnagilIcon.plusIcon을 이미 사용하고 있으므로, 의미적 일관성과 재사용성을 위해 해당 버튼에도 plusIcon을 사용해주세요.
● 수정 위치
- Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift
- 라인 39–41
● 변경 전
plusImageView.image = BitnagilIcon
.routineCreationIcon?
.withRenderingMode(.alwaysTemplate)● 변경 후
plusImageView.image = BitnagilIcon
.plusIcon?
.withRenderingMode(.alwaysTemplate)🤖 Prompt for AI Agents
In
Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift
at lines 39 to 41, replace the current icon assignment from
BitnagilIcon.routineCreationIcon to BitnagilIcon.plusIcon for the
plusImageView.image property. This change ensures semantic consistency and
reusability by using the general plusIcon instead of the routineCreationIcon
specific to routine creation. Keep the withRenderingMode(.alwaysTemplate) call
as is.
choijungp
left a comment
There was a problem hiding this comment.
-
DatePicker 분리
요 부분은 VC를 분리해서 Custom Bottom Sheet를 사용하는 것 완전 조아요 !!!
그르케 한다고 해도 DatePicker 사용할 수 있겠죠 ?? -
TooltipView
매우매우매우매우매우매우매우 감사합니다 _ _ 꾸벅 !!!!!!!!!!
| import UIKit | ||
|
|
||
| final class RoutineCreationView: BaseViewController<RoutineCreationViewModel> { | ||
| enum Layout { |
There was a problem hiding this comment.
요 Layout enum private으로 하는건 어떠신지 ~~~
| static let asteriskIcon = UIImage(named: "asterisk_icon", in: bundle, with: nil) | ||
| static let chevronDownIcon = UIImage(named: "chevron_down_icon", in: bundle, with: nil) | ||
| static let deleteIcon = UIImage(named: "delete_icon", in: bundle, with: nil) | ||
| static let infoIcon = UIImage(named: "info_icon", in: bundle, with: nil) | ||
| static let uncheckedIcon = UIImage(named: "unchecked_icon", in: bundle, with: nil) | ||
| static let checkedIcon = UIImage(named: "checked_icon", in: bundle, with: nil) | ||
| static let routineCreationIcon = UIImage(named: "routine_creation_icon", in: bundle, with: nil) |
There was a problem hiding this comment.
여기서 infoIcon은 현재 informaitonIcon과 중복이 될 것 같아요 !!!
흠 그리고 ... 약간 고민 + 궁굼한 부분이 몇개 있어요 !!
- asteriskIcon를 왜 이미지로 빼셨는지 !! > 피그마 상에는 Label로 처리해도 됐었을 것 같긴합니다 !!!
- chevronIcon도 사실 전 하나의 이미지 파일만 포함한 채,
chevronIcon(direction: Direction)함수를 통해서 방향을 바꿀 수 있을 것이라고 생각해서 구현해두었는데 !!
띵의 입장에서는 chevronDownIcon, chevronRightIcon 등 방향에 각각 맞는 아이콘이 있는게 맞다고 생각하시나요 ? - routineCreationIcon도 plusIcon과 동일하다고 생각하긴 하는데 어찌 생각하시나요 ?
- uncheckedIcon와 checkedIcon를 이미지로 뺀 이유도 궁금합니다 !!! > 만약 저였다면 체크 아이콘만 존재시키고 View로 구현해서 toggle 값에 따라 아이콘, 배경색을 바꾸면서 구현할 것 같아서 여쭤봅니다아 !!
There was a problem hiding this comment.
-
information icon은 중복 수정하겠습니다~!
-
asterisk가 피그마에 보시면 label에 표시되는 글보다 살~짝 위에 표시되어 있습니다. 처음에는 한 개의 label안에서 일반 text + attributed text로 처리하려했는데요, 앞서 말씀드린 이유로 '*' 를 이미지로 따로 빼서 처리하고자 했습니다. 다만 조이 말씀을 듣고 보니 그냥 UILabel 두 개로 처리하면 되는 문제였네요.!.! 혹시 이 부분은 이대로 가져가도 될까요?
-
chevronIcon 자체를 회전 시켜서 사용하겠다는 말씀이신가요? 꺾인 각도와, 선의 길이가 모두 같으면 이미지 하나로 direction을 부여해서 처리하는 방식도 좋은 것 같습니다.
-
홈 화면에서 사용되는 + 아이콘 말씀이시라면, 굵기가 미세하게 다릅니다! 홈 화면의 + 아이콘은 2px, 루틴 생성의 + 아이콘은 1.4px로 차이가 있어서 새로운 asset을 추가했습니다!
-
체크 아이콘만 넣어두고, unchecked 시에는 cornerRadius 값과 배경색으로 구현할 수 있지만, 구현의 편의성을 위해 checked 아이콘을 asset에 추가했습니다!
There was a problem hiding this comment.
- 확인 !!!!!!!!!!!
- 화긴 !!! 일단 노메러 ~~~ (추후 시간 많을때 수정 ...... .. 데스노트에 적어두겟슴)
- 이것도 일단 내비두고 ~ 같이 췍 해보고 ... 같으면 direction하는것으로 !!!
- 헐 굵기 차이 확인 레존드다 ....
- 이것두 화긴 ~~ 사실 ~ 일단 개발이 급하니까 ....... 이미지도 accept !!!!
하지만 추후 리팩토링의 기회가 주어진다며는 ... 이것도 같이 고민해보는것이 어떠신지 !!!
There was a problem hiding this comment.
죠습니다!! 마크2에서 고려하고 수정하는 걸로~!
| label.font = BitnagilFont | ||
| .init(style: .body2, weight: .medium) | ||
| .font | ||
| .withSize(14) |
There was a problem hiding this comment.
요 withSize가 필요한 이유가 무엇인지 궁금합니다 !!!
BitnagilFont에서 style 지정해주면 그에 따른 폰트 사이즈를 맞춰놓긴 했어용 .. !! (FontSize.swift)
There was a problem hiding this comment.
헉 저는 size 지정을 해줘야 원하는 크기로 나오는 줄 알았습니다.. 제가 착각했나봐요!! 확인 후 수정하겠습니다!
| nameInputView.configure( | ||
| canDelete: false, | ||
| placeholder: "ex) \(RoutineCreationViewModel.RoutineExample.wakeUp.rawValue)") |
There was a problem hiding this comment.
하아아아아아아 ... 로직 파악을 10000% 하진 못했는데요 ㅠ ㅠ
ex) 전에 숫자가 포함되잖아요 ... (1. ex) 세수하기)
요 숫자 포함되는 로직이 어디있을까요 .... 찾고 싶은 이유는 숫자와 ex) 사이 띄어쓰기를 하구싶음
| .enumerated() | ||
| .forEach { | ||
| let view = RoutineCreationInputView() | ||
| let placeholder = "\($0.offset + 1).ex) \($0.element.rawValue)" |
There was a problem hiding this comment.
아싸 !!!!!! 찾았다 !!!!!!!! 요기군요 ㅋ.ㅋ !!! 여기 띄어쓰기 1번 해주는것이 어떤지 ??
| let placeholder = "\($0.offset + 1).ex) \($0.element.rawValue)" | |
| let placeholder = "\($0.offset + 1) .ex) \($0.element.rawValue)" |
| private func configureWeekdaysStackView() { | ||
| weekdaysStackView.isHidden = true | ||
| weekdaysStackView.axis = .horizontal | ||
| weekdaysStackView.spacing = 10 |
There was a problem hiding this comment.
요 10 도 Layout enum에 넣어주는건 어떠신지요 ???
|
흐얼 근데 ... 루동도 굉장히 빡센 녀석이었네요 ......... 띵 진짜 진짜 고생하셨어요 ㅠ.ㅠ !!!!! |
|
@choijungp 06e2b5c 에서 asterisk, plus 이미지 관련 제외하고 반영해두었습니다! |
There was a problem hiding this comment.
Actionable comments posted: 1
♻️ Duplicate comments (1)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (1)
13-47: Layout enum을 private으로 변경해주세요.이전 리뷰 댓글에서 언급된 것처럼, Layout enum은 이 클래스 내부에서만 사용되므로 private 접근 제어자를 추가하는 것이 좋겠습니다.
- enum Layout { + private enum Layout {
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
Projects/Presentation/Resources/Images.xcassets/chevron_right_icon.imageset/chevron_right_icon@1x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/chevron_right_icon.imageset/chevron_right_icon@2x.pngis excluded by!**/*.pngProjects/Presentation/Resources/Images.xcassets/chevron_right_icon.imageset/chevron_right_icon@3x.pngis excluded by!**/*.png
📒 Files selected for processing (7)
Projects/Presentation/Sources/Common/Component/TooltipView.swift(1 hunks)Projects/Presentation/Sources/Common/DesignSystem/BitnagilIcon.swift(1 hunks)Projects/Presentation/Sources/MyPage/View/Component/MypageTableViewCell.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineCreationInputView.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineTimePickerButton.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift(1 hunks)Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift(1 hunks)
✅ Files skipped from review due to trivial changes (1)
- Projects/Presentation/Sources/MyPage/View/Component/MypageTableViewCell.swift
🚧 Files skipped from review as they are similar to previous changes (5)
- Projects/Presentation/Sources/Common/DesignSystem/BitnagilIcon.swift
- Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineTimePickerButton.swift
- Projects/Presentation/Sources/Common/Component/TooltipView.swift
- Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift
- Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineCreationInputView.swift
🧰 Additional context used
🧠 Learnings (1)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (4)
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Onboarding/View/OnboardingRecommendedRoutineView.swift:57-59
Timestamp: 2025-07-16T09:21:15.038Z
Learning: OnboardingRecommendedRoutineView에서 viewWillAppear에 registerOnboarding 호출하는 것이 적절한 이유: 사용자가 이전 페이지에서 온보딩 선택지를 변경한 후 돌아올 때 새로운 선택지로 다시 등록해야 하기 때문. 홈 뷰에서는 이 뷰로 돌아올 수 없어서 중복 호출 문제가 발생하지 않음.
Learnt from: taipaise
PR: #25
File: Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineCreationInputView.swift:104-111
Timestamp: 2025-07-27T10:05:46.012Z
Learning: RoutineCreationInputView에서 textField(_:shouldChangeCharactersIn:replacementString:) 메서드가 변경 전 텍스트를 delegate에 전달하는 이유: 변경된 텍스트를 전달하면 텍스트 입력 중에 다른 UI 액션(예: 서브루틴 추가)이 발생할 때 입력 중이던 텍스트가 손실되는 문제가 발생하기 때문. 이는 의도적인 구현으로 동시성 문제를 방지함.
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Login/View/TermsAgreementView.swift:44-46
Timestamp: 2025-07-16T09:09:13.869Z
Learning: BaseViewController의 viewDidLoad() 메서드에서 이미 configureAttribute(), configureLayout(), bind()를 호출하므로, 하위 클래스에서 super.viewDidLoad()를 호출하면 이 메서드들이 자동으로 호출된다. 따라서 하위 클래스에서 추가로 호출할 필요가 없다.
Learnt from: choijungp
PR: #19
File: Projects/Presentation/Sources/Login/View/TermsAgreementView.swift:44-46
Timestamp: 2025-07-16T09:09:13.869Z
Learning: BaseViewController의 viewDidLoad() 메서드에서 이미 configureAttribute(), configureLayout(), bind()를 호출하므로, 하위 클래스에서 super.viewDidLoad()를 호출하면 이 메서드들이 자동으로 호출된다. 따라서 하위 클래스에서 추가로 호출할 필요가 없다.
🧬 Code Graph Analysis (1)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (6)
Projects/Presentation/Sources/Common/Extension/UIViewController+.swift (1)
configureNavigationBar(12-32)Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineCreationInputView.swift (4)
configureAttribute(44-58)configure(78-91)configure(93-95)configureLayout(60-76)Projects/Presentation/Sources/Common/Component/TooltipView.swift (5)
configureAttribute(46-51)configure(67-69)configureLayout(53-65)showTooltip(100-116)hideTooltip(118-131)Projects/Presentation/Sources/RoutineCreation/View/Component/RoutineTimePickerButton.swift (3)
configureAttribute(31-46)configure(64-66)configureLayout(48-62)Projects/Presentation/Sources/RoutineCreation/View/Component/SubroutineAdditionButton.swift (2)
configureAttribute(31-46)configureLayout(48-62)Projects/Presentation/Sources/RoutineCreation/ViewModel/RoutineCreationViewModel.swift (4)
addSubRoutine(107-113)configureRepeatType(137-148)deleteSubRoutine(115-124)configureName(103-105)
🪛 SwiftLint (0.57.0)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift
[Warning] 91-91: Remove overridden functions that don't do anything except call their super
(unneeded_override)
🔇 Additional comments (5)
Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift (5)
100-175: UI 속성 구성이 잘 되어 있습니다.일관된 스타일링과 깔끔한 코드 구조로 UI 요소들을 적절히 구성했습니다. forEach를 활용한 반복 요소 처리도 좋습니다.
177-356: 레이아웃 구성이 체계적으로 잘 되어 있습니다.SnapKit을 활용한 제약 조건 설정이 명확하고, 동적 레이아웃 업데이트를 위한 constraint 참조도 적절히 구현되어 있습니다.
358-458: 반응형 데이터 바인딩이 잘 구현되어 있습니다.Combine을 활용한 뷰모델 바인딩이 적절하고, 메인 스레드에서 UI 업데이트를 처리하며 weak self를 통한 메모리 누수 방지도 잘 되어 있습니다.
460-563: 버튼 액션과 동적 UI 구성이 잘 구현되어 있습니다.UIAction을 활용한 버튼 액션 설정과 weak self 참조, 동적 스택뷰 구성이 적절히 처리되어 있습니다.
565-610: 제스처 처리와 델리게이트 구현이 잘 되어 있습니다.툴팁 표시/숨김을 위한 탭 제스처 처리 로직이 복잡한 요구사항을 잘 처리하고 있으며, 델리게이트 메서드도 적절히 구현되어 있습니다.
| override func viewDidLoad() { | ||
| super.viewDidLoad() | ||
| } |
There was a problem hiding this comment.
불필요한 viewDidLoad 오버라이드를 제거해주세요.
이 메서드는 super.viewDidLoad()만 호출하고 추가 기능이 없으므로 제거할 수 있습니다. BaseViewController에서 이미 필요한 설정 메서드들을 호출하고 있습니다.
- override func viewDidLoad() {
- super.viewDidLoad()
- }📝 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.
| override func viewDidLoad() { | |
| super.viewDidLoad() | |
| } |
🧰 Tools
🪛 SwiftLint (0.57.0)
[Warning] 91-91: Remove overridden functions that don't do anything except call their super
(unneeded_override)
🤖 Prompt for AI Agents
In Projects/Presentation/Sources/RoutineCreation/View/RoutineCreationView.swift
at lines 91 to 93, the viewDidLoad method is overridden but only calls
super.viewDidLoad() without adding any functionality. Remove this entire
viewDidLoad override to clean up the code, as the BaseViewController already
handles necessary setup.
06e2b5c to
286a35d
Compare
choijungp
left a comment
There was a problem hiding this comment.
띵푸루부 !!! 완존 고생하셨습니딩 ~~ 동 !!! 😇
🌁 Background
📱 Screenshot
👩💻 Contents
우선 작업 속도 + 원기옥 PR에 대해 사과의 말씀을 올립니다..
생각보다 RoutineCreationView에 들어가는 요소가 많아서 pr의 규모가 커졌습니다.!.!
로직은 없고,UI 구조라 슥 흝어주시면 감사하겠습니다!
📝 Review Note
1. DatePicker의 분리
처음 구상에서는 시간을 선택할 때 나오는 DatePicker를 RoutineCreationVC에 포함시키려 했는데요, 디자인 요구사항을 반영하기 위해서 조이가 구현한 Custom Bottom Sheet를 활용하는게 낫다고 판단했습니다. 따라서 날짜를 선택할 수 있는 VC가 따로 나올 것 같은데요(구현 예저정), 조이가 생각하기에 VC로 분리해 bottom Sheet로 띄우는 방식 괜찮을까요?
2. TooltipView
GIF에는 사라지는 장면이 뚝뚝 끊기는 것처럼 보이지만, 실제로는 굉장히 부드럽게 작동하니 걱정하지 않으셔도 됩니다!
생성자에서 Tooltip의 말풍선 꼬리 위치를 설정할 수 있도록 구현했습니다.
tooltipView의 leading에서 n 포인트만큼 떨어진 위치에 꼬리를 위치하고 싶으시다면
TooltipView.offsetFromLeading을 통해 원하는 꼬리의 위치를 설정해 초기화해주시면 됩니다!말풍선 꼬리를 중앙 정렬하시려면
.center로 초기화해주시면 됩니다.ToolTipView 자체의
isHidden값을 설정함으로써 애니메이션 없이 툴팁을 보였다 숨겼다도 할 수 있지만,부드럽게 보였다/사라졌다 할 수 있게 함수
showTooltip()과hideTooltip()을 구현했습니다.📬 Reference
Summary by CodeRabbit
신규 기능
버그 수정