-
Notifications
You must be signed in to change notification settings - Fork 0
✨ [Feat] FormTextField 컴포넌트 구현 #7
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
Conversation
📝 WalkthroughWalkthroughIntroduces a new FormTextField SwiftUI component system consisting of three integrated modules: a view component with state management, environment configuration for disabled/focused states, and a modifier system for applying form field styling and behavior constraints. Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~22 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✨ Finishing touches
Comment |
|
캡쳐 사진도 첨부해서 올려줘요요요요요용 ^^ |
|
또 PR 오른쪽 체크 사항에서 이슈 연결 시키기 !!! 잊지 말고 하는 습관을 가져보죠 |
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 (3)
AppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextField.swift (1)
10-10: TODO 항목 발견: 색상 및 수치 변경 필요.이 TODO 항목을 처리하기 위해 별도 이슈를 생성하거나, 디자인 시스템에서 색상 토큰을 정의하는 것이 좋습니다.
이슈를 생성하거나 색상 토큰 구조를 제안해 드릴까요?
AppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextFieldModifier.swift (1)
8-8:Foundationimport가 불필요합니다.
SwiftUI가 이미Foundation의 필요한 타입들을 re-export하므로 별도 import가 필요하지 않습니다.🔎 제안
-import Foundation import SwiftUIAppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextFieldEnvironment.swift (1)
8-8:Foundationimport가 불필요합니다.이전 파일과 동일하게,
SwiftUI가 이미 필요한 타입들을 포함하고 있습니다.🔎 제안
-import Foundation import SwiftUI
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (3)
AppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextField.swiftAppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextFieldEnvironment.swiftAppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextFieldModifier.swift
🧰 Additional context used
🧬 Code graph analysis (1)
AppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextField.swift (1)
AppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextFieldModifier.swift (2)
body(20-22)formDisabled(29-31)
🔇 Additional comments (5)
AppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextField.swift (3)
56-61: Equatable 구현에서isFocused상태가 누락되었습니다.
FormTextFieldContent는@Environment(\.formTextFieldIsFocused)를 읽어 테두리 색상을 결정하지만,Equatable구현에서 이 상태를 비교하지 않습니다. 이로 인해.equatable()최적화가 포커스 변경 시 뷰 업데이트를 올바르게 트리거하지 못할 수 있습니다.Environment 값은
Equatable비교에 포함되지 않으므로, 포커스 변경 시에도 뷰가 다시 렌더링될 수 있지만, 명시적으로 의도한 동작인지 확인이 필요합니다.
75-79: Shape에서.fill()과.stroke()체이닝은 iOS 17+ 필요.
RoundedRectangle에.fill()과.stroke()를 체이닝하는 것은 iOS 17 이상에서만 지원됩니다. iOS 16 이하를 지원해야 한다면ZStack또는.overlay를 사용해야 합니다.🔎 iOS 16 이하 호환 코드 제안
.background( - RoundedRectangle(cornerRadius: 10) - .fill(isDisabled ? Color.neutral200 : .clear) - .stroke(isFocused ? .black : .gray, lineWidth: 1) + ZStack { + RoundedRectangle(cornerRadius: 10) + .fill(isDisabled ? Color.neutral200 : .clear) + RoundedRectangle(cornerRadius: 10) + .stroke(isFocused ? .black : .gray, lineWidth: 1) + } )프로젝트의 최소 iOS 배포 타겟을 확인해 주세요.
32-43: 컴포넌트 구조가 잘 설계되었습니다.Container/Presenter 분리 패턴과
@FocusState를 통한 포커스 관리, 그리고 Environment를 통한 상태 전파 방식이 적절합니다.AppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextFieldModifier.swift (1)
17-31: ViewModifier 및 Extension 구현이 적절합니다.
FormTextFieldDisabledModifier가 Environment를 통해 disabled 상태를 전파하고,formDisabled(_:)메서드가 직관적인 API를 제공합니다.AppProduct/AppProduct/Core/Common/UIComponents/FormTextField/FormTextFieldEnvironment.swift (1)
13-30: Environment Key 구현이 SwiftUI 패턴을 잘 따릅니다.
EnvironmentKey프로토콜 준수와EnvironmentValuesextension이 표준 패턴대로 올바르게 구현되었습니다.
jwon0523
left a 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.
고생하셨습니다! 병합해주세요~~
f1f4410 to
f3d6b32
Compare

✨ PR 유형
Feature - FormTextField 컴포넌트 구현
📷 스크린샷 or 영상(UI 변경 시)
🛠️ 작업내용
커밋 히스토리
feat: FormTextField 컴포넌트 제작- 기본 컴포넌트 구현refactor: FormTextField isFocused 추가 및 isSecure 삭제- 상태값 변경feat: 키보드 toolbar 추가- 피드백 반영feat: textfield 좌측 아이콘 추가- 피드백 반영refactor: FormTextField 초기값 수정 및 placeholder 옵셔널로 변경- 피드백 반영fix: 키보드 toolbar 중복 문제 해결- 오류 수정📋 추후 진행 상황
📌 리뷰 포인트
✅ Checklist
PR이 다음 요구 사항을 충족하는지 확인해주세요!!!
Summary by CodeRabbit
✏️ Tip: You can customize this high-level summary in your review settings.