Skip to content
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

Feature/#8 home section UI, API implementation #12

Merged
merged 14 commits into from
Nov 29, 2024

Conversation

LaonCoder
Copy link
Collaborator

@LaonCoder LaonCoder commented Nov 27, 2024

๐Ÿ“Œ PR ์š”์•ฝ

๐ŸŒฑ ์ž‘์—…ํ•œ ๋‚ด์šฉ

(1) UI

  • ์ƒ๋‹จ ๋ฌดํ•œ ์Šคํฌ๋กค ๊ด‘๊ณ  ๋ฐฐ๋„ˆ
  • ์นดํ…Œ๊ณ ๋ฆฌ ๋ทฐ
  • ์ฐœํ•œ ์ƒํ’ˆ ๋ฆฌ์ŠคํŠธ ๋ทฐ
  • ์ค‘๊ฐ„ ๊ด‘๊ณ  ๋ฐฐ๋„ˆ
  • ์‹ค์‹œ๊ฐ„ ์ธ๊ธฐ๋žญํ‚น ๋ฆฌ์ŠคํŠธ ๋ทฐ
  • ์ƒํ’ˆ ์ถ”์ฒœ ๋ทฐ

(2) API

  • HomeApi, HomeDto, HomeTarget ์ถ”๊ฐ€
  • ResponseData (๋ฒ ์ด์Šค ๋ชจ๋ธ) ์ถ”๊ฐ€

๐ŸŒฑ PR ํฌ์ธํŠธ

  • API ํ˜ธ์ถœ ์‹œTํƒ€์ž…์œผ๋กœ JSON ๋””์ฝ”๋”ฉํ•˜๋Š” ๊ฒŒ ์•„๋‹ˆ๋ผ ResponseData<T> ํƒ€์ž…์œผ๋กœ ๋””์ฝ”๋”ฉํ•˜๋„๋ก ์ˆ˜์ •ํ–ˆ์Šต๋‹ˆ๋‹ค.
    • ์„œ๋ฒ„ ๋ฆฌ์Šคํฐ์Šค๊ฐ€ ResponseData์™€ ๊ฐ™์ด ๋‚ด๋ ค์˜ต๋‹ˆ๋‹ค.
      switch response.result {
      case .success:
          do {
              let decodedData = try JSONDecoder().decode(ResponseData<T>.self, from: data)
              completion(.success(decodedData.data))
          } catch {
              completion(.failure(.parsingError))
          }
      
  • ํ™ˆ์—์„œ DiffableDatasource ์‚ฌ์šฉํ•  ๋•Œ Item์˜ ํƒ€์ž…์„ AnyHashable๋กœ ์„ค์ •ํ•œ ๋‹ค์Œ, ์ด๋ฅผ ์บ์ŠคํŒ…ํ•ด์„œ ์‚ฌ์šฉํ•˜๊ณ  ์žˆ๋Š”๋ฐ, Swift6์—์„œ ์ด์™€ ๊ฐ™์€ ๋ฐฉ์‹์ด ํ—ˆ์šฉ๋˜์ง€ ์•Š๋Š”๋‹ค๊ณ  ํ•˜๋”๋ผ๊ณ ์š”,, ๋ฐ์ดํ„ฐ ๊ตฌ์กฐ๊ฐ€ ๋‹ค๋ฅผ ๋•Œ AnyHashable์„ ์‚ฌ์šฉํ•˜๋Š” ๋Œ€์‹  ์–ด๋–ป๊ฒŒ ์ˆ˜์ •ํ•  ์ˆ˜ ์žˆ์„๊นŒ์š”..?
    private var dataSource: UICollectionViewDiffableDataSource<HomeSection, AnyHashable>!
    
  • CollectionView๋ฅผ ์‚ฌ์šฉํ•ด์„œ UI๋ฅผ ๊ตฌํ˜„ํ•˜๋‹ค๋ณด๋‹ˆ๊นŒ, ํ™”๋ฉด ์•„๋ž˜๊นŒ์ง€ ๋‚ด๋ ธ๋‹ค๊ฐ€ ์œ„๋กœ ์˜ฌ๋ฆฌ๋Š” ๊ฒฝ์šฐ ๋ฐฐ๋„ˆ๊ฐ€ 0๋ฒˆ ์ธ๋ฑ์Šค๋กœ ์ดˆ๊ธฐํ™”๋˜๋Š” ์ด์Šˆ๊ฐ€ ์žˆ์Šต๋‹ˆ๋‹ค. (์…€ ์žฌ์‚ฌ์šฉ) ๊ธฐ์กด ์ปฌ๋ฆฌ ์•ฑ์—์„œ๋Š” ์Šคํฌ๋กค ํ–ˆ๋‹ค ์˜ฌ๋ ค๋„ ์ด์ „ ๋ฐฐ๋„ˆ ์ด๋ฏธ์ง€๊ฐ€ ๋ณด์—ฌ์ง€๋˜๋ฐ, ์ด๋ ‡๊ฒŒ ํ•˜๋ ค๋ฉด ์ธ๋ฑ์Šค ๊ฐ’์„ ๋”ฐ๋กœ ์ €์žฅํ•ด๋†“์•„์•ผ ํ• ๊นŒ์š”??
  • ํŒŒ์ผ, ํด๋” ๊ตฌ์กฐ๋ž‘ ํฐํŠธ๋Š” ์ถ”ํ›„ ๋ฆฌํŒฉํ† ๋งํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค..!
  • +) ์ถ”๊ฐ€ ์„œ๋ฒ„ ์ž‘์—…์ด ํ•„์š”ํ•œ ํŒŒ๋ผ๋ฏธํ„ฐ๊ฐ€ ์žˆ์–ด์„œ, ๋ฆฌํŒฉํ† ๋ง ์ง„ํ–‰ํ•˜๋ฉด์„œ ๋ฐ˜์˜ํ•ด๋†“๊ฒ ์Šต๋‹ˆ๋‹ค.

