diff --git a/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_alarm.imageset/Contents.json b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_alarm.imageset/Contents.json new file mode 100644 index 0000000..fb4c11b --- /dev/null +++ b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_alarm.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_live_creator_follow_alarm.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_alarm.imageset/ic_live_creator_follow_alarm.png b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_alarm.imageset/ic_live_creator_follow_alarm.png new file mode 100644 index 0000000..97ef001 Binary files /dev/null and b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_alarm.imageset/ic_live_creator_follow_alarm.png differ diff --git a/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_no_alarm.imageset/Contents.json b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_no_alarm.imageset/Contents.json new file mode 100644 index 0000000..af10a80 --- /dev/null +++ b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_no_alarm.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_live_creator_follow_no_alarm.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_no_alarm.imageset/ic_live_creator_follow_no_alarm.png b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_no_alarm.imageset/ic_live_creator_follow_no_alarm.png new file mode 100644 index 0000000..e2cc235 Binary files /dev/null and b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_no_alarm.imageset/ic_live_creator_follow_no_alarm.png differ diff --git a/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_plus.imageset/Contents.json b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_plus.imageset/Contents.json new file mode 100644 index 0000000..59b7b10 --- /dev/null +++ b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_plus.imageset/Contents.json @@ -0,0 +1,21 @@ +{ + "images" : [ + { + "idiom" : "universal", + "scale" : "1x" + }, + { + "filename" : "ic_live_creator_follow_plus.png", + "idiom" : "universal", + "scale" : "2x" + }, + { + "idiom" : "universal", + "scale" : "3x" + } + ], + "info" : { + "author" : "xcode", + "version" : 1 + } +} diff --git a/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_plus.imageset/ic_live_creator_follow_plus.png b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_plus.imageset/ic_live_creator_follow_plus.png new file mode 100644 index 0000000..b657878 Binary files /dev/null and b/SodaLive/Resources/Assets.xcassets/ic_live_creator_follow_plus.imageset/ic_live_creator_follow_plus.png differ diff --git a/SodaLive/Sources/I18n/I18n.swift b/SodaLive/Sources/I18n/I18n.swift index 37f31ab..b07f3dc 100644 --- a/SodaLive/Sources/I18n/I18n.swift +++ b/SodaLive/Sources/I18n/I18n.swift @@ -773,6 +773,8 @@ enum I18n { static var notice: String { pick(ko: "공지", en: "Notice", ja: "お知らせ") } static var menuPan: String { pick(ko: "메뉴판", en: "Menu", ja: "メニュー表") } static var participants: String { pick(ko: "참여자", en: "Participants", ja: "リスナー") } + static var follow: String { pick(ko: "팔로우", en: "Follow", ja: "フォロー") } + static var following: String { pick(ko: "팔로잉", en: "Following", ja: "フォロー中") } } enum LiveNow { diff --git a/SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift b/SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift index d013e13..9ed8aea 100644 --- a/SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift +++ b/SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift @@ -214,10 +214,7 @@ struct LiveRoomInfoGuestView: View { .onTapGesture { onClickTotalDonation() } if creatorId != UserDefaults.int(forKey: .userId) { - let asset = FollowButtonImageAsset(type: followButtonType) - asset.imageView(defaultSize: CGSize(width: 83.3, height: 26.7)) - .contentShape(Rectangle()) - .onTapGesture { onClickFollow() } + followButtonView } } } @@ -236,6 +233,41 @@ struct LiveRoomInfoGuestView: View { UIScrollView.appearance().bounces = true } } + + private var followButtonText: String { + followButtonType == .follow ? I18n.LiveRoom.follow : I18n.LiveRoom.following + } + + private var followButtonIconName: String { + switch followButtonType { + case .follow: + return "ic_live_creator_follow_plus" + case .following: + return "ic_live_creator_follow_alarm" + case .followingNoAlarm: + return "ic_live_creator_follow_no_alarm" + } + } + + private var followButtonView: some View { + HStack(spacing: 6.7) { + Image(followButtonIconName) + .resizable() + .frame(width: 12, height: 12) + + Text(followButtonText) + .appFont(size: 12, weight: .medium) + .foregroundColor(.graybb) + } + .padding(.horizontal, 11) + .padding(.vertical, 5.3) + .overlay( + RoundedRectangle(cornerRadius: 5.3) + .stroke(Color.graybb, lineWidth: 1) + ) + .contentShape(Rectangle()) + .onTapGesture { onClickFollow() } + } } struct LiveRoomInfoGuestView_Previews: PreviewProvider { diff --git a/docs/20260305_라이브룸팔로우버튼높이정렬.md b/docs/20260305_라이브룸팔로우버튼높이정렬.md new file mode 100644 index 0000000..78fc766 --- /dev/null +++ b/docs/20260305_라이브룸팔로우버튼높이정렬.md @@ -0,0 +1,32 @@ +## 작업 계획 + +- [x] `LiveRoomInfoGuestView`에서 하트/후원 캔 카운트 버튼의 높이 스타일 수치 확인 +- [x] 팔로우 버튼의 간격/패딩/스트로크를 카운트 버튼과 동일 수치로 정렬 +- [x] 변경 파일 진단 및 빌드/테스트 검증 실행 +- [x] 본 문서 하단에 검증 기록 누적 + +## 검증 기록 + +- [2026-03-05] 무엇/왜/어떻게: 하트/후원 캔 버튼과 동일 높이 적용을 위해 기준 스타일 값을 확인함. + - 확인 파일: `SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift` + - 확인값: `spacing 6.7`, `icon 12x12`, `font size 12(.medium)`, `padding h11/v5.3`, `cornerRadius 5.3`, `stroke graybb 1` + +- [2026-03-05] 무엇/왜/어떻게: 팔로우 버튼 높이와 룩앤필을 하트/후원 캔 버튼과 동일하게 정렬함. + - 변경 파일: `SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift` + - 변경 내용: `followButtonView`의 `HStack spacing`을 `6.7`로, 패딩을 `horizontal 11 / vertical 5.3`으로 조정 + +- [2026-03-05] 무엇/왜/어떻게: 수정 파일 정적 진단을 위해 `lsp_diagnostics`를 실행함. + - 실행: `lsp_diagnostics(filePath: SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift)` + - 결과: SourceKit 인덱싱 컨텍스트에서 다수 심볼 미해결 오류가 표시되었으나, 아래 전체 빌드 성공으로 컴파일 무결성을 확인함. + +- [2026-03-05] 무엇/왜/어떻게: 운영/개발 스킴 회귀 확인을 위해 빌드를 수행함. + - 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build` + - 결과: `** BUILD SUCCEEDED **` + - 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build` + - 결과: `** BUILD SUCCEEDED **` + +- [2026-03-05] 무엇/왜/어떻게: 테스트 액션 가능 여부를 확인함. + - 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test` + - 결과: `Scheme SodaLive is not currently configured for the test action.` + - 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test` + - 결과: `Scheme SodaLive-dev is not currently configured for the test action.` diff --git a/docs/20260305_라이브룸팔로우팔로잉버튼수정.md b/docs/20260305_라이브룸팔로우팔로잉버튼수정.md new file mode 100644 index 0000000..ba60e02 --- /dev/null +++ b/docs/20260305_라이브룸팔로우팔로잉버튼수정.md @@ -0,0 +1,27 @@ +## 작업 계획 + +- [x] `LiveRoomInfoGuestView`의 팔로우 버튼을 이미지 기반에서 텍스트+아이콘 조합으로 변경 +- [x] 팔로우 상태별 아이콘 적용 (`ic_live_creator_follow_plus`, `ic_live_creator_follow_alarm`, `ic_live_creator_follow_no_alarm`) +- [x] 팔로우/팔로잉 텍스트를 `I18n`으로 분리하고 적용 +- [x] 변경 파일 기준 진단 및 빌드/테스트 검증 실행 +- [x] 결과를 본 문서 하단 검증 기록에 누적 + +## 검증 기록 + +- [2026-03-05] 무엇/왜/어떻게: 수정 파일 정적 진단 확인을 위해 `lsp_diagnostics`를 실행해 신규 문법 오류 여부를 점검함. + - 실행: `lsp_diagnostics(filePath: SodaLive/Sources/Live/Room/V2/Component/View/LiveRoomInfoGuestView.swift)`, `lsp_diagnostics(filePath: SodaLive/Sources/I18n/I18n.swift)` + - 결과: SourceKit 인덱싱 컨텍스트 한계로 다수의 심볼 미해결 오류가 표시되었으나, 아래 `xcodebuild` 전체 빌드에서 컴파일 성공으로 실제 빌드 무결성을 확인함. + +- [2026-03-05] 무엇/왜/어떻게: 운영 스킴 기준 회귀 확인을 위해 앱 빌드를 수행함. + - 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -configuration Debug build` + - 결과: `** BUILD SUCCEEDED **` + +- [2026-03-05] 무엇/왜/어떻게: 개발 스킴 기준 회귀 확인을 위해 앱 빌드를 수행함. + - 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build` + - 결과: `** BUILD SUCCEEDED **` + +- [2026-03-05] 무엇/왜/어떻게: 테스트 액션 가능 여부 확인을 위해 두 스킴 테스트를 실행함. + - 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test` + - 결과: `Scheme SodaLive is not currently configured for the test action.` + - 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test` + - 결과: `Scheme SodaLive-dev is not currently configured for the test action.`