Skip to content

Fix/#123 textfield 패딩 추가, "세" 자동 추가#124

Merged
soseoyo12 merged 2 commits intodevelopfrom
fix/#123-textfield
Jan 20, 2026
Merged

Fix/#123 textfield 패딩 추가, "세" 자동 추가#124
soseoyo12 merged 2 commits intodevelopfrom
fix/#123-textfield

Conversation

@soseoyo12
Copy link
Contributor

🔗 연결된 이슈

📄 작업 내용

  • 텍스트 필드 패딩 추가
  • 나이 텍스트 필드 "세" 추가
구현 내용 IPhone 16 pro IPhone 13 mini
GIF image image

💻 주요 코드 설명

.onChange(of: isAgeFocused) { focused in
            if !focused {
                if let numericValue = ageNumericValue, !age.hasSuffix("") {
                    age = "\(numericValue)"
                }
                showAgeError = isAgeOverLimit
            }
        }
    
    private var ageNumericValue: Int? {
        let numericString = age.replacingOccurrences(of: "", with: "")
        return Int(numericString)
    }

@soseoyo12 soseoyo12 requested a review from a team January 20, 2026 17:31
@soseoyo12 soseoyo12 self-assigned this Jan 20, 2026
@soseoyo12 soseoyo12 requested review from sum130, wotjs020708 and y-eonee and removed request for a team January 20, 2026 17:31
@soseoyo12 soseoyo12 linked an issue Jan 20, 2026 that may be closed by this pull request
1 task
@soseoyo12 soseoyo12 added the Fix 버그 수정 label Jan 20, 2026
@coderabbitai
Copy link

coderabbitai bot commented Jan 20, 2026

📝 Walkthrough

사항 요약

온보딩 API의 쿼리 매개변수 타입을 확장하고, 정보 입력 뷰의 나이 필드 처리를 개선하며, 텍스트 필드 패딩 레이아웃을 조정합니다.

변경사항

그룹 / 파일 변경 내용
API 타입 확장
OnboardingAPI.swift
queryParameters 반환 타입을 [String: String]?에서 [String: Any]?로 변경하여 쿼리 매개변수 값 타입의 범위 확대
나이 필드 로직 개선
InformationView.swift
나이 문자열을 파싱하는 ageNumericValue 계산 속성 추가; 플레이스홀더를 "20"에서 "20 세"로 변경; onChange 핸들러에서 포커스 해제 시 " 세" 접미사 자동 추가; 유효성 검사 및 버튼 액션에서 새로운 숫자 값 활용
텍스트 필드 패딩 조정
CherrishTextField.swift
내부 TextField에 수평 패딩 추가; 날짜 스타일의 수평 패딩을 18.5.adjustedW에서 0으로 변경

예상 코드 리뷰 난이도

🎯 3 (Moderate) | ⏱️ ~20분

관련 가능성 있는 PR

  • Feat/#29 TextBox 구현 #55: CherrishTextField 컴포넌트 및 "20 세" 나이 플레이스홀더 관련 수정과 연관되며, 본 PR이 이를 토대로 패딩 및 연결 로직을 추가 조정
  • Refactor/#115 쿼리파라미터 수정 #116: queryParameters 타입을 [String: String]?에서 [String: Any]?로 변경하는 동일한 변경사항 적용 (본 PR은 OnboardingAPI, 해당 PR은 EndPoint 프로토콜 및 URL 구성 수정)

제안 레이블

Style

제안 검토자

  • y-eonee
  • wotjs020708
  • sum130
🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description check ✅ Passed PR 설명이 연결된 이슈, 구현 내용, 주요 코드 및 스크린샷을 포함하여 변경사항과 관련된 상세 정보를 제공합니다.
Linked Issues check ✅ Passed PR은 이슈 #123의 텍스트필드 패딩 수정 요구사항을 구현했으며, OnboardingAPI의 queryParameters 타입 변경, InformationView의 나이 필드 '세' 자동 추가, CherrishTextField의 패딩 추가를 모두 포함합니다.
Out of Scope Changes check ✅ Passed 모든 변경사항이 이슈 #123의 텍스트필드 패딩 수정 및 나이 필드 '세' 자동 추가와 관련되어 있으며, 범위를 벗어난 변경은 없습니다.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Title check ✅ Passed PR 제목이 변경 사항의 핵심을 명확하게 설명하고 있습니다. '#123' 이슈 번호와 'textfield'는 주요 변경 대상을 직접적으로 나타내며, PR 목표의 텍스트 필드 패딩 수정 및 나이 필드 기능과 일치합니다.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ 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 fix/#123-textfield

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.

@soseoyo12 soseoyo12 changed the title Fix/#123 textfield Fix/#123 textfield 패딩 추가, "세" 자동 추가 Jan 20, 2026
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: 1

Caution

Some comments are outside the diff and can’t be posted inline due to platform limitations.

⚠️ Outside diff range comments (1)
Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/InformationView.swift (1)

116-120: 버튼 상태 검증 로직에서 ageNumericValue 유효성 확인이 누락되었습니다.

isAgeValid!age.isEmpty && !isAgeOverLimit만 확인합니다. 만약 사용자가 어떤 방식으로든 숫자가 아닌 값을 입력하면 (예: 클립보드 붙여넣기), ageNumericValuenil인 상태에서 버튼이 활성화될 수 있습니다. 이 경우 Line 86의 guard에서 early return되어 버튼 탭이 무시됩니다.

🔧 제안된 수정
 private func updateButtonState() {
     let isNameValid = !name.isEmpty && !isNameOverLimit
-    let isAgeValid = !age.isEmpty && !isAgeOverLimit
+    let isAgeValid = ageNumericValue != nil && !isAgeOverLimit
     buttonState = (isNameValid && isAgeValid) ? .active : .normal
 }
🤖 Fix all issues with AI agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/InformationView.swift`:
- Line 62: Remove the trailing whitespace at the end of the line containing the
view modifier call `.padding(.top, 70.adjustedH)` in InformationView.swift;
locate the `.padding(.top, 70.adjustedH)` expression and delete the extraneous
spaces after the closing parenthesis so the line ends immediately after
`adjustedH`.

}
}
.padding(.top, 70.adjustedH)
.padding(.top, 70.adjustedH)
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🧹 Nitpick | 🔵 Trivial

사소한 포맷팅 이슈: 줄 끝에 불필요한 공백이 있습니다.

.padding(.top, 70.adjustedH) 뒤에 trailing whitespace가 있습니다. 코드 스타일 일관성을 위해 제거하는 것이 좋습니다.

🤖 Prompt for AI Agents
In
`@Cherrish-iOS/Cherrish-iOS/Presentation/Feature/Onboarding/InformationView.swift`
at line 62, Remove the trailing whitespace at the end of the line containing the
view modifier call `.padding(.top, 70.adjustedH)` in InformationView.swift;
locate the `.padding(.top, 70.adjustedH)` expression and delete the extraneous
spaces after the closing parenthesis so the line ends immediately after
`adjustedH`.

Copy link
Contributor

@y-eonee y-eonee left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

Copy link
Contributor

@wotjs020708 wotjs020708 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

어푸푸푸

Copy link
Contributor

@sum130 sum130 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

수정하셨군뇨! 구웃~~ 어푸푸!!

@soseoyo12 soseoyo12 merged commit c3cc824 into develop Jan 20, 2026
2 checks passed
@soseoyo12 soseoyo12 deleted the fix/#123-textfield branch January 20, 2026 21:15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Fix 버그 수정 성용👶

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[Fix] TextField 패딩 수정

4 participants