๐Ÿ“ธ ์Šคํฌ๋ฆฐ์ƒท

IMG_E4CB10975EA5-2 IMG_E4CB10975EA5-1

|ํŒŒ์ผ์ฒจ๋ถ€๋ฐ”๋žŒ|

๐Ÿ“ฎ ๊ด€๋ จ ์ด์Šˆ

- HomeMainBannerView ๋ฐ HomeMainBannerCell, HomeMainBannerPageControl ์ปดํฌ๋„ŒํŠธ ๊ตฌํ˜„
- ๋ฐฐ๋„ˆ ์ด๋ฏธ์ง€ ์ถ”๊ฐ€ (svg ํฌ๋งท)
- HomeViewController ๋‚ด bannerImagesMock ์ถ”๊ฐ€, setUI ๋ฉ”์„œ๋“œ ์ถ”๊ฐ€
- ํ™ˆ ์นดํ…Œ๊ณ ๋ฆฌ ์˜์—ญ ๊ตฌํ˜„
- HomeModels, HomeSection ๋ฐ MockData ์ถ”๊ฐ€
- DiffableDatasource, CompositionalLayout ๊ธฐ๋ฐ˜ ๋ฆฌํŒฉํ† ๋ง (AnyHashable ์ˆ˜์ • ํ•„์š”)
- gitkeep ํŒŒ์ผ ์ž„์‹œ ์ถ”๊ฐ€
- HomeViewController ๋‚ด ์œ„์‹œ ๋ฆฌ์ŠคํŠธ ์„น์…˜ ์ถ”๊ฐ€
- HomeWishListCell, HomeWishListHeaderView ๊ตฌํ˜„
- Formatter extension ์ถ”๊ฐ€
- ํ™ˆ ์ค‘๊ฐ„ ๊ด‘๊ณ  ๋ฐฐ๋„ˆ ๋ทฐ (HomeMidBannerCell ๊ตฌํ˜„)
- ํ™ˆ ๋žญํ‚น ๋ฆฌ์ŠคํŠธ ๋ทฐ์— ํ•„์š”ํ•œ ํ•˜์œ„ ๋ทฐ(ํ—ค๋”, ์…€, ํ‘ธํ„ฐ) ๊ตฌํ˜„ (HomeViewController์— ์…€๋งŒ ์ถ”๊ฐ€)
- HomeModels์— ๋žญํ‚น ๋ฆฌ์ŠคํŠธ ๊ด€๋ จ ๋ชจ๋ธ ์ถ”๊ฐ€
- icn_home_arrow_right_black ์•„์ด์ฝ˜ ์ถ”๊ฐ€
- HomeViewController ๋‚ด ๋žญํ‚น ๋ฆฌ์ŠคํŠธ ์„น์…˜ ์ฝ”๋“œ ์ถ”๊ฐ€
- ๋žญํ‚น ๋ฆฌ์ŠคํŠธ ๋”๋ฏธ ์ด๋ฏธ์ง€ ์ถ”๊ฐ€
- HomeSection > .rankingList ์ถ”๊ฐ€
- ๋žญํ‚น ๋ฆฌ์ŠคํŠธ ๊ด€๋ จ MockData ์ถ”๊ฐ€
- HomeRankingListGradientBackgroundView ๊ทธ๋ผ๋””์–ธํŠธ ๋ฐฉํ–ฅ ๋ณ€๊ฒฝ
- ์œ„์‹œ ๋ฆฌ์ŠคํŠธ ์…€ groupSpacing์œผ๋กœ ๋ณ€๊ฒฝ
- MockData์— recommendListSection ๋ฐ์ดํ„ฐ ์ถ”๊ฐ€
- HomeRecommendListCell, HomeRecommendListHeaderView ๊ตฌํ˜„
- HomeViewController ๋‚ด ๋žญํ‚น ๋ฆฌ์ŠคํŠธ ์„น์…˜ ์ฝ”๋“œ ์ถ”๊ฐ€
- ์ถ”์ฒœ ์„น์…˜ ๊ด€๋ จ ์ด๋ฏธ์ง€ ์ถ”๊ฐ€
- HomeApi, HomeDto, HomeTarget ์ถ”๊ฐ€
- ResponseData ๋ชจ๋ธ ์ถ”๊ฐ€
- ๋ชจ๋ธ ํ”„๋กœํผํ‹ฐ ๋„ค์ด๋ฐ ์ˆ˜์ •
- getHomeData ๋ฉ”์„œ๋“œ ๊ตฌํ˜„
- ์…€ ๋‚ด ์ด๋ฏธ์ง€ ๋ฐ์ดํ„ฐ URL์„ ํ†ตํ•ด ๋ฐ›์•„์˜ค๋„๋ก ์ˆ˜์ •
@LaonCoder LaonCoder changed the title Feature/#8 home section UI implementation Feature/#8 home section UI, API implementation Nov 27, 2024
Copy link
Collaborator

