feat(home): 사업자 정보 섹션을 연결한다
This commit is contained in:
@@ -234,6 +234,9 @@
|
||||
401A3FDA2FEEB00700A5BBA3 /* MainHomeCheerCreatorSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 401A3FDB2FEEB00700A5BBA3 /* MainHomeCheerCreatorSection.swift */; };
|
||||
401A3FDD2FEEB00800A5BBA3 /* MainHomePopularCommunitySection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 401A3FDC2FEEB00800A5BBA3 /* MainHomePopularCommunitySection.swift */; };
|
||||
401A3FDE2FEEB00800A5BBA3 /* MainHomePopularCommunitySection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 401A3FDC2FEEB00800A5BBA3 /* MainHomePopularCommunitySection.swift */; };
|
||||
401A3FE02FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 401A3FDF2FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift */; };
|
||||
401A3FE12FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 401A3FDF2FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift */; };
|
||||
401A3FE22FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift in Sources */ = {isa = PBXBuildFile; fileRef = 401A3FDF2FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift */; };
|
||||
40235DED2E3797EB00B09A87 /* RecentContent+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40235DEC2E3797EB00B09A87 /* RecentContent+CoreDataClass.swift */; };
|
||||
40235DEE2E3797EB00B09A87 /* RecentContent+CoreDataClass.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40235DEC2E3797EB00B09A87 /* RecentContent+CoreDataClass.swift */; };
|
||||
40235DF02E37983D00B09A87 /* PersistenceController.swift in Sources */ = {isa = PBXBuildFile; fileRef = 40235DEF2E37983D00B09A87 /* PersistenceController.swift */; };
|
||||
@@ -1755,6 +1758,7 @@
|
||||
401A3FD52FEEB00600A5BBA3 /* MainHomeGenreCreatorSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainHomeGenreCreatorSection.swift; sourceTree = "<group>"; };
|
||||
401A3FDB2FEEB00700A5BBA3 /* MainHomeCheerCreatorSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainHomeCheerCreatorSection.swift; sourceTree = "<group>"; };
|
||||
401A3FDC2FEEB00800A5BBA3 /* MainHomePopularCommunitySection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainHomePopularCommunitySection.swift; sourceTree = "<group>"; };
|
||||
401A3FDF2FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MainHomeBusinessInfoSection.swift; sourceTree = "<group>"; };
|
||||
40235DEC2E3797EB00B09A87 /* RecentContent+CoreDataClass.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "RecentContent+CoreDataClass.swift"; sourceTree = "<group>"; };
|
||||
40235DEF2E37983D00B09A87 /* PersistenceController.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = PersistenceController.swift; sourceTree = "<group>"; };
|
||||
40235DF22E37987300B09A87 /* RecentContentService.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = RecentContentService.swift; sourceTree = "<group>"; };
|
||||
@@ -2762,6 +2766,7 @@
|
||||
401A3FD52FEEB00600A5BBA3 /* MainHomeGenreCreatorSection.swift */,
|
||||
401A3FDB2FEEB00700A5BBA3 /* MainHomeCheerCreatorSection.swift */,
|
||||
401A3FDC2FEEB00800A5BBA3 /* MainHomePopularCommunitySection.swift */,
|
||||
401A3FDF2FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift */,
|
||||
);
|
||||
path = Components;
|
||||
sourceTree = "<group>";
|
||||
@@ -5364,6 +5369,7 @@
|
||||
401A3FC92FEEB00300A5BBA3 /* MainHomeActiveCreatorSection.swift in Sources */,
|
||||
401A3FCE2FEEB00400A5BBA3 /* MainHomeRecentDebutCreatorSection.swift in Sources */,
|
||||
401A3FD12FEEB00500A5BBA3 /* MainHomeAiCharacterSection.swift in Sources */,
|
||||
401A3FE02FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift in Sources */,
|
||||
401A3FAA2FEEAFA000A5BBA3 /* MainHomeRankingView.swift in Sources */,
|
||||
401A3FAB2FEEAFA000A5BBA3 /* MainHomeFollowingView.swift in Sources */,
|
||||
409143302A85652F00EEBFB1 /* CanChargeView.swift in Sources */,
|
||||
@@ -6118,6 +6124,7 @@
|
||||
401A3FD72FEEB00600A5BBA3 /* MainHomeGenreCreatorSection.swift in Sources */,
|
||||
401A3FD92FEEB00700A5BBA3 /* MainHomeCheerCreatorSection.swift in Sources */,
|
||||
401A3FDD2FEEB00800A5BBA3 /* MainHomePopularCommunitySection.swift in Sources */,
|
||||
401A3FE12FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift in Sources */,
|
||||
401A3FAE2FEEAFA000A5BBA3 /* MainHomeRankingView.swift in Sources */,
|
||||
401A3FAF2FEEAFA000A5BBA3 /* MainHomeFollowingView.swift in Sources */,
|
||||
B3AF650899B8FC84E0C0CDA0 /* MainPlaceholderTabView.swift in Sources */,
|
||||
@@ -6899,6 +6906,7 @@
|
||||
401A3FD82FEEB00600A5BBA3 /* MainHomeGenreCreatorSection.swift in Sources */,
|
||||
401A3FDA2FEEB00700A5BBA3 /* MainHomeCheerCreatorSection.swift in Sources */,
|
||||
401A3FDE2FEEB00800A5BBA3 /* MainHomePopularCommunitySection.swift in Sources */,
|
||||
401A3FE22FEEB00900A5BBA3 /* MainHomeBusinessInfoSection.swift in Sources */,
|
||||
401A3FB22FEEAFA000A5BBA3 /* MainHomeRankingView.swift in Sources */,
|
||||
401A3FB32FEEAFA000A5BBA3 /* MainHomeFollowingView.swift in Sources */,
|
||||
ACD71056E97E13E48941ABBB /* MainPlaceholderTabView.swift in Sources */,
|
||||
|
||||
@@ -1507,47 +1507,29 @@ enum I18n {
|
||||
pick(
|
||||
ko: """
|
||||
- 회사명 : 주식회사 소다라이브
|
||||
|
||||
- 대표자 : 이재형
|
||||
|
||||
- 주소 : 경기도 성남시 분당구 황새울로335번길 10, 5층 563A호
|
||||
|
||||
- 사업자등록번호 : 870-81-03220
|
||||
|
||||
- 통신판매업신고 : 제2024-성남분당B-1012호
|
||||
|
||||
- 고객센터 : 02.2055.1477 (이용시간 10:00~19:00)
|
||||
|
||||
- 대표 이메일 : sodalive.official@gmail.com
|
||||
""",
|
||||
en: """
|
||||
- Company: SodaLive Co., Ltd.
|
||||
|
||||
- CEO: Jaehyung Lee
|
||||
|
||||
- Address: 5F 563A, 10, Hwangsaeul-ro335beon-gil, Bundang-gu, Seongnam-si, Gyeonggi-do
|
||||
|
||||
- Business Registration No.: 870-81-03220
|
||||
|
||||
- Mail-order business report No.: 2024-SeongnamBundangB-1012
|
||||
|
||||
- Customer center: +82-2-2055-1477 (Hours 10:00~19:00)
|
||||
|
||||
- Email: sodalive.official@gmail.com
|
||||
""",
|
||||
ja: """
|
||||
- 会社名:株式会社SodaLive
|
||||
|
||||
- 代表者:イ・ジェヒョン
|
||||
|
||||
- 住所:京畿道 城南市 盆唐区 黄새울路335番ギル10、5階563A号
|
||||
|
||||
- 事業者登録番号:870-81-03220
|
||||
|
||||
- 通信販売業届出:第2024-城南盆唐B-1012号
|
||||
|
||||
- カスタマーセンター:02.2055.1477(利用時間 10:00~19:00)
|
||||
|
||||
- 代表メール:sodalive.official@gmail.com
|
||||
"""
|
||||
)
|
||||
|
||||
@@ -0,0 +1,76 @@
|
||||
import SwiftUI
|
||||
|
||||
struct MainHomeBusinessInfoSection: View {
|
||||
var body: some View {
|
||||
BusinessInfoExpandableTextView(
|
||||
text: I18n.Settings.companyInfo,
|
||||
lineLimit: 3,
|
||||
moreTitle: I18n.HomeRecommendation.more,
|
||||
collapseTitle: I18n.HomeRecommendation.collapse,
|
||||
font: .body5,
|
||||
foregroundColor: Color.gray500
|
||||
)
|
||||
.frame(maxWidth: .infinity, alignment: .leading)
|
||||
.padding(.horizontal, SodaSpacing.s14)
|
||||
}
|
||||
}
|
||||
|
||||
private struct BusinessInfoExpandableTextView: View {
|
||||
let text: String
|
||||
let lineLimit: Int
|
||||
let moreTitle: String
|
||||
let collapseTitle: String
|
||||
let font: SodaTypography
|
||||
let foregroundColor: Color
|
||||
|
||||
@State private var isExpanded = false
|
||||
@State private var fullTextHeight: CGFloat = 0
|
||||
@State private var limitedTextHeight: CGFloat = 0
|
||||
|
||||
var body: some View {
|
||||
VStack(alignment: .leading, spacing: SodaSpacing.s8) {
|
||||
Text(text)
|
||||
.appFont(font)
|
||||
.foregroundColor(foregroundColor)
|
||||
.lineLimit(isExpanded ? nil : lineLimit)
|
||||
.background(measuringText(lineLimit: nil, height: $fullTextHeight))
|
||||
.background(measuringText(lineLimit: lineLimit, height: $limitedTextHeight))
|
||||
|
||||
if fullTextHeight > limitedTextHeight + 1 {
|
||||
Button {
|
||||
isExpanded.toggle()
|
||||
} label: {
|
||||
Text(isExpanded ? collapseTitle : moreTitle)
|
||||
.appFont(.body5)
|
||||
.foregroundColor(.white)
|
||||
}
|
||||
.buttonStyle(.plain)
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
private func measuringText(lineLimit: Int?, height: Binding<CGFloat>) -> some View {
|
||||
Text(text)
|
||||
.appFont(font)
|
||||
.lineLimit(lineLimit)
|
||||
.fixedSize(horizontal: false, vertical: true)
|
||||
.hidden()
|
||||
.background(
|
||||
GeometryReader { proxy in
|
||||
Color.clear
|
||||
.onAppear { height.wrappedValue = proxy.size.height }
|
||||
.onChange(of: proxy.size.height) { newHeight in height.wrappedValue = newHeight }
|
||||
.onChange(of: text) { _ in height.wrappedValue = proxy.size.height }
|
||||
}
|
||||
)
|
||||
}
|
||||
}
|
||||
|
||||
struct MainHomeBusinessInfoSection_Previews: PreviewProvider {
|
||||
static var previews: some View {
|
||||
MainHomeBusinessInfoSection()
|
||||
.padding(.vertical, SodaSpacing.s20)
|
||||
.background(Color.black)
|
||||
.previewLayout(.sizeThatFits)
|
||||
}
|
||||
}
|
||||
@@ -87,6 +87,8 @@ struct MainHomeRecommendationView: View {
|
||||
viewModel.openCommunityPostPurchase(postId: item.postId, price: item.price)
|
||||
}
|
||||
)
|
||||
|
||||
MainHomeBusinessInfoSection()
|
||||
}
|
||||
.padding(.vertical, SodaSpacing.s20)
|
||||
}
|
||||
|
||||
@@ -401,7 +401,7 @@
|
||||
|
||||
### Phase 16: 사업자 정보 섹션 UI
|
||||
|
||||
- [ ] **Task 16.1: 사업자 정보 더보기/접기 섹션 작성/보완**
|
||||
- [x] **Task 16.1: 사업자 정보 더보기/접기 섹션 작성/보완**
|
||||
- 대상 파일:
|
||||
- 생성/보완: `SodaLive/Sources/V2/Main/Home/Recommendation/Components/MainHomeBusinessInfoSection.swift`
|
||||
- 확인/보완: `SodaLive/Sources/V2/Component/Text/ExpandableTextView.swift`
|
||||
@@ -412,7 +412,7 @@
|
||||
- 더보기 터치 시 전체 표시와 `접기`를 제공한다.
|
||||
- 외부 라이브러리를 사용하지 않는다.
|
||||
- 검증 기준:
|
||||
- 실행 명령: `rg "MainHomeBusinessInfoSection|ExpandableTextView|lineLimit|더보기|접기" SodaLive/Sources/V2`
|
||||
- 실행 명령: `rg "MainHomeBusinessInfoSection|BusinessInfoExpandableTextView|ExpandableTextView|lineLimit|더보기|접기" SodaLive/Sources/V2`
|
||||
- 기대 결과: 사업자 정보 섹션과 확장 텍스트 구현이 확인된다.
|
||||
|
||||
### Phase 17: 섹션 조립 순서와 빈 섹션 처리
|
||||
@@ -479,6 +479,21 @@
|
||||
|
||||
## 검증 기록
|
||||
|
||||
### 2026-06-30 Phase 16 사업자 정보 섹션 구현 완료
|
||||
|
||||
- 목적: V2 Main Home 추천 탭 마지막에 사업자 정보 더보기/접기 섹션을 연결
|
||||
- 수행 내용:
|
||||
- `MainHomeBusinessInfoSection`을 추가해 기존 `I18n.Settings.companyInfo`를 표시
|
||||
- 기존 `ExpandableTextView` 이름 충돌을 피하기 위해 파일 내부 전용 `BusinessInfoExpandableTextView`로 기본 3줄 `lineLimit`, `더보기`, `접기` 동작을 연결
|
||||
- `MainHomeRecommendationView`에서 인기 커뮤니티 섹션 다음에 사업자 정보 섹션을 배치
|
||||
- 신규 `MainHomeBusinessInfoSection.swift`를 `SodaLive.xcodeproj/project.pbxproj` 빌드 대상에 포함
|
||||
- 검증:
|
||||
- `rg "MainHomeBusinessInfoSection|BusinessInfoExpandableTextView|ExpandableTextView|lineLimit|더보기|접기" SodaLive/Sources/V2` 실행, 사업자 정보 섹션/3줄 제한/더보기 접기 구현 확인
|
||||
- `plutil -lint SodaLive.xcodeproj/project.pbxproj` 실행, `OK` 확인
|
||||
- `git diff --check` 실행, 출력 없이 성공 확인
|
||||
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" test` 실행, `Scheme SodaLive-dev is not currently configured for the test action`으로 테스트 액션 미구성 확인
|
||||
- `xcodebuild -workspace "SodaLive.xcworkspace" -scheme "SodaLive-dev" -configuration Debug build` 실행, `BUILD SUCCEEDED` 확인
|
||||
|
||||
### 2026-06-30 Phase 15 isLiked 컴파일 보완
|
||||
|
||||
- 목적: `HomePopularCommunityPostItem.isLiked` 추가 이후 추천 인기 커뮤니티 섹션 컴파일 오류 보완
|
||||
|
||||
Reference in New Issue
Block a user