feat(main): 생성 메뉴를 홈에 추가한다
This commit is contained in:
@@ -621,6 +621,70 @@ Expected: 현재 저장소 상태상 테스트 번들 타깃이 없으면 `Schem
|
||||
- `채팅`: `ic_nav_chat_selected` / `ic_nav_chat`
|
||||
- `마이`: `ic_tabbar_my_selected` / `ic_nav_my`
|
||||
|
||||
### Phase 13: 메인 홈 크리에이터 생성 Floating Menu
|
||||
|
||||
- [x] **Task 13.1: 내 채널 생성 메뉴를 공용 컴포넌트로 이동**
|
||||
- 대상 파일:
|
||||
- 이동/이름 변경: `SodaLive/Sources/V2/CreatorChannel/Components/CreatorChannelFloatingActionMenu.swift`
|
||||
- 생성 위치: `SodaLive/Sources/V2/Component/Button/CreatorContentCreationFloatingActionMenu.swift`
|
||||
- 수정: `SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift`
|
||||
- 확인: `SodaLive/Sources/I18n/I18n.swift`
|
||||
- 작업 내용:
|
||||
- 내 채널 홈의 `CreatorChannelFloatingActionMenu`를 두 페이지에서 재사용할 수 있는 공용 컴포넌트로 이동하고 이름을 역할 중심으로 변경한다.
|
||||
- `ic_plus_no_bg`, `ic_new_upload_community_post`, `ic_new_upload_audio`, `ic_new_create_live`, `ic_new_x_black`, dim, 버튼 순서, spring animation을 변경하지 않는다.
|
||||
- 내 채널 홈도 이동한 공용 컴포넌트를 사용해 기존 UI와 action을 유지한다.
|
||||
- 검증 기준:
|
||||
- 실행 명령: `rg "CreatorContentCreationFloatingActionMenu|ic_plus_no_bg|ic_new_upload_community_post|ic_new_upload_audio|ic_new_create_live|ic_new_x_black|interpolatingSpring\\(mass: 1, stiffness: 256, damping: 24" SodaLive/Sources/V2/Component/Button SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift`
|
||||
- 기대 결과: 하나의 공용 생성 메뉴 구현을 내 채널 홈에서 사용하고, 기존 아이콘과 animation 값이 유지된다.
|
||||
|
||||
- [x] **Task 13.2: 메인 홈에 크리에이터 조건으로 생성 메뉴 표시**
|
||||
- 대상 파일:
|
||||
- 수정: `SodaLive/Sources/V2/Main/MainView.swift`
|
||||
- 확인: `SodaLive/Sources/Extensions/UserDefaultsExtension.swift`
|
||||
- 확인: `SodaLive/Sources/Settings/Notification/GetMemberInfoResponse.swift`
|
||||
- 작업 내용:
|
||||
- `UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue`로 크리에이터 여부를 판별한다.
|
||||
- 크리에이터이고 `viewModel.currentTab == .home`일 때만 공용 생성 floating menu를 `MainView` 최상위 `ZStack`에 표시한다.
|
||||
- 메인 홈 내부 `추천`, `랭킹`, `팔로잉` 전환과 관계없이 메뉴를 유지한다.
|
||||
- `.content`, `.chat`, `.my`로 이동하거나 일반 사용자로 앱을 사용하면 menu/dim을 표시하지 않는다.
|
||||
- 미니 플레이어와 하단 탭바가 표시될 때 겹치지 않도록 기존 safe area 구조를 따른다.
|
||||
- 검증 기준:
|
||||
- 실행 명령: `rg "MemberRole\\.CREATOR|viewModel\\.currentTab == \\.home|CreatorContentCreationFloatingActionMenu" SodaLive/Sources/V2/Main/MainView.swift`
|
||||
- 기대 결과: 크리에이터와 메인 홈 탭 조건을 모두 만족할 때만 공용 생성 메뉴가 표시된다.
|
||||
|
||||
- [x] **Task 13.3: 기존 등록·생성 action 연결**
|
||||
- 대상 파일:
|
||||
- 수정: `SodaLive/Sources/V2/Main/MainView.swift`
|
||||
- 확인: `SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift`
|
||||
- 확인: `SodaLive/Sources/Live/LiveView.swift`
|
||||
- 확인: `SodaLive/Sources/App/AppStep.swift`
|
||||
- 작업 내용:
|
||||
- 커뮤니티 게시글 등록은 기존 `AppStep.creatorCommunityWrite(onSuccess:)`로 이동한다.
|
||||
- 콘텐츠 등록은 기존 `AppStep.createContent(onSuccess:)`로 이동한다.
|
||||
- 라이브 생성은 기존 `AppStep.createLive(timeSettingMode: .NOW, onSuccess:)`로 이동한다.
|
||||
- 라이브 생성 성공 시 내 채널 홈과 `LiveView.onCreateSuccess`의 기존 흐름처럼 라이브 메인 데이터를 갱신하고, `response.channelName`이 있으면 생성된 room에 입장한다.
|
||||
- 각 action 실행 전에 floating menu를 닫는다.
|
||||
- 메인 홈 전용 신규 route, 작성/생성 API, 별도 화면을 추가하지 않는다.
|
||||
- 검증 기준:
|
||||
- 실행 명령: `rg "creatorCommunityWrite|createContent|createLive\\(timeSettingMode: \\.NOW|getLiveMain|enterRoom|is.*ActionMenuPresented = false" SodaLive/Sources/V2/Main/MainView.swift`
|
||||
- 기대 결과: 세 버튼이 기존 route에 연결되고 라이브 생성 성공 흐름과 menu 닫힘 처리가 확인된다.
|
||||
|
||||
- [x] **Task 13.4: 정적·빌드·수동 검증**
|
||||
- 대상 파일/화면:
|
||||
- 확인: `SodaLive/Sources/V2/Main/MainView.swift`
|
||||
- 확인: `SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift`
|
||||
- 확인: `SodaLive.xcworkspace`
|
||||
- 수동 확인: 크리에이터/일반 사용자 메인 화면과 내 채널 홈
|
||||
- 작업 내용:
|
||||
- 공용 메뉴 사용처와 지정 아이콘/action을 정적 검색한다.
|
||||
- `SodaLive-dev` Debug 빌드를 실행한다.
|
||||
- 크리에이터 메인 홈, 일반 사용자 메인 홈, 메인 홈 외 탭, 내 채널 홈에서 표시 조건과 회귀 여부를 확인한다.
|
||||
- 각 생성 버튼이 기존 등록/생성 화면으로 이동하는지 확인한다.
|
||||
- 검증 기준:
|
||||
- 실행 명령: `rg "CreatorContentCreationFloatingActionMenu" SodaLive/Sources/V2/Main SodaLive/Sources/V2/CreatorChannel SodaLive/Sources/V2/Component/Button`
|
||||
- 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`
|
||||
- 기대 결과: 메인 홈과 내 채널 홈이 같은 공용 메뉴를 사용하고 빌드가 성공하며, 크리에이터에게만 메인 홈 메뉴가 노출된다.
|
||||
|
||||
## 검증 기록
|
||||
|
||||
- 계획 문서 작성 단계에서는 코드 구현을 수행하지 않았다.
|
||||
@@ -651,6 +715,32 @@ Expected: 현재 저장소 상태상 테스트 번들 타깃이 없으면 `Schem
|
||||
- 2026-07-08 메인 콘텐츠 탭 title bar 요구사항 반영: Figma node `24:6738` 기준으로 콘텐츠 탭 상단은 홈 탭과 같은 좌측 로고/우측 알림 버튼 구성이 아니라, 좌측에 메인 탭명 `콘텐츠`를 고정 표시하고 우측에는 `ic_bar_cash`, `ic_bar_search`, `ic_bar_storage`를 표시하도록 수정했다.
|
||||
- 2026-07-08 메인 콘텐츠 탭 보관함 이동 반영: `ic_bar_storage` 터치 시 기존 보관함 진입 경로인 `AppState.shared.setAppStep(step: .myBox(currentTab: .orderlist))`로 이동하도록 `MainContentView`에 `onTapStorage` 콜백을 추가하고 `MainView`에서 연결했다. 홈 탭의 `HomeTitleBar`/`ic_bar_bell` 동작은 유지한다.
|
||||
- 2026-07-08 검증: Figma `24:6738` design context와 screenshot을 확인했고, `rg`/`ast-grep`로 콘텐츠 탭은 `DefaultTitleBar(title: MainTab.content.title)`와 `ic_bar_storage`, 홈 탭은 기존 `HomeTitleBar`와 `ic_bar_bell`을 사용하는 것을 확인했다. 구현 직후 `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" -destination 'generic/platform=iOS Simulator' -configuration Debug build` 실행 결과 빌드 성공을 확인했다.
|
||||
- 2026-07-20 문서 보강: 크리에이터가 메인 홈에서 라이브 생성, 콘텐츠 등록, 커뮤니티 게시글 등록을 실행할 수 있도록 Phase 13을 추가했다. `CreatorChannelFloatingActionMenu`, `CreatorChannelView`의 세 action, `MemberRole.CREATOR` 역할 판별 근거를 확인해 같은 아이콘·animation·기존 `AppStep` route를 공용화하는 범위로 기록했다. 이번 작업은 문서 수정만 수행했으며 구현/빌드는 Phase 13 실행 시 검증한다.
|
||||
- 2026-07-20 Phase 13 구현: `CreatorChannelFloatingActionMenu`를 `SodaLive/Sources/V2/Component/Button/CreatorContentCreationFloatingActionMenu.swift`로 이동/이름 변경하고, 내 채널 홈과 메인 홈이 같은 공용 메뉴를 사용하도록 반영했다.
|
||||
- 실행 명령: `rg -n "CreatorContentCreationFloatingActionMenu|ic_plus_no_bg|ic_new_upload_community_post|ic_new_upload_audio|ic_new_create_live|ic_new_x_black|interpolatingSpring\\(mass: 1, stiffness: 256, damping: 24" "SodaLive/Sources/V2/Component/Button" "SodaLive/Sources/V2/CreatorChannel/CreatorChannelView.swift"`
|
||||
- 결과: 공용 메뉴 구현과 내 채널 홈 사용처, 기존 plus/커뮤니티/오디오/라이브/닫기 아이콘 및 spring animation 값이 확인됐다.
|
||||
- 실행 명령: `rg -n "MemberRole\\.CREATOR|viewModel\\.currentTab == \\.home|CreatorContentCreationFloatingActionMenu" "SodaLive/Sources/V2/Main/MainView.swift"`
|
||||
- 결과: `UserDefaults.string(forKey: .role) == MemberRole.CREATOR.rawValue && viewModel.currentTab == .home` 조건에서만 메인 홈 생성 메뉴를 표시하는 것을 확인했다.
|
||||
- 실행 명령: `rg -n "creatorCommunityWrite|createContent\\(onSuccess|createLive\\(timeSettingMode: \\.NOW|getLiveMain|enterRoom|isCreatorActionMenuPresented = false" "SodaLive/Sources/V2/Main/MainView.swift"`
|
||||
- 결과: 커뮤니티 게시글 등록, 콘텐츠 등록, 즉시 라이브 생성 route 연결과 action 실행 전 메뉴 닫힘, 라이브 생성 성공 후 `getLiveMain()` 및 `enterRoom(roomId:)` 흐름을 확인했다.
|
||||
- 실행 명령: `rg -n "CreatorContentCreationFloatingActionMenu" "SodaLive/Sources/V2/Main" "SodaLive/Sources/V2/CreatorChannel" "SodaLive/Sources/V2/Component/Button"`
|
||||
- 결과: 공용 메뉴 구현 1개와 `MainView`, `CreatorChannelView` 사용처가 확인됐다.
|
||||
- 실행 명령: `lsp_diagnostics` (`CreatorContentCreationFloatingActionMenu.swift`, `CreatorChannelView.swift`, `MainView.swift`)
|
||||
- 결과: SourceKit 단독 컨텍스트 한계로 전역 프로젝트 심볼 인식 오류/timeout이 보고되어 실제 컴파일 유효성은 빌드로 판정했다.
|
||||
- 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build`
|
||||
- 결과: `** BUILD SUCCEEDED **`.
|
||||
- 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive" test`
|
||||
- 결과: `Scheme SodaLive is not currently configured for the test action.`
|
||||
- 실행 명령: `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug -destination "platform=iOS Simulator,name=iPhone 17,OS=26.0" build`
|
||||
- 결과: `** BUILD SUCCEEDED **`.
|
||||
- 실행 명령: `xcrun simctl spawn "iPhone 17" defaults write kr.co.vividnext.sodalive.debug2 role CREATOR`, `token`, `isViewedOnboardingView` 설정 후 앱 launch 및 screenshot 캡처
|
||||
- 결과: `/var/folders/yh/8xsbvpsj5wg2qnxzxdp11_gm0000gn/T/opencode/sodalive-phase13-creator-main-retry.png`에서 메인 홈 하단 오른쪽 plus floating action button 표시를 확인했다.
|
||||
- 정리 명령: `xcrun simctl spawn "iPhone 17" defaults delete ...` 및 `xcrun simctl shutdown "iPhone 17"`
|
||||
- 결과: Phase 13 수동 검증용 시뮬레이터 기본값 제거와 시뮬레이터 종료를 완료했다.
|
||||
- 실행 명령: `git diff --check`
|
||||
- 결과: 공백 오류 없음.
|
||||
- 실행 도구: 리뷰어 게이트 `task(category="deep")`
|
||||
- 결과: 차단 결함 없음. 자동 테스트는 test action 미구성으로 실행할 수 없고, 생성 버튼 실제 탭 이동은 정적 라우팅 검토로 확인했다는 메모만 남았다.
|
||||
|
||||
## 커밋 정책
|
||||
|
||||
|
||||
Reference in New Issue
Block a user