@Sangwook123 Sangwook123 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ฝ”๋“œ์–‘์ด ์—„์ฒญ ๋งŽ๋„ค์š” ใ…Žใ„ทใ„ท ๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ด๊ฑฐ discard ํ•ด๋„ ๋˜์ง€ ์•Š๋‚˜์š” ?!

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๋„ค๋„ต..!

MarketKurly/Core/Network/Home/HomeTarget.swift Outdated Show resolved Hide resolved
Comment on lines +10 to +18
extension Formatter {
static let currency: NumberFormatter = {
let formatter = NumberFormatter()
formatter.numberStyle = .decimal // ์ฒœ ๋‹จ์œ„๋กœ ',' ์ถ”๊ฐ€
formatter.maximumFractionDigits = 0 // ์†Œ์ˆ˜์  ์ž๋ฆฌ๋Š” ์—†๋„๋ก ์„ค์ •
formatter.minimumFractionDigits = 0
return formatter
}()
}
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ €๋Š” ์ด ๋ถ€๋ถ„ ์ฝ”๋“œ ๋‚ด์—์„œ ๊ตฌํ˜„ํ–ˆ์—ˆ๋Š”๋ฐ ๋”ฐ๋กœ ๋ถ„๋ฆฌํ•ด์ฃผ์…จ๋„ค์š” ๐Ÿ‘
ํ•ฉ์น˜๋ฉด์„œ ํ™œ์šฉํ•˜๊ฒ ์Šต๋‹ˆ๋‹ค!

Copy link
Collaborator

@sem-git sem-git left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ตฟ๊ตฟ

- BASE_URL ์ถ”๊ฐ€ (DEV.xcconfig, RELEASE.xcconfig ํŒŒ์ผ ์ถ”๊ฐ€ ํ•„์š”)
- ์…€ ๋‚ด indentifer ์ œ๊ฑฐ
@LaonCoder LaonCoder force-pushed the feature/#8-home-section-ui-implementation branch from 88aba60 to ade88a2 Compare November 29, 2024 09:41
@LaonCoder LaonCoder merged commit d585745 into develop Nov 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[feat] ํ™ˆ / ํ™ˆ ๋‚ด ์„น์…˜ UI ๊ตฌํ˜„
3 participants