fix(profile): 프로필 소셜 URL 필드를 신규 명세로 정리한다

This commit is contained in:
Yu Sung
2026-02-27 13:45:49 +09:00
parent 38fb818f4b
commit 9d6f0c648b
6 changed files with 157 additions and 30 deletions

View File

@@ -0,0 +1,89 @@
# 20260227 프로필 소셜 URL 필드 변경
## 구현 목표
- 프로필 수정 화면에서 소셜 URL 입력 항목을 `인스타그램`, `유튜브`, `카카오 오픈채팅`, `팬심M`, `X`로 변경한다.
- 기존 함수/프로퍼티 네이밍을 신규 요구사항에 맞게 정리한다.
- `ProfileUpdateRequest`의 URL 프로퍼티를 아래 명세로 변경한다.
- `youtubeUrl`
- `instagramUrl`
- `fancimmUrl`
- `xUrl`
- `kakaoOpenChatUrl`
- 사용자 노출 문자열을 `I18n` 기반으로 국제화 처리한다.
## 체크리스트
- [x] 기존 프로필 수정 소셜 URL 데이터 흐름(View/ViewModel/Request/I18n) 점검
- [x] `ProfileUpdateView` 소셜 입력 섹션 항목/함수명 변경
- [x] `ProfileUpdateViewModel` 소셜 URL 상태/비교/요청 매핑 변경
- [x] `ProfileUpdateRequest` URL 프로퍼티명을 신규 명세로 변경
- [x] `I18n.ProfileUpdate` 라벨/플레이스홀더 키를 신규 항목 기준으로 변경
- [x] 수정 파일 LSP 진단 확인
- [x] 빌드/테스트 실행 및 결과 확인
## 검증 기록
- 2026-02-27
- 무엇: 프로필 수정 소셜 URL 입력 항목을 `인스타그램/유튜브/카카오 오픈채팅/팬심M/X`로 변경하고, 요청 프로퍼티를 `youtubeUrl/instagramUrl/fancimmUrl/xUrl/kakaoOpenChatUrl`로 정렬했다.
- 왜: 크리에이터 프로필 입력 요구사항 변경 및 서버 요청 스키마 변경 요구를 반영하기 위해.
- 어떻게:
- `lsp_diagnostics` 실행 대상
- `SodaLive/Sources/MyPage/Profile/ProfileUpdateView.swift`
- `SodaLive/Sources/MyPage/Profile/ProfileUpdateViewModel.swift`
- `SodaLive/Sources/MyPage/Profile/ProfileUpdateRequest.swift`
- `SodaLive/Sources/MyPage/Profile/GetProfileResponse.swift`
- `SodaLive/Sources/I18n/I18n.swift`
- 빌드
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`
- 테스트
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test`
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test`
- 결과:
- 빌드: `SodaLive`, `SodaLive-dev` 모두 `** BUILD SUCCEEDED **` 확인.
- 테스트: 두 스킴 모두 `Scheme ... is not currently configured for the test action.`로 실행 불가(프로젝트 설정 이슈).
- LSP: SourceKit 환경에서 모듈/심볼 해석 실패(`No such module 'Kingfisher'`, `No such module 'UIKit'`, `LanguageHeaderProvider` 범위 미해결) 경고가 있었으나, 실제 Xcode 빌드는 성공해 코드 변경 자체의 컴파일은 통과.
- 2026-02-27 (리뷰 피드백 반영)
- 무엇: `xUrl` 마이그레이션 호환(`xUrl`+`xurl` 동시 전송)과 `xUrl/xurl` first non-empty 폴백을 추가 보완했다.
- 왜: 구/신 키가 혼재된 서버 환경에서 X URL 저장 누락 및 빈 문자열 우선 선택 이슈를 방지하기 위해.
- 어떻게:
- `ProfileUpdateRequest.encode(to:)` 커스텀 인코딩으로 `xUrl`, `xurl` 동시 직렬화
- `ProfileUpdateViewModel``preferredXUrl` 헬퍼 적용
- `GetProfileResponse`/`ProfileUpdateViewModel`/`ProfileUpdateRequest`/`ProfileUpdateView`의 유튜브 키를 `youtubeUrl`로 정리
- 빌드
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`
- 테스트
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test`
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test`
- 결과:
- 빌드: 두 스킴 모두 `** BUILD SUCCEEDED **` 확인.
- 테스트: 두 스킴 모두 `Scheme ... is not currently configured for the test action.`로 실행 불가(동일).
- 2026-02-27 (사용자 요청 반영: youtubeUrl 원복 + X 폴백 명시화)
- 무엇: `ulwyoutubeUrl` 사용을 제거하고 전체 프로필 수정 흐름을 `youtubeUrl`로 원복했다. 동시에 X 값은 `xUrl`이 비어있지 않으면 우선, 아니면 `xurl`, 둘 다 없으면 `""`로 처리하도록 고정했다.
- 왜: 사용자 요청에 따라 비의도적인 `ulwyoutubeUrl` 도입을 제거하고, X 폴백 조건을 명확히 해 빈 문자열 우선 문제를 방지하기 위해.
- 어떻게:
- `ProfileUpdateViewModel`: `@Published`/초기화/비교/요청 매핑을 `youtubeUrl`로 변경
- `ProfileUpdateView`: 유튜브 입력 바인딩을 `$viewModel.youtubeUrl`로 변경
- `ProfileUpdateRequest`: `youtubeUrl` 프로퍼티 및 인코딩 키 정리
- `GetProfileResponse`: `ulwyoutubeUrl` 제거, `youtubeUrl`만 유지
- `preferredXUrl(xUrl:xurl:)``xUrl -> xurl -> ""` 순서 폴백 구현
- 2026-02-27 (원복 이후 검증)
- 무엇: `youtubeUrl` 원복과 X 폴백(`xUrl` 비어있음 검사 후 `xurl`, 마지막 `""`) 적용 상태를 재검증했다.
- 어떻게:
- `lsp_diagnostics` 실행 대상
- `SodaLive/Sources/MyPage/Profile/ProfileUpdateView.swift`
- `SodaLive/Sources/MyPage/Profile/ProfileUpdateViewModel.swift`
- `SodaLive/Sources/MyPage/Profile/ProfileUpdateRequest.swift`
- `SodaLive/Sources/MyPage/Profile/GetProfileResponse.swift`
- 빌드
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build`
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`
- 테스트
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test`
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test`
- 결과:
- 빌드: 두 스킴 모두 `** BUILD SUCCEEDED **`.
- 테스트: 두 스킴 모두 `Scheme ... is not currently configured for the test action.`로 실행 불가.
- LSP: SourceKit 환경의 모듈/심볼 해석 제약(`UIKit`, `Kingfisher`, `Gender` 등)으로 로컬 진단 경고가 있으나, Xcode 실제 빌드 성공으로 변경 컴파일은 통과.