-
Notifications
You must be signed in to change notification settings - Fork 0
feat: BKTextButton component 추가 #266
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
Walkthrough새로운 텍스트 버튼 컴포넌트 Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Actionable comments posted: 0
🧹 Nitpick comments (2)
src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift (1)
153-163: extension 가시성 및 위치 재고려 권장
BKButtonSize에public확장을 추가하여label프로퍼티를 제공하고 있는데, 다음 사항을 검토해 주세요:
- 테스트 전용이라면: 이 프로퍼티가 테스트 UI에서만 사용된다면
internal가시성으로 충분하며, 현재 위치(테스트 파일)가 적절합니다.- 프로덕션 활용 가능성: 향후 접근성 레이블, 디버그 UI, 로깅 등에서 활용 가능하다면,
BKButtonSize의 원본 정의 파일로 이동하는 것이 더 명확한 API 구조를 제공합니다.현재 테스트 파일에
public확장을 두는 것은 다소 비일관적이므로, 의도에 따라 가시성이나 위치를 조정하는 것을 권장합니다.src/Projects/BKDesign/Sources/Components/Button/BKTextButton.swift (1)
23-28: isDisabled와 isEnabled 이중 관리 고려
isDisabled프로퍼티를 별도로 제공하여isEnabled를 반전시키는 패턴이 일부 중복을 야기합니다:
UIControl은 이미isEnabled프로퍼티를 제공합니다.- 두 프로퍼티가 동시에 존재하면 외부에서
isEnabled를 직접 설정할 경우isDisabled와 불일치가 발생할 수 있습니다.- Line 58-61에서
isEnabled의didSet을 오버라이드하여updateColors()를 호출하고 있으므로,isDisabled없이isEnabled만 사용해도 동일한 효과를 얻을 수 있습니다.
isDisabled가 API 일관성을 위해 의도적으로 추가된 것인지 확인하고, 그렇지 않다면isEnabled만 사용하는 것을 권장합니다.
📜 Review details
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (2)
src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swiftsrc/Projects/BKDesign/Sources/Components/Button/BKTextButton.swift
🧰 Additional context used
🧠 Learnings (4)
📓 Common learnings
Learnt from: clxxrlove
Repo: YAPP-Github/Reed-iOS 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
Repo: YAPP-Github/Reed-iOS PR: 157
File: src/Projects/BKPresentation/Sources/MainFlow/Home/View/HomeViewController.swift:19-24
Timestamp: 2025-08-08T01:38:59.656Z
Learning: doyeonk429는 Reed-iOS 프로젝트에서 접근성(accessibility) 관련 개선사항은 현재 작업 중인 PR에서 즉시 처리하지 않고, 접근성 전용 PR이나 이슈를 별도로 만들어 한번에 처리하는 것을 선호한다.
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 68
File: src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift:124-133
Timestamp: 2025-07-10T08:21:49.399Z
Learning: doyeonk429는 테스트 전용으로만 사용되는 extension이나 코드는 해당 테스트 파일에 그대로 두는 것을 선호합니다. 실제 프로덕션 코드에서 사용되지 않는 테스트 전용 코드는 별도 파일로 분리하지 않고 테스트 파일 내에 유지하는 것이 그들의 코드 구성 방식입니다.
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 138
File: src/Projects/BKDesign/Resources/Assets.xcassets/icons/home.imageset/Contents.json:4-14
Timestamp: 2025-08-04T15:20:43.982Z
Learning: doyeonk429는 Reed-iOS 프로젝트에서 에셋 파일명이 영어가 아닌 경우(한글, 일본어 등)에는 경고를 받고 싶어하지만, 영어 파일명의 네이밍 컨벤션(예: home.png vs home1.png)은 기능적으로 문제없다면 신경쓰지 않는 것을 선호한다.
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 157
File: src/Projects/BKPresentation/Sources/AuthFlow/View/LoginView.swift:43-45
Timestamp: 2025-08-08T01:39:15.620Z
Learning: doyeonk429는 Reed-iOS 프로젝트에서 접근성 개선 작업을 별도의 전용 PR이나 이슈에서 일괄 처리하는 것을 선호한다. 개별 기능 구현 PR에서는 접근성 관련 제안을 하지 않고, 접근성 전담 작업에서 한번에 처리하는 방식을 원한다.
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS PR: 98
File: src/Projects/BKPresentation/Sources/AuthFlow/View/TermsView.swift:78-85
Timestamp: 2025-07-22T05:37:28.756Z
Learning: doyeonk429는 Reed-iOS 프로젝트에서 더미 데이터나 테스트 데이터의 구체적인 내용(예: URL 주소)에 대해서는 리뷰 시 지적하지 않기를 선호한다. 더미 데이터는 임시적이며 실제 기능 구현 시 교체될 예정이므로 URL의 구체적인 주소는 중요하지 않다고 본다.
📚 Learning: 2025-08-20T04:50:43.364Z
Learnt from: clxxrlove
Repo: YAPP-Github/Reed-iOS PR: 181
File: src/Projects/BKDesign/Sources/Components/TextField/BKTextView.swift:183-186
Timestamp: 2025-08-20T04:50:43.364Z
Learning: In BKTextView (src/Projects/BKDesign/Sources/Components/TextField/BKTextView.swift), the border width is intentionally kept at LayoutConstants.borderWidth even when there's no error message, with only the color changed to clear. This maintains layout consistency by preserving the border space.
Applied to files:
src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swiftsrc/Projects/BKDesign/Sources/Components/Button/BKTextButton.swift
📚 Learning: 2025-07-14T05:23:04.937Z
Learnt from: clxxrlove
Repo: YAPP-Github/Reed-iOS 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에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
Applied to files:
src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift
📚 Learning: 2025-07-08T17:17:37.703Z
Learnt from: doyeonk429
Repo: YAPP-Github/Reed-iOS 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)이 현재 다크 모드에서도 라이트 모드 색상을 반환하는 것은 의도적인 구현입니다. 아직 다크 모드가 구현되지 않았지만, 미래의 다크 모드 지원을 위한 코드 구조로 준비되어 있습니다.
Applied to files:
src/Projects/BKDesign/Sources/Components/Button/BKTextButton.swift
🧬 Code graph analysis (2)
src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift (1)
src/Projects/BKDesign/Sources/Components/Button/BKTextButton.swift (1)
text(160-162)
src/Projects/BKDesign/Sources/Components/Button/BKTextButton.swift (2)
src/Projects/BKDesign/Sources/Extensions/UIColor+.swift (1)
bkContentColor(52-63)src/Projects/BKDesign/Sources/Components/Button/BKButtonStyle.swift (1)
color(123-129)
⏰ 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)
- GitHub Check: build
🔇 Additional comments (6)
src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift (2)
77-80: 긴 텍스트 처리 동작 확인 필요Line 80에서 매우 긴 텍스트를 테스트하고 있는데, BKTextButton의 titleLabel이
numberOfLines = 1로 설정되어 있어 텍스트가 잘리거나 truncate될 것으로 보입니다. PR 설명에서 "텍스트 + 라인 스타일에서 여러 줄 텍스트는 지원하지 않음"을 명시했으므로 의도된 동작으로 보이지만, 긴 텍스트가 어떻게 표시되는지(말줄임표, 잘림 등) 실제 동작을 확인했는지 검증 바랍니다.
134-150: LGTM!섹션 헤더와 구분선을 추가하는 헬퍼 메서드들이 테스트 UI를 명확하게 구성하고 있습니다. 구현이 간결하고 목적이 명확합니다.
src/Projects/BKDesign/Sources/Components/Button/BKTextButton.swift (4)
77-89: LGTM!초기화 메서드들이 올바른 순서로 구현되어 있습니다.
setupViews()와updateColors()호출 시점이 적절하며, IB 지원을 위한required init?(coder:)도 적절히 구현되었습니다.
93-120: LGTM!View 설정 로직이 명확하게 구조화되어 있습니다. 타이틀 레이블과 밑줄 뷰의 레이아웃 제약이 올바르게 정의되었으며, 1pt 간격과 1pt 높이의 밑줄 구현이 적절합니다.
124-143: LGTM!색상 업데이트와 애니메이션 로직이 잘 구현되었습니다.
updateColors()가 상태에 따라 올바른 색상을 적용하고,animatePressedState()가 적절한 애니메이션 옵션으로 터치 피드백을 제공합니다.
147-163: LGTM!
intrinsicContentSize계산이 정확하며, 레이블 높이와 밑줄 영역(오프셋 1pt + 높이 1pt)을 올바르게 합산했습니다. 팩토리 메서드도 간결하고 사용하기 편리합니다.
🔗 관련 이슈
📘 작업 유형
📙 작업 내역
🧪 테스트 내역
🎨 스크린샷 또는 시연 영상 (선택)
✅ PR 체크리스트
💬 추가 설명 or 리뷰 포인트 (선택)
Summary by CodeRabbit
새로운 기능
✏️ Tip: You can customize this high-level summary in your review settings.