From 069a8cf5e8461435548a9f2a968c824d2b1d9756 Mon Sep 17 00:00:00 2001 From: Yu Sung Date: Fri, 3 Jul 2026 01:43:16 +0900 Subject: [PATCH] =?UTF-8?q?feat(creator):=20=ED=83=80=EC=9D=B4=ED=8B=80=20?= =?UTF-8?q?=EB=B0=94=20=EB=8B=89=EB=84=A4=EC=9E=84=EC=9D=84=20=ED=91=9C?= =?UTF-8?q?=EC=8B=9C=ED=95=9C=EB=8B=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../Components/CreatorChannelTitleBar.swift | 21 ++++++++++++------- .../CreatorChannel/CreatorChannelView.swift | 1 + docs/20260701_크리에이터_채널_홈/plan-task.md | 3 ++- 3 files changed, 17 insertions(+), 8 deletions(-) diff --git a/SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTitleBar.swift b/SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTitleBar.swift index 854a133b..fd1de8f4 100644 --- a/SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTitleBar.swift +++ b/SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTitleBar.swift @@ -1,6 +1,7 @@ import SwiftUI struct CreatorChannelTitleBar: View { + let nickname: String let isFollow: Bool let isNotify: Bool let backgroundProgress: CGFloat @@ -20,11 +21,13 @@ struct CreatorChannelTitleBar: View { } .buttonStyle(.plain) - Text("") + Text(nickname) .appFont(.heading2) - - - Spacer(minLength: 0) + .foregroundColor(Color.white) + .lineLimit(1) + .truncationMode(.tail) + .opacity(backgroundProgress >= 1 ? 1 : 0) + .frame(maxWidth: .infinity, alignment: .leading) HStack(spacing: SodaSpacing.s14) { followButton @@ -40,6 +43,7 @@ struct CreatorChannelTitleBar: View { } .buttonStyle(.plain) } + .layoutPriority(1) } .padding(.horizontal, SodaSpacing.s14) .frame(height: 56) @@ -85,9 +89,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider { static var previews: some View { VStack(spacing: SodaSpacing.s16) { CreatorChannelTitleBar( + nickname: "Soda Creator Long Nickname Soda Creator Long Nickname", isFollow: false, isNotify: false, - backgroundProgress: 0, + backgroundProgress: 1, onTapBack: {}, onTapFollow: {}, onTapUnfollow: {}, @@ -97,9 +102,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider { ) CreatorChannelTitleBar( + nickname: "Soda Creator", isFollow: true, isNotify: true, - backgroundProgress: 0, + backgroundProgress: 1, onTapBack: {}, onTapFollow: {}, onTapUnfollow: {}, @@ -109,9 +115,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider { ) CreatorChannelTitleBar( + nickname: "Soda Creator", isFollow: true, isNotify: false, - backgroundProgress: 0, + backgroundProgress: 1, onTapBack: {}, onTapFollow: {}, onTapUnfollow: {}, diff --git a/SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift b/SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift index 80e58711..3edc9fe0 100644 --- a/SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift +++ b/SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift @@ -78,6 +78,7 @@ struct CreatorChannelView: View { private func titleBar(backgroundProgress: CGFloat) -> some View { CreatorChannelTitleBar( + nickname: viewModel.response?.creator.nickname ?? "", isFollow: viewModel.response?.creator.isFollow ?? false, isNotify: viewModel.response?.creator.isNotify ?? false, backgroundProgress: backgroundProgress, diff --git a/docs/20260701_크리에이터_채널_홈/plan-task.md b/docs/20260701_크리에이터_채널_홈/plan-task.md index 016cbc54..78057956 100644 --- a/docs/20260701_크리에이터_채널_홈/plan-task.md +++ b/docs/20260701_크리에이터_채널_홈/plan-task.md @@ -304,7 +304,7 @@ - 실행 명령: `rg "PreferenceKey|GeometryReader|ZStack|overlay|backgroundProgress|Color\\.clear|opacity|isTabBarSticky|clamp|safeAreaInsets|CreatorChannelTitleBar|CreatorChannelTabBar" SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTitleBar.swift SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTabBar.swift` - 기대 결과: geometry preference 기반 계산, 기본 투명 title bar overlay, scroll 기반 title bar opacity, sticky tab-bar 상태 계산이 확인되고, tab-bar sticky 기준이 디바이스 최상단이 아니라 title bar 하단임이 확인된다. -- [ ] **Task 3.5: title bar 닉네임 표시 연결** +- [x] **Task 3.5: title bar 닉네임 표시 연결** - 대상 파일: - 수정: `SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTitleBar.swift` - 수정: `SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift` @@ -621,6 +621,7 @@ - 2026-07-02: 사용자 확인 사항을 반영해 title bar Figma URL 3종과 사용할 아이콘 asset(`ic_new_bar_back`, `ic_new_follow`, `ic_new_following`, `ic_new_more`, `ic_bar_bell`, `ic_bar_bell_fill`)을 Task 3.1 및 최종 회귀 검색 기준에 추가했다. - 2026-07-02: 기존 `UserProfile` 구현을 확인해 title bar 팔로우/팔로우 취소/알림 설정/알림 설정 취소를 `UserRepository.creatorFollow(creatorId:follow:notify:)`로 처리하고, `ic_bar_bell`/`ic_bar_bell_fill` 터치 시 각각 `notify: true`/`notify: false` 호출이 일어나도록 계획에 반영했다. - 2026-07-03: Task 3.4 구현을 완료했다. `CreatorChannelView`에서 geometry preference로 tab-bar 위치를 추적하고, sticky 기준을 디바이스 최상단이 아닌 title bar 하단(`safeAreaInsets.top + 56`)으로 계산하도록 변경했다. `rg "PreferenceKey|GeometryReader|ZStack|overlay|backgroundProgress|Color\\.clear|opacity|isTabBarSticky|clamp|safeAreaInsets|CreatorChannelTitleBar|CreatorChannelTabBar" ...` 기준 키워드를 확인했고, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`가 `BUILD SUCCEEDED`로 완료됐다. +- 2026-07-03: Task 3.5 구현을 완료했다. `CreatorChannelTitleBar`에 크리에이터 닉네임 주입값을 추가하고, `backgroundProgress`가 1일 때만 한 줄 말줄임으로 표시되도록 연결했다. 우측 팔로우/알림/더보기 영역은 `layoutPriority`로 우선 노출되도록 처리했다. `rg "nickname|lineLimit\\(1\\)|truncationMode|layoutPriority|backgroundProgress|opacity|CreatorChannelTitleBar\\(" ...` 기준 키워드를 확인했고, `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`가 `BUILD SUCCEEDED`로 완료됐다. - 2026-07-02: Task 3.2 구현을 완료하고 `CreatorChannelHeaderSection`을 공통 shell에 연결했다. `rg "struct CreatorChannelHeaderSection|CreatorChannelCreatorResponse|profileImageUrl|ignoresSafeArea\\(.*top|nickname|followerCount|DownsampledKFImage|KFImage" SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelHeaderSection.swift SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift`와 `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build` 성공으로 검증했다. - 2026-07-02: Task 3.1 title bar 컴포넌트를 `SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTitleBar.swift`로 생성하고 `CreatorChannelView`의 inline title bar를 교체했다. `rg "struct CreatorChannelTitleBar|isFollow|isNotify|backgroundProgress|onTapBack|onTapFollow|onTapUnfollow|onTapNotify|onTapUnnotify|onTapMore|ic_new_bar_back|ic_new_follow|ic_new_following|ic_new_more|ic_bar_bell|ic_bar_bell_fill|팔로우" SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelTitleBar.swift`와 `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build` 성공으로 검증했다. - 2026-07-02: 사용자 확인 사항을 반영해 HeaderView는 `CreatorChannelHomeResponse.creator` 데이터로 채우고, 별도 프로필 이미지 없이 큰 배경 이미지만 표시하며, title bar는 기본 투명 배경으로 header 위에 overlay되도록 Task 3.2/3.4/3.5와 최종 검증 기준을 갱신했다.