Skip to content

Conversation

@doyeonk429
Copy link
Member

@doyeonk429 doyeonk429 commented Jan 3, 2026

🔗 관련 이슈

📘 작업 유형

  • ✨ Feature (기능 추가)
  • 🐞 Bugfix (버그 수정)
  • 🔧 Refactor (코드 리팩토링)
  • ⚙️ Chore (환경 설정)
  • 📝 Docs (문서 작성 및 수정)
  • ✅ Test (기능 테스트)
  • 🎨 style (코드 스타일 수정)

📙 작업 내역

  • BKTextButton을 추가하였습니다. 기존 BKButton의 config 항목들을 최대한 활용하되, 기존 버튼 스타일과 다른 점이 많아(좌/우 아이콘 옵션 여부, 배경색 여부, 버튼 사이즈 측정 방식) 아예 별도의 BKTextButton 컴포넌트를 정의하였습니다.
  • PreviewApp의 BKButtonTestViewController에 예시 텍스트 버튼 항목을 추가하였습니다.
  • 텍스트 + 라인 스타일 상 여러 줄의 텍스트는 커버하지 않습니다.

🧪 테스트 내역

  • 브라우저/기기에서 동작 확인
  • 엣지 케이스 테스트 완료
  • 기존 기능 영향 없음

🎨 스크린샷 또는 시연 영상 (선택)

Simulator Screenshot - iPhone 16 Pro Max - 2026-01-03 at 15 32 47

✅ PR 체크리스트

  • 커밋 메시지가 명확합니다
  • PR 제목이 컨벤션에 맞습니다
  • 관련 이슈 번호를 작성했습니다
  • 기능이 정상적으로 작동합니다
  • 불필요한 코드를 제거했습니다

💬 추가 설명 or 리뷰 포인트 (선택)

  • 로그인 화면 개편에서 사용하시면 됩니다!

Summary by CodeRabbit

새로운 기능

  • 언더라인 스타일의 텍스트 버튼 컴포넌트 추가: 다양한 크기 및 비활성화 상태를 지원하는 새로운 텍스트 버튼 컴포넌트 출시
  • 미리보기 앱에 텍스트 버튼 테스트 섹션 추가: 여러 버튼 크기 및 상태 변형을 테스트할 수 있는 전용 섹션 추가

✏️ Tip: You can customize this high-level summary in your review settings.

@doyeonk429 doyeonk429 self-assigned this Jan 3, 2026
@github-actions github-actions bot requested a review from clxxrlove January 3, 2026 06:37
@coderabbitai
Copy link

coderabbitai bot commented Jan 3, 2026

Walkthrough

새로운 텍스트 버튼 컴포넌트 BKTextButton이 도입되었으며, 이는 언더라인이 있는 텍스트 기반 버튼을 제공합니다. 테스트 뷰 컨트롤러가 이 새 컴포넌트를 검증하기 위한 섹션 기반 구조로 업데이트되었고, BKButtonSize에 라벨 표시 기능이 추가되었습니다.

Changes

Cohort / File(s) 변경 요약
Text Button Component 구현
src/Projects/BKDesign/Sources/Components/Button/BKTextButton.swift
새로운 BKTextButton UIControl 클래스 추가: title, size, foregroundColors 프로퍼티와 상태 관리(isHighlighted, isEnabled), 색상 업데이트 메서드, SnapKit 기반 레이아웃(titleLabel + underlineView), 팩토리 메서드 포함
Test View 및 Button Size 확장
src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift
"Text Buttons" 테스트 섹션 추가 (헤더, 다양한 크기의 텍스트 버튼, 비활성화 버튼); 헬퍼 메서드 도입(addSectionHeader, setupTextButtons, addTextButton, addDisabledTextButton, wrapForLeftAlign 등); BKButtonSize에 공개 label 프로퍼티 추가; 저작권 연도 업데이트

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Pre-merge checks and finishing touches

❌ Failed checks (1 warning)
Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 56.25% which is insufficient. The required threshold is 80.00%. You can run @coderabbitai generate docstrings to improve docstring coverage.
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed Pull request title clearly summarizes the main change: introducing a new BKTextButton component to the design system.
Linked Issues check ✅ Passed The PR fully addresses issue #223 by implementing the BKTextButton component for the design system and providing preview examples.
Out of Scope Changes check ✅ Passed All changes are directly related to BKTextButton implementation and its integration into the preview app, with no out-of-scope modifications.
✨ 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 BOOK-347-feature/#223

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

🧹 Nitpick comments (2)
src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift (1)

153-163: extension 가시성 및 위치 재고려 권장

BKButtonSizepublic 확장을 추가하여 label 프로퍼티를 제공하고 있는데, 다음 사항을 검토해 주세요:

  1. 테스트 전용이라면: 이 프로퍼티가 테스트 UI에서만 사용된다면 internal 가시성으로 충분하며, 현재 위치(테스트 파일)가 적절합니다.
  2. 프로덕션 활용 가능성: 향후 접근성 레이블, 디버그 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에서 isEnableddidSet을 오버라이드하여 updateColors()를 호출하고 있으므로, isDisabled 없이 isEnabled만 사용해도 동일한 효과를 얻을 수 있습니다.

isDisabled가 API 일관성을 위해 의도적으로 추가된 것인지 확인하고, 그렇지 않다면 isEnabled만 사용하는 것을 권장합니다.

📜 Review details

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between c2270fa and da2b2a4.

📒 Files selected for processing (2)
  • src/Projects/BKDesign/PreviewApp/Sources/View/BKButtonTestViewController.swift
  • src/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.swift
  • src/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)을 올바르게 합산했습니다. 팩토리 메서드도 간결하고 사용하기 편리합니다.

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.

[BOOK-347/feat] 디자인시스템 버튼 새로운 스타일 추가

2 participants