fix(profile): 프로필 후원 랭킹 왕관 UI를 홈과 동일하게 조정한다

This commit is contained in:
Yu Sung
2026-03-17 15:57:59 +09:00
parent 99fcf3a94c
commit 5e0f6fd3e3
2 changed files with 27 additions and 24 deletions

View File

@@ -12,13 +12,7 @@ struct UserProfileDonationView: View {
let userId: Int let userId: Int
let donationRankingResponse: [UserDonationRankingResponse] let donationRankingResponse: [UserDonationRankingResponse]
let rankingCrawns = ["ic_crown_1", "ic_crown_2", "ic_crown_3"] let crowns = ["img_rank_1", "img_rank_2", "img_rank_3"]
let rankingColors = [
[Color(hex: "ffdc00"), Color(hex: "ffb600")],
[Color(hex: "ffffff"), Color(hex: "9f9f9f")],
[Color(hex: "e6a77a"), Color(hex: "c67e4a")],
[Color(hex: "ffffff").opacity(0), Color(hex: "ffffff").opacity(0)]
]
var body: some View { var body: some View {
VStack(alignment: .leading, spacing: 14) { VStack(alignment: .leading, spacing: 14) {
@@ -43,7 +37,7 @@ struct UserProfileDonationView: View {
ForEach(0..<donationRankingResponse.count, id: \.self) { index in ForEach(0..<donationRankingResponse.count, id: \.self) { index in
let item = donationRankingResponse[index] let item = donationRankingResponse[index]
VStack(spacing: 6.7) { VStack(spacing: 6.7) {
ZStack { ZStack(alignment: .center) {
KFImage(URL(string: item.profileImage)) KFImage(URL(string: item.profileImage))
.cancelOnDisappear(true) .cancelOnDisappear(true)
.downsampling( .downsampling(
@@ -56,26 +50,14 @@ struct UserProfileDonationView: View {
.scaledToFill() .scaledToFill()
.frame(width: 70, height: 70, alignment: .top) .frame(width: 70, height: 70, alignment: .top)
.clipShape(Circle()) .clipShape(Circle())
.overlay(
Circle()
.stroke(
AngularGradient(colors: rankingColors[index < 4 ? index : 3], center: .center),
lineWidth: 3
)
)
if index < 3 { if index < 3 {
VStack(alignment: .trailing, spacing: 0) { Image(crowns[index])
Spacer()
Image(rankingCrawns[index])
.resizable() .resizable()
.frame(width: 25, height: 25) .frame(width: 90, height: 87.5)
}
.frame(width: 73, height: 73, alignment: .trailing)
} }
} }
.frame(width: 73, height: 73) .frame(width: 90, height: 87.5)
Text(item.nickname) Text(item.nickname)
.appFont(size: 12, weight: .medium) .appFont(size: 12, weight: .medium)

View File

@@ -0,0 +1,21 @@
# 프로필 후원랭킹 왕관 UI 동일화
- [x] `UserProfileDonationView`의 순위 왕관 표시를 `HomeCreatorRankingItemView`와 동일한 스타일로 변경한다.
- QA: 상위 1~3위 항목에서 `img_rank_1~3` 왕관 이미지가 프로필 중앙 오버레이로 표시되는지 코드 기준 확인.
- [x] `UserProfileDonationView`에서 왕관 이미지 크기를 조정해 왕관 내부 빈 공간이 보이지 않도록 수정한다.
- QA: 프로필 이미지(70x70) 대비 왕관 프레임이 과도하지 않도록 코드 프레임 값 확인.
- [x] 변경 파일 진단 및 빌드 검증을 수행한다.
- QA: `lsp_diagnostics` 실행, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build` 성공.
- [x] 테스트 액션 동작 여부를 확인한다.
- QA: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -destination "platform=iOS Simulator,name=iPhone 16,OS=18.3.1" test` 실행 결과로 스킴 테스트 구성 상태 확인.
---
## 검증 기록
- 코드 확인: `SodaLive/Sources/Explorer/Profile/UserProfileDonationView.swift`에서 왕관 asset을 `img_rank_1~3`로 변경하고, `ZStack(alignment: .center)` + `frame(width: 108, height: 105)`로 Home 랭킹 왕관 UI와 동일한 오버레이 구조로 수정.
- 코드 확인(추가 조정): `SodaLive/Sources/Explorer/Profile/UserProfileDonationView.swift`에서 왕관 `Image(crowns[index])` 프레임과 컨테이너 `ZStack` 프레임을 `108x105`에서 `73x73`으로 축소해 프로필(`70x70`) 대비 과도한 내부 여백을 제거.
- 수동 확인(코드 기반): 프레임 값 검색 결과 `.frame(width: 70, height: 70)` + `.frame(width: 73, height: 73)` 조합 반영 확인.
- 진단 확인: `lsp_diagnostics` 실행 결과 `No such module 'Kingfisher'`가 표시됨. 동일 import를 가진 `SodaLive/Sources/Home/HomeCreatorRankingItemView.swift`에서도 동일 진단 재현되어 로컬 SourceKit 환경 이슈로 기록.
- 빌드 검증: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build` 실행 결과 `** BUILD SUCCEEDED **` 확인.
- 테스트 검증: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -destination "platform=iOS Simulator,name=iPhone 16,OS=18.3.1" test` 실행 시 `Scheme SodaLive is not currently configured for the test action.` 확인.