feat(creator): 타이틀 바 닉네임을 표시한다
This commit is contained in:
@@ -1,6 +1,7 @@
|
|||||||
import SwiftUI
|
import SwiftUI
|
||||||
|
|
||||||
struct CreatorChannelTitleBar: View {
|
struct CreatorChannelTitleBar: View {
|
||||||
|
let nickname: String
|
||||||
let isFollow: Bool
|
let isFollow: Bool
|
||||||
let isNotify: Bool
|
let isNotify: Bool
|
||||||
let backgroundProgress: CGFloat
|
let backgroundProgress: CGFloat
|
||||||
@@ -20,11 +21,13 @@ struct CreatorChannelTitleBar: View {
|
|||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
|
|
||||||
Text("")
|
Text(nickname)
|
||||||
.appFont(.heading2)
|
.appFont(.heading2)
|
||||||
|
.foregroundColor(Color.white)
|
||||||
|
.lineLimit(1)
|
||||||
Spacer(minLength: 0)
|
.truncationMode(.tail)
|
||||||
|
.opacity(backgroundProgress >= 1 ? 1 : 0)
|
||||||
|
.frame(maxWidth: .infinity, alignment: .leading)
|
||||||
|
|
||||||
HStack(spacing: SodaSpacing.s14) {
|
HStack(spacing: SodaSpacing.s14) {
|
||||||
followButton
|
followButton
|
||||||
@@ -40,6 +43,7 @@ struct CreatorChannelTitleBar: View {
|
|||||||
}
|
}
|
||||||
.buttonStyle(.plain)
|
.buttonStyle(.plain)
|
||||||
}
|
}
|
||||||
|
.layoutPriority(1)
|
||||||
}
|
}
|
||||||
.padding(.horizontal, SodaSpacing.s14)
|
.padding(.horizontal, SodaSpacing.s14)
|
||||||
.frame(height: 56)
|
.frame(height: 56)
|
||||||
@@ -85,9 +89,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider {
|
|||||||
static var previews: some View {
|
static var previews: some View {
|
||||||
VStack(spacing: SodaSpacing.s16) {
|
VStack(spacing: SodaSpacing.s16) {
|
||||||
CreatorChannelTitleBar(
|
CreatorChannelTitleBar(
|
||||||
|
nickname: "Soda Creator Long Nickname Soda Creator Long Nickname",
|
||||||
isFollow: false,
|
isFollow: false,
|
||||||
isNotify: false,
|
isNotify: false,
|
||||||
backgroundProgress: 0,
|
backgroundProgress: 1,
|
||||||
onTapBack: {},
|
onTapBack: {},
|
||||||
onTapFollow: {},
|
onTapFollow: {},
|
||||||
onTapUnfollow: {},
|
onTapUnfollow: {},
|
||||||
@@ -97,9 +102,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider {
|
|||||||
)
|
)
|
||||||
|
|
||||||
CreatorChannelTitleBar(
|
CreatorChannelTitleBar(
|
||||||
|
nickname: "Soda Creator",
|
||||||
isFollow: true,
|
isFollow: true,
|
||||||
isNotify: true,
|
isNotify: true,
|
||||||
backgroundProgress: 0,
|
backgroundProgress: 1,
|
||||||
onTapBack: {},
|
onTapBack: {},
|
||||||
onTapFollow: {},
|
onTapFollow: {},
|
||||||
onTapUnfollow: {},
|
onTapUnfollow: {},
|
||||||
@@ -109,9 +115,10 @@ struct CreatorChannelTitleBar_Previews: PreviewProvider {
|
|||||||
)
|
)
|
||||||
|
|
||||||
CreatorChannelTitleBar(
|
CreatorChannelTitleBar(
|
||||||
|
nickname: "Soda Creator",
|
||||||
isFollow: true,
|
isFollow: true,
|
||||||
isNotify: false,
|
isNotify: false,
|
||||||
backgroundProgress: 0,
|
backgroundProgress: 1,
|
||||||
onTapBack: {},
|
onTapBack: {},
|
||||||
onTapFollow: {},
|
onTapFollow: {},
|
||||||
onTapUnfollow: {},
|
onTapUnfollow: {},
|
||||||
|
|||||||
@@ -78,6 +78,7 @@ struct CreatorChannelView: View {
|
|||||||
|
|
||||||
private func titleBar(backgroundProgress: CGFloat) -> some View {
|
private func titleBar(backgroundProgress: CGFloat) -> some View {
|
||||||
CreatorChannelTitleBar(
|
CreatorChannelTitleBar(
|
||||||
|
nickname: viewModel.response?.creator.nickname ?? "",
|
||||||
isFollow: viewModel.response?.creator.isFollow ?? false,
|
isFollow: viewModel.response?.creator.isFollow ?? false,
|
||||||
isNotify: viewModel.response?.creator.isNotify ?? false,
|
isNotify: viewModel.response?.creator.isNotify ?? false,
|
||||||
backgroundProgress: backgroundProgress,
|
backgroundProgress: backgroundProgress,
|
||||||
|
|||||||
@@ -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`
|
- 실행 명령: `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 하단임이 확인된다.
|
- 기대 결과: 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/Components/CreatorChannelTitleBar.swift`
|
||||||
- 수정: `SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.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: 사용자 확인 사항을 반영해 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-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.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.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: 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와 최종 검증 기준을 갱신했다.
|
- 2026-07-02: 사용자 확인 사항을 반영해 HeaderView는 `CreatorChannelHomeResponse.creator` 데이터로 채우고, 별도 프로필 이미지 없이 큰 배경 이미지만 표시하며, title bar는 기본 투명 배경으로 header 위에 overlay되도록 Task 3.2/3.4/3.5와 최종 검증 기준을 갱신했다.
|
||||||
|
|||||||
Reference in New Issue
Block a user