feat: TextField 기능 추가#92
Conversation
Walkthrough검색창(SearchBar) 컴포넌트와 관련된 여러 파일이 수정 및 추가되었습니다. 주요 변경 사항은 커스텀 텍스트필드에 clear 버튼 추가, 관련 레이아웃 상수 도입, 아이콘 에셋 및 코드 추가, 인셋 상수 정리 등이며, SearchBar의 기능 구현에 필요한 기반 요소들이 반영되었습니다. Changes
Sequence Diagram(s)sequenceDiagram
participant User
participant BKSearchTextField
participant BKBaseTextField
participant ClearButton
User->>BKSearchTextField: 입력 시작/수정
BKSearchTextField->>BKBaseTextField: 텍스트 변경
BKBaseTextField->>ClearButton: 텍스트 유무에 따라 clear 버튼 표시/숨김
User->>ClearButton: clear 버튼 탭
ClearButton->>BKBaseTextField: 텍스트 clear
BKBaseTextField->>BKSearchTextField: onTextChanged 콜백 발생
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes해당 변경 사항 중 linked issue(#85)의 "SearchBar 컴포넌트 구현" 및 "UISearchBar와 연동 or 같은 기능 사용" 요구사항과 무관한 기능적 변경은 발견되지 않았습니다. ✨ 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: 1
🧹 Nitpick comments (1)
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKInset.swift (1)
8-8: 네이밍 변경 사유 확인이 필요합니다.
inset2를inset3_2로 변경한 이유가 명확하지 않습니다. 기존inset3(12)와 구분하기 위한 것으로 보이지만, 더 명확한 네이밍 규칙을 적용하는 것이 좋겠습니다.
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (3)
src/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/x-circle.pngis excluded by!**/*.pngsrc/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/x-circle@2x.pngis excluded by!**/*.pngsrc/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/x-circle@3x.pngis excluded by!**/*.png
📒 Files selected for processing (6)
src/Projects/BKDesign/PreviewApp/Sources/View/BKInputCatalogView.swift(1 hunks)src/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/Contents.json(1 hunks)src/Projects/BKDesign/Sources/Components/BKBaseTextField.swift(7 hunks)src/Projects/BKDesign/Sources/Components/BKSearchTextField.swift(1 hunks)src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKIcon.swift(1 hunks)src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKInset.swift(1 hunks)
🧰 Additional context used
🧠 Learnings (7)
📓 Common learnings
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#69
File: src/Projects/BKDesign/PreviewApp/Sources/View/CatalogViewController.swift:57-70
Timestamp: 2025-07-10T14:01:04.933Z
Learning: clxxrlove는 Reed-iOS 프로젝트에서 테스트/데모용 코드와 프로덕션 코드에 대해 다른 코드 품질 기준을 적용한다. 테스트용 뷰에서는 안전성 검증 등의 엄격한 코드 품질 요구사항을 적용하지 않는 것을 선호한다.
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().
src/Projects/BKDesign/PreviewApp/Sources/View/BKInputCatalogView.swift (4)
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#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: YAPP-Github/Reed-iOS#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는 버튼들이 콘텐츠 길이에 따라 다른 너비를 가지는 것을 선호합니다.
Learnt from: doyeonk429
PR: YAPP-Github/Reed-iOS#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: 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() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKIcon.swift (2)
Learnt from: doyeonk429
PR: YAPP-Github/Reed-iOS#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: YAPP-Github/Reed-iOS#69
File: src/Projects/BKDesign/Resources/Assets.xcassets/AppIcon.appiconset/Contents.json:1-35
Timestamp: 2025-07-10T13:26:07.554Z
Learning: clxxrlove는 Reed-iOS 프로젝트에서 AppIcon 에셋 구조를 미리 설정하고, 실제 이미지 파일이 준비되기 전까지는 filename 속성을 의도적으로 생략하는 개발 방식을 사용한다. 이는 에셋 구조를 먼저 만들고 나중에 이미지를 추가하는 단계적 개발 접근법이다.
src/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/Contents.json (1)
Learnt from: doyeonk429
PR: YAPP-Github/Reed-iOS#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.
src/Projects/BKDesign/Sources/Components/BKSearchTextField.swift (3)
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#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: 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: doyeonk429
PR: YAPP-Github/Reed-iOS#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/Foundation/GraphicSystem/BKInset.swift (1)
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#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/BKBaseTextField.swift (2)
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#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: 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() 메서드를 처음에 만들었지만 활용 측면에서 애매할 것 같아서 제외했다고 함. 정적 속성만으로 구현하는 것을 선호함.
🔇 Additional comments (15)
src/Projects/BKDesign/PreviewApp/Sources/View/BKInputCatalogView.swift (1)
135-135: inset 상수 업데이트가 올바르게 적용되었습니다.
BKInset.inset20에서BKInset.inset5로의 변경이 적절하게 적용되었습니다. 값은 동일하게 20을 유지하면서 새로운 네이밍 규칙에 맞게 업데이트되었습니다.src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKIcon.swift (1)
36-36: 새로운 아이콘 추가가 올바르게 구현되었습니다.
xCircle아이콘이 기존 패턴과 일관성 있게 추가되었습니다. 알파벳 순서로 정렬되어 있어 가독성이 좋습니다.src/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/Contents.json (1)
1-23: x-circle 아이콘 에셋 파일 확인 완료다음 세 가지 이미지 파일이 모두 존재하여 에셋 카탈로그 구성이 완전함을 확인했습니다:
- src/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/x-circle.png
- src/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/x-circle@2x.png
- src/Projects/BKDesign/Resources/Assets.xcassets/icons/x-circle.imageset/x-circle@3x.png
에셋 카탈로그가 표준 구조로 올바르게 구성되어 있으므로 이 변경 사항을 승인합니다.
src/Projects/BKDesign/Sources/Components/BKSearchTextField.swift (3)
72-77: clearButton 제약 조건 재정의를 확인해주세요.
remakeConstraints를 사용하여 기존 제약 조건을 완전히 재정의하고 있습니다. 이는 기존 레이아웃에 영향을 줄 수 있으므로 의도한 변경사항인지 확인이 필요합니다.특히
top.leading.bottom.equalToSuperview()가 올바른 제약 조건인지 확인해주세요. clear 버튼이 의도한 위치에 배치되는지 테스트해보시길 권장합니다.
89-95: LayoutConstants enum 도입이 좋은 개선사항입니다.하드코딩된 값들을 상수로 대체하여 코드 유지보수성을 향상시켰습니다. enum 사용은 프로젝트의 선호 패턴과 일치합니다.
82-85: textInsets 메서드 개선이 적절합니다.기존 하드코딩된 값들을
LayoutConstants의 명명된 상수로 대체하여 가독성과 유지보수성을 향상시켰습니다.src/Projects/BKDesign/Sources/Components/BKBaseTextField.swift (9)
34-39: 클리어 버튼 구현이 잘 되어 있습니다.클리어 버튼의 스타일링과 아이콘 사용이 적절하게 구현되어 있습니다. BKImage.Icon.xCircle 아이콘과 적절한 틴트 컬러가 사용되었습니다.
49-49: 메서드명 변경이 적절합니다.
setup()에서configure()로 메서드명이 변경되어 더 명확한 의미를 전달합니다.
62-62: 텍스트 영역 inset 조정이 일관되게 적용되었습니다.텍스트, 편집, 플레이스홀더 영역 모두에서
textRightInset을 사용하여 클리어 버튼 공간을 확보했습니다. 일관된 레이아웃 처리가 잘 되어 있습니다.Also applies to: 73-73, 84-84
89-92: 터치 이벤트 처리가 적절합니다.텍스트 필드 외부 터치 시 키보드를 닫는 기능이 사용성을 향상시킵니다.
94-98: 텍스트 변경 콜백 기능이 잘 구현되었습니다.검색 기능과 같은 반응형 프로그래밍을 위한 콜백 기능이 깔끔하게 구현되어 있습니다.
111-122: configure 메서드 업데이트가 적절합니다.텍스트 변경 이벤트 리스너와 클리어 버튼 스타일링이 적절히 추가되었습니다.
124-138: 클리어 버튼 스타일링 구현이 우수합니다.컨테이너 뷰를 사용한 클리어 버튼 레이아웃과 이벤트 핸들러 설정이 잘 구현되어 있습니다. SnapKit을 사용한 제약 조건 설정도 적절합니다.
164-174: 이벤트 핸들러 구현이 완벽합니다.
clearButtonTapped: 텍스트 클리어 기능updateClearButtonVisibility: 텍스트 상태에 따른 버튼 표시/숨김textDidChange: 콜백 호출모든 핸들러가 예상대로 동작하도록 구현되어 있습니다.
178-182: 레이아웃 상수 업데이트가 적절합니다.클리어 버튼 크기와 새로운 inset 값들이 BKInset 상수를 사용하여 일관되게 정의되었습니다.
textRightInset값(46)도 클리어 버튼 공간을 충분히 확보하도록 설정되었습니다.
There was a problem hiding this comment.
Actionable comments posted: 0
♻️ Duplicate comments (1)
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKInset.swift (1)
10-10: inset5 상수가 올바르게 추가되었습니다.
inset5 = 20값은 기존 패턴 (insetX = X * 4)과 일치하며, 과거 리뷰에서 논의된inset20을inset5로 통일하는 작업이 반영된 것으로 보입니다.
🧹 Nitpick comments (1)
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKInset.swift (1)
8-8: 네이밍 일관성을 위해inset3_2명명 규칙을 재검토해주세요.
inset3_2라는 명명 방식이 다른 상수들(inset1,inset3,inset4등)과 일관성이 없습니다. 값 13은 inset3(12)과 inset4(16) 사이의 중간값으로 보이는데, 더 명확한 네이밍을 고려해보시기 바랍니다.제안사항:
inset3_25(13 = 3.25 * 4) 또는 다른 명확한 네이밍 사용- 또는 해당 값의 용도에 맞는 semantic 네이밍 사용
📜 Review details
Configuration used: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKInset.swift(1 hunks)
🧰 Additional context used
🧠 Learnings (2)
📓 Common learnings
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().
src/Projects/BKDesign/Sources/Foundation/GraphicSystem/BKInset.swift (1)
Learnt from: clxxrlove
PR: YAPP-Github/Reed-iOS#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에 따르면 작은 기기에서도 동일한 크기가 유지되어야 하며, 동적 계산보다는 상수화만 필요합니다.
⏰ 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
🔗 관련 이슈
📘 작업 유형
📙 작업 내역
🧪 테스트 내역
💬 추가 설명 or 리뷰 포인트 (선택)
BKBaseTextField에onTextChanged를 추가했으니 SearchFlow에서 이걸로 구현하면 될듯 합니다.Summary by CodeRabbit
신규 기능
개선 사항
버그 수정