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

Open
wants to merge 10 commits into
base: develop
Choose a base branch
from

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 ํ•ด๋„ ๋˜์ง€ ์•Š๋‚˜์š” ?!


extension HomeTarget: TargetType {
var baseURL: String {
return "http://211.188.50.209:8080"
Copy link
Collaborator

Choose a reason for hiding this comment

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

์š”๊ฑฐ ์•ˆ์ˆจ๊ฒจ๋„ ๊ดœ์ฐฎ์„๊นŒ์—ฌ

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 ๊ตฌํ˜„
2 participants