-
Notifications
You must be signed in to change notification settings - Fork 1
Design/#10 travel follow contents #15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
Changes from all commits
Commits
Show all changes
21 commits
Select commit
Hold shift + click to select a range
e2322f5
feat: #10 - ๋ฐ๋ผ๊ฐ๊ธฐ ์ปจํ
์ธ ํ๋ฉด RIBs ์ฐ๊ฒฐ ๋ฐ ์์กด์ฑ ์ถ๊ฐ
KimNahun dcf520d
design: #10 - ๋ฐ๋ผ๊ฐ๊ธฐ ์ปจํ
์ธ ์ด์ UI ์ถ๊ฐ ๊ตฌํ
KimNahun 997dfb2
feat: #10 - follow ์ค์ api ํธ์ถ๋ก ๋์ฒด
KimNahun c8db0e3
design: ๋ฐ๋ผ๊ฐ๊ธฐ ์ปจํ
์ธ Headerview ๋์์ธ ์์
KimNahun 1c3d8bb
design: #10 - detailviewcontroller sstickeyheader๊ตฌํ, ui ์ถ๊ฐ ๋์
KimNahun a7dc7ec
design: #10: ์ปฌ๋ ์
๋ทฐ์ ๋ด์ฉ dto์ ๋ง๊ฒ ์์
KimNahun 19633d9
design: #10 - ์๋ก์ด ์ฌํ ๋ง๋ค๊ธฐ ํ๋ฉด RIBs ์บ๋ฆฐ๋ ๊ตฌํ
KimNahun 06d398f
design: #10 - navigationbar backbutton ๋์ native conponent๋ก ๋ณ๊ฒฝ
KimNahun 6c0c432
design: #10 - ์ปค์คํ
๋ฐํ
์ํธ ๊ตฌํ
KimNahun 6a978af
fix: #10 - ๋ ์ด์์ ์ถฉ๋ ํด๊ฒฐ
KimNahun 4f7722f
feat: #10 - ์ฌํ์ ๋ด์ผ๋ฉด ํ์ด์ง ์ด๋๋๋๋ก ๊ตฌํ
KimNahun 1838e01
fix: #10 - ํญ๋ฐ ์์์ด ๋ณด์ด๋ ๋ฒ๊ทธ ์์
KimNahun 708cade
refactor: #10 - ์ฝ๋ ์คํ์ผ ๋ฆฌํฉํ ๋ง
KimNahun c9706d4
refactor: #10 - ํ๋ก์ ํธ์ ๋จ์ ๊ฒฝ๊ณ ๋ฌธ ์ ๊ฑฐ
KimNahun 2abae85
del: #10 - ์ฝ๋์ ์ฃผ์ ์ ๊ฑฐ
KimNahun d446b0a
refactor: #10 - ๋ถํ์ํ guard๋ฌธ ์ ๊ฑฐ
KimNahun ac38850
fix: #10 - api ํธ์ถ mainactor ์์ ๋ฐ ์ ์ฌ์ race condition ์ ๊ฑฐ
KimNahun 165fb33
chore: #10 - UIColor ์ฌ์ฉํ๋ ๋ถ๋ถ hexcode๋ก ๋ณ๊ฒฝ. (๋์์ธ ์์คํ
๋ณ๊ฒฝ ๋์)
KimNahun d244c07
Merge branch 'develop' into design/#10-Travel_Follow_Contents
KimNahun df1d09a
chore: #10 - DSKitAsset.Colors ์์์ ์ฐ๋๊ณณ hexcode๋ก ๋ณ๊ฒฝ
KimNahun c0d66d1
rename: #10: tabbaritemtype ๋ค์ด๋ฐ ๋ณ๊ฒฝ
KimNahun File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,19 @@ | ||
| // | ||
| // FollowRepositoryFactory.swift | ||
| // Data | ||
| // | ||
| // Created by kimnahun on 2026-01-23. | ||
| // Copyright ยฉ 2026 NDGL-iOS. All rights reserved. | ||
| // | ||
|
|
||
| import Domain | ||
| import Foundation | ||
| import Networks | ||
|
|
||
| public func makeFollowService() -> FollowServiceProtocol { | ||
| FollowService() | ||
| } | ||
|
|
||
| public func makeFollowRepository(service: FollowServiceProtocol) -> FollowRepositoryProtocol { | ||
| FollowRepository(service: service) | ||
| } |
41 changes: 41 additions & 0 deletions
41
Projects/Data/Sources/Repository/Follow/FollowRepository.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,41 @@ | ||
| // | ||
| // FollowRepository.swift | ||
| // Data | ||
| // | ||
| // Created by kimnahun on 2026-01-23. | ||
| // Copyright ยฉ 2026 NDGL-iOS. All rights reserved. | ||
| // | ||
|
|
||
| import Domain | ||
| import Foundation | ||
| import Networks | ||
|
|
||
| public final class FollowRepository: FollowRepositoryProtocol, @unchecked Sendable { | ||
| private let service: FollowServiceProtocol | ||
|
|
||
| public init(service: FollowServiceProtocol) { | ||
| self.service = service | ||
| } | ||
|
|
||
| public func fetchTravelDetail(id: Int) async -> TravelDetail? { | ||
| let result = await service.getContentCard(id: id) | ||
|
|
||
| switch result { | ||
| case .success(let response): | ||
| return response.toDomain() | ||
| case .failure, .networkFailure: | ||
| return nil | ||
| } | ||
| } | ||
|
|
||
| public func fetchPlaces(travelId: Int, day: Int) async -> [TravelPlace] { | ||
| let result = await service.getItinerary(id: travelId, day: day) | ||
|
|
||
| switch result { | ||
| case .success(let response): | ||
| return response.toDomain() | ||
| case .failure, .networkFailure: | ||
| return [] | ||
| } | ||
| } | ||
| } | ||
This file was deleted.
Oops, something went wrong.
74 changes: 74 additions & 0 deletions
74
Projects/Data/Sources/Transform/Follow/FollowTransform.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,74 @@ | ||
| // | ||
| // FollowTransform.swift | ||
| // Data | ||
| // | ||
| // Created by kimnahun on 2026-01-23. | ||
| // Copyright ยฉ 2026 NDGL-iOS. All rights reserved. | ||
| // | ||
|
|
||
| import Domain | ||
| import Foundation | ||
| import Networks | ||
|
|
||
| // MARK: - ContentCard Response to TravelDetail | ||
|
|
||
| extension FollowContentCardResponse { | ||
| func toDomain() -> TravelDetail { | ||
| TravelDetail( | ||
| travelId: travelId, | ||
| country: country, | ||
| city: city, | ||
| budgetPerPerson: budgetPerPerson, | ||
| nights: nights, | ||
| days: days, | ||
| youtube: youtube.toDomain() | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| extension YouTubeResponse { | ||
| func toDomain() -> YouTubeInfo { | ||
| YouTubeInfo( | ||
| title: title, | ||
| youtuber: name, | ||
| thumbnail: thumbnail, | ||
| profileImage: profileImage, | ||
| link: link, | ||
| summary: summary | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| // MARK: - Itinerary Response to TravelPlace | ||
|
|
||
| extension FollowItineraryResponse { | ||
| func toDomain() -> [TravelPlace] { | ||
| itineraries.map { $0.toDomain() } | ||
| } | ||
| } | ||
|
|
||
| extension FollowPlaceResponse { | ||
| func toDomain() -> TravelPlace { | ||
| TravelPlace( | ||
| id: id, | ||
| day: day, | ||
| sequence: sequence, | ||
| travelerTip: travelerTip ?? "", | ||
| estimatedDuration: estimatedDuration, | ||
| place: place.toDomain() | ||
| ) | ||
| } | ||
| } | ||
|
|
||
| extension PlaceResponse { | ||
| func toDomain() -> PlaceInfo { | ||
| PlaceInfo( | ||
| googlePlaceId: googlePlaceId, | ||
| thumbnail: thumbnail, | ||
| latitude: latitude, | ||
| longitude: longitude, | ||
| name: name, | ||
| regularOpeningHours: regularOpeningHours | ||
| ) | ||
| } | ||
| } |
This file was deleted.
Oops, something went wrong.
17 changes: 17 additions & 0 deletions
17
Projects/Domain/Sources/Interface/Follow/FollowRepositoryProtocol.swift
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,17 @@ | ||
| // | ||
| // FollowRepositoryProtocol.swift | ||
| // Domain | ||
| // | ||
| // Created by kimnahun on 2026-01-23. | ||
| // Copyright ยฉ 2026 NDGL-iOS. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| public protocol FollowRepositoryProtocol { | ||
| /// ์ฌํ ์์ธ ์ ๋ณด ์กฐํ | ||
| func fetchTravelDetail(id: Int) async -> TravelDetail? | ||
|
|
||
| /// ์ผ์ฐจ๋ณ ์ฅ์ ๋ชฉ๋ก ์กฐํ | ||
| func fetchPlaces(travelId: Int, day: Int) async -> [TravelPlace] | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,20 @@ | ||
| // | ||
| // FollowError.swift | ||
| // Domain | ||
| // | ||
| // Created by kimnahun on 2026-01-23. | ||
| // Copyright ยฉ 2026 NDGL-iOS. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| public enum FollowError: Error, Sendable { | ||
| /// ์ฌํ ํ ํ๋ฆฟ์ ์ฐพ์ ์ ์์ | ||
| case notFound(message: String) | ||
| /// ์๋ฒ ์๋ฌ | ||
| case serverError(message: String) | ||
| /// ๋คํธ์ํฌ ์๋ฌ | ||
| case networkError(message: String) | ||
| /// ์ ์ ์๋ ์๋ฌ | ||
| case unknown(code: String, message: String) | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,64 @@ | ||
| // | ||
| // TravelDetail.swift | ||
| // Domain | ||
| // | ||
| // Created by kimnahun on 2026-01-23. | ||
| // Copyright ยฉ 2026 NDGL-iOS. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| /// ์ฌํ ์์ธ ์ ๋ณด | ||
| public struct TravelDetail: Hashable { | ||
| public let travelId: String | ||
| public let country: String | ||
| public let city: String | ||
| public let budgetPerPerson: Int | ||
| public let nights: Int | ||
| public let days: Int | ||
| public let youtube: YouTubeInfo | ||
|
|
||
| public init( | ||
| travelId: String, | ||
| country: String, | ||
| city: String, | ||
| budgetPerPerson: Int, | ||
| nights: Int, | ||
| days: Int, | ||
| youtube: YouTubeInfo | ||
| ) { | ||
| self.travelId = travelId | ||
| self.country = country | ||
| self.city = city | ||
| self.budgetPerPerson = budgetPerPerson | ||
| self.nights = nights | ||
| self.days = days | ||
| self.youtube = youtube | ||
| } | ||
| } | ||
|
|
||
| /// ์ ํ๋ธ ์ ๋ณด | ||
| public struct YouTubeInfo: Hashable { | ||
| public let title: String | ||
| public let youtuber: String | ||
| public let thumbnail: String? | ||
| public let profileImage: String? | ||
| public let link: String | ||
| public let summary: String | ||
|
|
||
| public init( | ||
| title: String, | ||
| youtuber: String, | ||
| thumbnail: String?, | ||
| profileImage: String?, | ||
| link: String, | ||
| summary: String | ||
| ) { | ||
| self.title = title | ||
| self.youtuber = youtuber | ||
| self.thumbnail = thumbnail | ||
| self.profileImage = profileImage | ||
| self.link = link | ||
| self.summary = summary | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,61 @@ | ||
| // | ||
| // TravelPlace.swift | ||
| // Domain | ||
| // | ||
| // Created by kimnahun on 2026-01-23. | ||
| // Copyright ยฉ 2026 NDGL-iOS. All rights reserved. | ||
| // | ||
|
|
||
| import Foundation | ||
|
|
||
| /// ์ฌํ ์ฅ์ ์ ๋ณด | ||
| public struct TravelPlace: Hashable { | ||
| public let id: Int | ||
| public let day: Int | ||
| public let sequence: Int | ||
| public let travelerTip: String | ||
| public let estimatedDuration: Int | ||
| public let place: PlaceInfo | ||
|
|
||
| public init( | ||
| id: Int, | ||
| day: Int, | ||
| sequence: Int, | ||
| travelerTip: String, | ||
| estimatedDuration: Int, | ||
| place: PlaceInfo | ||
| ) { | ||
| self.id = id | ||
| self.day = day | ||
| self.sequence = sequence | ||
| self.travelerTip = travelerTip | ||
| self.estimatedDuration = estimatedDuration | ||
| self.place = place | ||
| } | ||
| } | ||
|
|
||
| /// ์ฅ์ ์์ธ ์ ๋ณด | ||
| public struct PlaceInfo: Hashable { | ||
| public let googlePlaceId: String | ||
| public let thumbnail: String? | ||
| public let latitude: Double | ||
| public let longitude: Double | ||
| public let name: String | ||
| public let regularOpeningHours: String? | ||
|
|
||
| public init( | ||
| googlePlaceId: String, | ||
| thumbnail: String? = nil, | ||
| latitude: Double, | ||
| longitude: Double, | ||
| name: String, | ||
| regularOpeningHours: String? | ||
| ) { | ||
| self.googlePlaceId = googlePlaceId | ||
| self.thumbnail = thumbnail | ||
| self.latitude = latitude | ||
| self.longitude = longitude | ||
| self.name = name | ||
| self.regularOpeningHours = regularOpeningHours | ||
| } | ||
| } |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,25 @@ | ||
| // | ||
| // Project.swift | ||
| // FollowFeature | ||
| // | ||
| // Created by kimnahun on 2026-01-23. | ||
| // | ||
|
|
||
| import ProjectDescription | ||
| import ProjectDescriptionHelpers | ||
| import DependencyPlugin | ||
|
|
||
| let project = Project.makeModule( | ||
| name: "FollowFeature", | ||
| targets: [ | ||
| .makeFrameworkTarget( | ||
| name: "FollowFeature", | ||
| dependencies: [ | ||
| .Features.baseFeatureDependency | ||
| ], | ||
| scripts: [.swiftLint], | ||
| isStatic: true, | ||
| hasResources: false | ||
| ) | ||
| ] | ||
| ) |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
๐งฉ Analysis chain
๐ Script executed:
Repository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 1183
๐ Script executed:
Repository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 5172
๐ Script executed:
Repository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 1119
๐ Script executed:
Repository: YAPP-Github/27th-App-Team-1-iOS
Length of output: 1029
ํ๋กํ ์ฝ ์ ์ ์์ฒด๊ฐ ์ค๋ฅ ์ํ๋ฅผ ๊ตฌ๋ถํ์ง ๋ชปํ๋๋ก ์ค๊ณ๋์ด ์์ต๋๋ค.
FollowRepositoryProtocol์ดTravelDetail?๊ณผ[TravelPlace]๋ฅผ ๋ฐํํ๋๋ก ์ ์๋์ด ์์ด์, ๊ตฌํ์ฒด์์ ๋คํธ์ํฌ ์คํจ์ ์ค์ ๋น ๋ฐ์ดํฐ๋ฅผ ๋ชจ๋ nil/๋น ๋ฐฐ์ด๋ก ์ฒ๋ฆฌํ ์๋ฐ์ ์์ต๋๋ค. ํธ์ถ๋ถ(FollowDetailInteractor)์์๋ ์ด๋ฅผ ๊ตฌ๋ถํ ์ ์์ด์, fetchTravelDetail ์คํจ ์ ์๋ฌ ๋ฉ์์ง ์์ด ์กฐ์ฉํ ๋์๊ฐ๊ณ , fetchPlaces ์คํจ๋ ๋น ๋ฐฐ์ด์ฒ๋ผ ํ์๋ฉ๋๋ค.ํ๋กํ ์ฝ์
Result<TravelDetail, Error>๋throws๋ก ๋ณ๊ฒฝํ๊ฑฐ๋, ๋ณ๋์ ์ค๋ฅ ์ํ ์ฝ๋ฐฑ์ ์ถ๊ฐํด์ผ ์ฌ์ฉ์์๊ฒ ๋คํธ์ํฌ ์ค๋ฅ๋ฅผ ์๋ฆด ์ ์์ต๋๋ค.๐ค Prompt for AI Agents