feat: 설정 화면에 액션 연결#102
Conversation
(cherry picked from commit f565c76)
(cherry picked from commit d03a2e1)
(cherry picked from commit 4c91572)
(cherry picked from commit e484fdb)
(cherry picked from commit ee83b84)
(cherry picked from commit f2df487)
…Group (cherry picked from commit 1bb7bcb)
…ttom sheet (cherry picked from commit b8afd52)
(cherry picked from commit 04081f4)
…protocol (cherry picked from commit 506d9a4)
(cherry picked from commit 7ebe093)
(cherry picked from commit 0b99a11)
(cherry picked from commit 23ec72e)
(cherry picked from commit aa829c3)
…n logic (cherry picked from commit 7df90d6)
|
""" Walkthrough이번 변경은 설정 화면에서 로그아웃 및 회원탈퇴 기능을 구현하고, 관련 다이얼로그 및 시트를 연결합니다. BottomSheet 컴포넌트의 suppliedContent 처리 방식이 enum 기반으로 구조화되었으며, 체크박스와 라벨을 결합한 신규 UI 컴포넌트가 추가되었습니다. Coordinator 계층에는 세션 만료 알림 및 처리 프로토콜이 도입되어 플로우 간 세션 만료 전파가 가능해졌습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant SettingView
participant SettingViewController
participant SettingViewModel
participant Coordinator
User->>SettingView: 로그아웃 버튼 탭
SettingView->>SettingViewController: eventPublisher(.logoutTapped)
SettingViewController->>SettingViewController: presentLogoutDialog()
User->>SettingViewController: 다이얼로그에서 "로그아웃" 선택
SettingViewController->>SettingViewModel: send(.logoutButtonTapped)
SettingViewModel->>SettingViewModel: reduce(.logoutButtonTapped) → .logout side effect
SettingViewModel->>SettingViewModel: handle(.logout) → logoutUseCase.execute()
SettingViewModel->>SettingViewModel: onSuccess: send(.logoutSuccessed)
SettingViewModel->>SettingViewModel: state.isLoggedOut = true
SettingViewModel->>SettingViewController: state 업데이트
SettingViewController->>Coordinator: 세션 만료 알림 (handleSessionExpired)
Coordinator->>Coordinator: 플로우 종료 및 AuthFlow 진입
Estimated code review effort4 (~90분) Possibly related PRs
Suggested labels
Suggested reviewers
📜 Recent review detailsConfiguration used: .coderabbit.yaml 📒 Files selected for processing (2)
🚧 Files skipped from review as they are similar to previous changes (2)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
✨ 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: 2
🔭 Outside diff range comments (2)
src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift (2)
81-86:primaryButton참조 정리 필요버튼이 제거될 때
primaryButton참조가 남아있을 수 있습니다. 제거되는 버튼이primaryButton인 경우 nil로 설정해야 합니다.public func removeButton(_ button: BKButton) { if let index = buttons.firstIndex(of: button) { buttons.remove(at: index) + if button === primaryButton { + primaryButton = nil + } updateButtons() } }
92-95: 모든 버튼 제거 시primaryButton초기화 필요모든 버튼이 제거될 때
primaryButton참조도 함께 정리되어야 합니다.public func removeAllButtons() { buttons.removeAll() + primaryButton = nil updateButtons() }
🧹 Nitpick comments (2)
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingViewController.swift (1)
114-117: 회원 탈퇴 기능 구현 필요회원 탈퇴 확인 시 실제 액션이 주석 처리되어 있습니다. 향후 구현이 필요함을 명시하는 것이 좋습니다.
confirmAction: { [weak self] in Log.debug("[WithdrawalSheet] confirmed", logger: AppLogger.ui) + // TODO: 회원 탈퇴 기능 구현 필요 // self?.viewModel.send() }src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (1)
273-284: 비율 계산 로직에서 타입 캐스팅을 개선해보세요.
UIImageView로의 타입 캐스팅이 하드코딩되어 있습니다. 향후 다른 타입의 뷰에서도 비율 계산이 필요할 수 있으니, 프로토콜 기반 접근을 고려해보세요.다음과 같은 프로토콜 기반 접근을 제안합니다:
protocol AspectRatioProvider { var aspectRatio: CGFloat? { get } } extension UIImageView: AspectRatioProvider { var aspectRatio: CGFloat? { guard let image = image else { return nil } return image.size.height / image.size.width } }이후
calculateRatioIfNeeded에서:if let aspectRatioProvider = view as? AspectRatioProvider { contentAspectRatio = aspectRatioProvider.aspectRatio }
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (18)
src/Projects/BKDesign/PreviewApp/Sources/View/BKBottomSheetTestMenuViewController.swift(2 hunks)src/Projects/BKDesign/Sources/Components/BKCheckBox.swift(1 hunks)src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetStyle.swift(0 hunks)src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetTitleView.swift(1 hunks)src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift(9 hunks)src/Projects/BKDesign/Sources/Components/BottomSheet/SuppliedContentStyle.swift(1 hunks)src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift(4 hunks)src/Projects/BKDesign/Sources/Components/Label/BKCheckBoxLabel.swift(1 hunks)src/Projects/BKPresentation/Sources/AppCoordinator.swift(1 hunks)src/Projects/BKPresentation/Sources/Common/Coordinator/Coordinator.swift(1 hunks)src/Projects/BKPresentation/Sources/Common/Coordinator/SessionExpiredHandling.swift(1 hunks)src/Projects/BKPresentation/Sources/Common/Coordinator/SessionExpiredNotifying.swift(1 hunks)src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift(2 hunks)src/Projects/BKPresentation/Sources/MainFlow/Setting/Coordinator/SettingCoordinator.swift(1 hunks)src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingCell.swift(2 hunks)src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingView.swift(3 hunks)src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingViewController.swift(4 hunks)src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift(4 hunks)
🧠 Learnings (13)
📓 Common learnings
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:34-35
Timestamp: 2025-07-11T12:13:49.406Z
Learning: clxxrlove prefers to comment out incomplete features in SettingViewModel (like logout and withdrawal functionality) rather than removing them entirely, keeping the architecture ready for future implementation. This approach allows for easier connection of functionality when ready to implement.
Learnt from: doyeonk429
PR: YAPP-Github/Reed-iOS#63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#56
File: src/Projects/BKPresentation/Sources/Constant/PresentationKeys.swift:3-5
Timestamp: 2025-07-07T13:53:13.006Z
Learning: clxxrlove prefers using enum over struct for constants namespace due to better runtime performance, memory layout, and compiler optimizations. Enum prevents instantiation at compile time without needing private init().
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#94
File: src/Projects/BKData/Sources/Repository/DefaultBookRepository.swift:15-40
Timestamp: 2025-07-21T05:16:18.481Z
Learning: clxxrlove는 Reed-iOS 프로젝트에서 기능 구현 시 우선순위를 명확하게 설정한다. 기본 기능 구현을 먼저 완료하고, 에러 처리나 안정성 개선은 이후 단계에서 진행하는 것을 선호한다.
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingView.swift (1)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingCell.swift (1)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.
src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift (3)
Learnt from: clxxrlove
PR: #79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:34-35
Timestamp: 2025-07-11T12:13:49.406Z
Learning: clxxrlove prefers to comment out incomplete features in SettingViewModel (like logout and withdrawal functionality) rather than removing them entirely, keeping the architecture ready for future implementation. This approach allows for easier connection of functionality when ready to implement.
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
Learnt from: clxxrlove
PR: #79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:78-85
Timestamp: 2025-07-11T12:12:48.911Z
Learning: AppVersionUseCase.execute() returns AnyPublisher<String, Never> where the Failure type is Never, making error handling unnecessary. The app version is retrieved from the main bundle which is always available, and the implementation already handles missing version by defaulting to "-".
src/Projects/BKDesign/Sources/Components/BottomSheet/SuppliedContentStyle.swift (2)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
src/Projects/BKDesign/Sources/Components/BKCheckBox.swift (2)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Resources/Assets.xcassets/chevron-right.imageset/Contents.json:1-26
Timestamp: 2025-07-08T17:15:59.793Z
Learning: In the BKDesign project, all image assets referenced in Contents.json files are properly included in the repository with the correct 1x, 2x, and 3x variants. The chevron-right icon and other design system icons are complete and ready for use.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (1)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingViewController.swift (5)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
Learnt from: clxxrlove
PR: #79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:34-35
Timestamp: 2025-07-11T12:13:49.406Z
Learning: clxxrlove prefers to comment out incomplete features in SettingViewModel (like logout and withdrawal functionality) rather than removing them entirely, keeping the architecture ready for future implementation. This approach allows for easier connection of functionality when ready to implement.
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Resources/Assets.xcassets/chevron-right.imageset/Contents.json:1-26
Timestamp: 2025-07-08T17:15:59.793Z
Learning: In the BKDesign project, all image assets referenced in Contents.json files are properly included in the repository with the correct 1x, 2x, and 3x variants. The chevron-right icon and other design system icons are complete and ready for use.
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
src/Projects/BKDesign/PreviewApp/Sources/View/BKBottomSheetTestMenuViewController.swift (2)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (3)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
Learnt from: doyeonk429
PR: #68
File: src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift:86-92
Timestamp: 2025-07-10T08:21:16.126Z
Learning: BKButtonGroup의 horizontal 레이아웃에서 stackView.distribution을 .fillProportionally로 설정한 것은 의도된 디자인입니다. doyeonk429는 버튼들이 콘텐츠 길이에 따라 다른 너비를 가지는 것을 선호합니다.
src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift (1)
Learnt from: doyeonk429
PR: #68
File: src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift:86-92
Timestamp: 2025-07-10T08:21:16.126Z
Learning: BKButtonGroup의 horizontal 레이아웃에서 stackView.distribution을 .fillProportionally로 설정한 것은 의도된 디자인입니다. doyeonk429는 버튼들이 콘텐츠 길이에 따라 다른 너비를 가지는 것을 선호합니다.
src/Projects/BKPresentation/Sources/AppCoordinator.swift (1)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetTitleView.swift (2)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
🧬 Code Graph Analysis (8)
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingView.swift (1)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
bkBaseColor(91-102)
src/Projects/BKPresentation/Sources/Common/Coordinator/SessionExpiredNotifying.swift (2)
src/Projects/BKPresentation/Sources/Common/Coordinator/Coordinator.swift (1)
firstAncestor(62-71)src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (1)
handleSessionExpired(28-31)
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingCell.swift (1)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
bkBaseColor(91-102)
src/Projects/BKDesign/Sources/Components/Label/BKCheckBoxLabel.swift (1)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
bkContentColor(52-63)
src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift (1)
src/Projects/BKData/Sources/Repository/DefaultAuthRepository.swift (1)
logout(54-69)
src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (1)
src/Projects/BKPresentation/Sources/Common/Coordinator/Coordinator.swift (1)
didFinish(18-25)
src/Projects/BKPresentation/Sources/Common/Coordinator/SessionExpiredHandling.swift (1)
src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (1)
handleSessionExpired(28-31)
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (1)
src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift (2)
twoButtonGroup(140-160)setPrimaryButtonState(88-90)
🪛 SwiftLint (0.57.0)
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingViewController.swift
[Warning] 75-75: Unused parameter in a closure should be replaced with _
(unused_closure_parameter)
💤 Files with no reviewable changes (1)
- src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetStyle.swift
🧰 Additional context used
🧠 Learnings (13)
📓 Common learnings
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:34-35
Timestamp: 2025-07-11T12:13:49.406Z
Learning: clxxrlove prefers to comment out incomplete features in SettingViewModel (like logout and withdrawal functionality) rather than removing them entirely, keeping the architecture ready for future implementation. This approach allows for easier connection of functionality when ready to implement.
Learnt from: doyeonk429
PR: YAPP-Github/Reed-iOS#63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#56
File: src/Projects/BKPresentation/Sources/Constant/PresentationKeys.swift:3-5
Timestamp: 2025-07-07T13:53:13.006Z
Learning: clxxrlove prefers using enum over struct for constants namespace due to better runtime performance, memory layout, and compiler optimizations. Enum prevents instantiation at compile time without needing private init().
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#94
File: src/Projects/BKData/Sources/Repository/DefaultBookRepository.swift:15-40
Timestamp: 2025-07-21T05:16:18.481Z
Learning: clxxrlove는 Reed-iOS 프로젝트에서 기능 구현 시 우선순위를 명확하게 설정한다. 기본 기능 구현을 먼저 완료하고, 에러 처리나 안정성 개선은 이후 단계에서 진행하는 것을 선호한다.
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingView.swift (1)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingCell.swift (1)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.
src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift (3)
Learnt from: clxxrlove
PR: #79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:34-35
Timestamp: 2025-07-11T12:13:49.406Z
Learning: clxxrlove prefers to comment out incomplete features in SettingViewModel (like logout and withdrawal functionality) rather than removing them entirely, keeping the architecture ready for future implementation. This approach allows for easier connection of functionality when ready to implement.
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
Learnt from: clxxrlove
PR: #79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:78-85
Timestamp: 2025-07-11T12:12:48.911Z
Learning: AppVersionUseCase.execute() returns AnyPublisher<String, Never> where the Failure type is Never, making error handling unnecessary. The app version is retrieved from the main bundle which is always available, and the implementation already handles missing version by defaulting to "-".
src/Projects/BKDesign/Sources/Components/BottomSheet/SuppliedContentStyle.swift (2)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
src/Projects/BKDesign/Sources/Components/BKCheckBox.swift (2)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Resources/Assets.xcassets/chevron-right.imageset/Contents.json:1-26
Timestamp: 2025-07-08T17:15:59.793Z
Learning: In the BKDesign project, all image assets referenced in Contents.json files are properly included in the repository with the correct 1x, 2x, and 3x variants. The chevron-right icon and other design system icons are complete and ready for use.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (1)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingViewController.swift (5)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
Learnt from: clxxrlove
PR: #79
File: src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift:34-35
Timestamp: 2025-07-11T12:13:49.406Z
Learning: clxxrlove prefers to comment out incomplete features in SettingViewModel (like logout and withdrawal functionality) rather than removing them entirely, keeping the architecture ready for future implementation. This approach allows for easier connection of functionality when ready to implement.
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Extensions/UIColor+.swift:50-92
Timestamp: 2025-07-08T17:17:37.703Z
Learning: BKDesign 프로젝트에서 UIColor+ 확장의 시맨틱 컬러 메서드들(.bkContentColor, .bkBorderColor, .bkDividerColor, .bkBaseColor)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Resources/Assets.xcassets/chevron-right.imageset/Contents.json:1-26
Timestamp: 2025-07-08T17:15:59.793Z
Learning: In the BKDesign project, all image assets referenced in Contents.json files are properly included in the repository with the correct 1x, 2x, and 3x variants. The chevron-right icon and other design system icons are complete and ready for use.
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
src/Projects/BKDesign/PreviewApp/Sources/View/BKBottomSheetTestMenuViewController.swift (2)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (3)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
Learnt from: doyeonk429
PR: #68
File: src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift:86-92
Timestamp: 2025-07-10T08:21:16.126Z
Learning: BKButtonGroup의 horizontal 레이아웃에서 stackView.distribution을 .fillProportionally로 설정한 것은 의도된 디자인입니다. doyeonk429는 버튼들이 콘텐츠 길이에 따라 다른 너비를 가지는 것을 선호합니다.
src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift (1)
Learnt from: doyeonk429
PR: #68
File: src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift:86-92
Timestamp: 2025-07-10T08:21:16.126Z
Learning: BKButtonGroup의 horizontal 레이아웃에서 stackView.distribution을 .fillProportionally로 설정한 것은 의도된 디자인입니다. doyeonk429는 버튼들이 콘텐츠 길이에 따라 다른 너비를 가지는 것을 선호합니다.
src/Projects/BKPresentation/Sources/AppCoordinator.swift (1)
Learnt from: clxxrlove
PR: #56
File: src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift:109-111
Timestamp: 2025-07-07T13:47:32.784Z
Learning: The LoginViewModel's authenticateWithToken case in src/Projects/BKPresentation/Sources/AuthFlow/ViewModel/LoginViewModel.swift is test code and not important for implementation according to the user.
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetTitleView.swift (2)
Learnt from: doyeonk429
PR: #63
File: src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BottomSheetShadow.swift:5-10
Timestamp: 2025-07-08T17:16:15.942Z
Learning: doyeonk429는 BottomSheetShadow struct에서 apply(to:)와 asCALayerShadow() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
Learnt from: clxxrlove
PR: #80
File: src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift:148-148
Timestamp: 2025-07-14T05:23:04.937Z
Learning: Reed-iOS 프로젝트의 BKBottomSheetViewController에서 버튼 영역 높이(84)는 디자인 시스템에 기반한 의도적인 고정값입니다. clxxrlove에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
🧬 Code Graph Analysis (8)
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingView.swift (1)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
bkBaseColor(91-102)
src/Projects/BKPresentation/Sources/Common/Coordinator/SessionExpiredNotifying.swift (2)
src/Projects/BKPresentation/Sources/Common/Coordinator/Coordinator.swift (1)
firstAncestor(62-71)src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (1)
handleSessionExpired(28-31)
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingCell.swift (1)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
bkBaseColor(91-102)
src/Projects/BKDesign/Sources/Components/Label/BKCheckBoxLabel.swift (1)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
bkContentColor(52-63)
src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift (1)
src/Projects/BKData/Sources/Repository/DefaultAuthRepository.swift (1)
logout(54-69)
src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (1)
src/Projects/BKPresentation/Sources/Common/Coordinator/Coordinator.swift (1)
didFinish(18-25)
src/Projects/BKPresentation/Sources/Common/Coordinator/SessionExpiredHandling.swift (1)
src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (1)
handleSessionExpired(28-31)
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (1)
src/Projects/BKDesign/Sources/Components/Button/BKButtonGroup.swift (2)
twoButtonGroup(140-160)setPrimaryButtonState(88-90)
🪛 SwiftLint (0.57.0)
src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingViewController.swift
[Warning] 75-75: Unused parameter in a closure should be replaced with _
(unused_closure_parameter)
🔇 Additional comments (26)
src/Projects/BKDesign/Sources/Components/BottomSheet/SuppliedContentStyle.swift (1)
5-8: 깔끔한 enum 설계입니다.
SuppliedContentStyleenum이 BottomSheet 내 콘텐츠 위치를 명확하게 구분하고 있습니다. Associated value로 UIView를 포함하는 설계가 적절하며, upper/lower 케이스 명명이 직관적입니다.src/Projects/BKPresentation/Sources/MainFlow/Setting/Coordinator/SettingCoordinator.swift (1)
5-5: 세션 만료 알림 프로토콜 추가가 적절합니다.
SessionExpirationNotifying프로토콜 conformance 추가로 설정 화면에서 세션 만료 이벤트를 상위 coordinator로 전파할 수 있게 되었습니다. 기존 코드에 영향 없이 깔끔하게 통합되었습니다.src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingView.swift (3)
57-57: 코드 포매팅 개선입니다.
footerMode할당의 spacing이 일관성 있게 정리되었습니다.
59-59: 시맨틱 컬러 사용으로 일관된 UI 적용.
backgroundColor를.bkBaseColor(.primary)로 설정하여 디자인 시스템의 시맨틱 컬러를 활용하고 있습니다. 향후 다크 모드 지원 시에도 일관된 테마 적용이 가능합니다.Also applies to: 82-82
130-130: 셀 하이라이트 활성화로 사용자 경험 개선.
shouldHighlightItemAt이true를 반환하도록 변경되어 셀 선택 시 적절한 시각적 피드백을 제공합니다.src/Projects/BKPresentation/Sources/Common/Coordinator/SessionExpiredHandling.swift (1)
3-7: 세션 만료 처리를 위한 명확한 프로토콜 정의.프로토콜 설계가 단순하고 명확합니다. 한국어 주석으로 사용 제약 조건(Flow 시작점에서만 사용)을 잘 설명하고 있으며,
AnyObject제약으로 reference semantics를 보장합니다.src/Projects/BKPresentation/Sources/AppCoordinator.swift (1)
58-60: 메인 플로우 완료 후 인증 플로우로의 전환 설정.
mainFlowCoordinator.onFinish클로저를 통해 메인 플로우 종료 시 자동으로 인증 플로우로 전환하도록 구현되었습니다. 세션 만료나 로그아웃 시의 플로우 전환을 완성하는 중요한 부분입니다.src/Projects/BKPresentation/Sources/Common/Coordinator/Coordinator.swift (1)
62-71: 잘 구현된 제네릭 계층 탐색 메서드입니다.코디네이터 계층을 상위로 탐색하여 특정 타입의 첫 번째 조상을 찾는 로직이 올바르게 구현되었습니다. 세션 만료 알림 메커니즘에서 활용될 것으로 보이며, 제네릭을 사용하여 재사용성도 높았습니다.
src/Projects/BKDesign/PreviewApp/Sources/View/BKBottomSheetTestMenuViewController.swift (2)
129-129: 새로운 suppliedContentStyle API 적용이 올바릅니다.이미지를 타이틀 위쪽에 배치하는
.upper(image)스타일을 올바르게 사용했습니다.
157-167: 다양한 케이스를 테스트하는 좋은 예시입니다.멀티라인 문자열과
.lower(image)스타일을 사용하여 텍스트 래핑과 이미지 하단 배치를 함께 테스트하는 것이 좋습니다. 엣지 케이스까지 고려한 구현입니다.src/Projects/BKDesign/Sources/Components/BKCheckBox.swift (1)
47-53: 명시적 크기 제약을 통한 일관된 레이아웃 관리입니다.
intrinsicContentSize대신 명시적 크기 제약을 사용하여 더 예측 가능한 레이아웃 동작을 제공합니다. 새로운BKCheckBoxLabel컴포넌트와의 통합에도 유리한 접근 방식입니다.src/Projects/BKPresentation/Sources/MainFlow/MainFlowCoordinator.swift (2)
6-10: FinishNotifying 프로토콜 채택으로 플로우 완료 알림 지원이 추가되었습니다.
onFinish클로저를 통해 MainFlow가 종료될 때 상위 코디네이터(AppCoordinator)에게 알릴 수 있게 되었습니다. 인증 플로우로의 전환을 위한 올바른 구조입니다.
27-32: 세션 만료 처리 로직이 적절하게 구현되었습니다.네비게이션 스택을 클리어하고
didFinish()를 호출하여 플로우를 정리하는 세션 만료 처리가 올바릅니다. 애니메이션 없이 스택을 비우는 것도 세션 만료 상황에 적합합니다.src/Projects/BKPresentation/Sources/Common/Coordinator/SessionExpiredNotifying.swift (1)
1-12: 세션 만료 알림 메커니즘이 잘 설계되었습니다.
SessionExpirationNotifying마커 프로토콜과notifyParentSessionExpired()메서드를 통해 코디네이터 계층에서 세션 만료 이벤트를 상위로 전파하는 구조가 깔끔하게 구현되었습니다.firstAncestor메서드와 옵셔널 체이닝을 활용한 안전한 탐색도 적절합니다.src/Projects/BKPresentation/Sources/MainFlow/Setting/View/SettingCell.swift (1)
30-36: 하이라이트 상태에서 배경색 변경 없음
isHighlighted의 값과 관계없이 항상 같은 배경색을 설정하고 있습니다. 하이라이트 시각적 피드백이 필요하지 않다면 이 오버라이드를 제거하는 것이 좋습니다.하이라이트 효과를 의도적으로 제거한 것인지 확인이 필요합니다. 만약 하이라이트 효과가 필요하다면 다음과 같이 수정하세요:
override var isHighlighted: Bool { didSet { - backgroundColor = .bkBaseColor(.primary) - contentView.backgroundColor = .bkBaseColor(.primary) + let color: UIColor = isHighlighted ? .bkBaseColor(.secondary) : .bkBaseColor(.primary) + backgroundColor = color + contentView.backgroundColor = color } }src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetTitleView.swift (1)
35-70: UIStackView를 활용한 레이아웃 개선 👍수동 제약 조건 대신 UIStackView를 사용하여 레이아웃 로직이 크게 개선되었습니다. 코드가 더 간결하고 유지보수가 쉬워졌습니다.
src/Projects/BKPresentation/Sources/MainFlow/Setting/ViewModel/SettingViewModel.swift (1)
29-30: 사용되지 않는errorMessage속성
errorMessage가 로그아웃 실패 시 설정되지만 실제로 사용되는 곳이 없습니다. UI에서 에러를 표시할 계획이 있는지 확인이 필요합니다.에러 메시지를 사용자에게 표시할 계획이 있나요? 없다면 이 속성을 제거하거나, 있다면 ViewController에서 에러 처리 로직을 추가해야 합니다.
Also applies to: 82-84
src/Projects/BKDesign/Sources/Components/Label/BKCheckBoxLabel.swift (5)
5-24: 클래스 구조가 잘 설계되었습니다.체크박스와 라벨을 결합한 컴포넌트의 구조가 명확하고, 필요한 프로퍼티들이 적절히 정의되어 있습니다.
isChecked프로퍼티의didSet을 통한 콜백 호출 방식도 깔끔합니다.
26-33: 초기화 매개변수 기본값이 적절합니다.각 매개변수에 합리적인 기본값이 설정되어 있어 사용성이 좋습니다. 특히
touchAreaInset을 옵셔널로 처리한 것은 터치 영역 확장이 필요한 경우에만 사용할 수 있어 유연성을 제공합니다.
65-66: 레이아웃 우선순위 설정이 올바릅니다.체크박스의
contentHuggingPriority와contentCompressionResistancePriority를.required로 설정하여 체크박스 크기가 고정되고 라벨이 남은 공간을 차지하도록 한 것이 적절합니다.
70-78: 조건부 제약 조건 처리가 깔끔합니다.
touchAreaInset의 존재 여부에 따라 체크박스의 제약 조건을 다르게 설정하는 로직이 명확하고 이해하기 쉽습니다.
91-94: 동기화 로직 문제없음 확인됨
didTapContainer에서
checkbox.isChecked.toggle()로 체크박스 이미지가 업데이트되고- 이어서
isChecked = checkbox.isChecked할당 시didSet으로onChecked콜백이 단 한 번 호출됩니다.따라서 상태 동기화 및 콜백 호출 로직은 의도대로 정상 동작합니다.
src/Projects/BKDesign/Sources/Components/BottomSheet/BKBottomSheetViewController.swift (4)
7-7: enum 기반 리팩토링이 적절합니다.
suppliedContent를SuppliedContentStyleenum으로 변경하여 콘텐츠의 위치(upper/lower)를 명시적으로 제어할 수 있게 된 것은 좋은 개선입니다. 타입 안전성과 가독성이 향상되었습니다.Also applies to: 23-23, 27-27
62-65: 레이아웃 계산 시점 변경이 적절합니다.레이아웃 계산을
viewDidLayoutSubviews로 이동하고targetWidth > 0가드 조건을 추가한 것은 올바른 개선입니다. 이는 실제 레이아웃이 완료된 후 크기를 계산하여 더 정확한 결과를 보장합니다.
110-145: 회원탈퇴 시트 팩토리 메서드가 잘 구현되었습니다.체크박스와 버튼 상태를 연동하는 로직이 깔끔하게 구현되어 있습니다. 초기에 primary 버튼을 비활성화하고 체크박스 상태에 따라 활성화하는 UX 패턴이 적절합니다.
202-213: 콘텐츠 조립 로직이 명확해졌습니다.
SuppliedContentStyleenum을 사용한 switch 문으로 상단/하단 콘텐츠 배치 로직이 명확해졌습니다. 각 케이스에서applyRatioIfNeeded를 호출하는 패턴도 일관성 있게 적용되어 있습니다.Also applies to: 229-241
🔗 관련 이슈
📘 작업 유형
📙 작업 내역
🧪 테스트 내역
🎨 스크린샷 또는 시연 영상 (선택)
ScreenRecording_07-22-2025.23-39-55_1.MP4
💬 추가 설명 or 리뷰 포인트 (선택)
Summary by CodeRabbit
Summary by CodeRabbit
신규 기능
개선 사항
버그 수정
기타