Skip to content

[쇼핑 주문 1, 2 단계] 지오 미션 제출합니다. #101

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 84 commits into from
Jun 5, 2025

Conversation

giovannijunseokim
Copy link

@giovannijunseokim giovannijunseokim commented May 29, 2025

두루 안녕하세요! 이번 미션 잘 부탁드립니다. 😁
시간이 부족해 테스트가 미흡한 점, 구현이 완벽하지 않은 점 죄송합니다. 참고해주시면 감사드리겠습니다. 🙇

이전 미션의 커밋을 제외한 커밋들

셀프 체크리스트

  • 프로그램이 정상적으로 작동하는가?
  • 모든 테스트가 통과하는가?
  • 이전에 받은 피드백을 모두 반영하였는가?
  • 코딩 스타일 가이드를 준수하였는가?
    • IDE 코드 자동 정렬을 적용하였는가?
    • 린트 검사를 통과하였는가?
  • 프로그래밍 요구 사항을 준수하였는가?
  • README.md에 기능 목록을 정리하고 명확히 기술하였는가?

어떤 부분에 집중하여 리뷰해야 할까요?

코드 리뷰 커뮤니케이션

📌 GitHub에서 PR에 댓글 남기는 방법

참고 자료

스크린샷

Screen_Recording_20250529_174056_Shopping.mp4

@Gyuil-Hwnag Gyuil-Hwnag self-requested a review May 29, 2025 16:24
Copy link
Member

@Gyuil-Hwnag Gyuil-Hwnag left a comment

Choose a reason for hiding this comment

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

지오 안녕하세요~
이번 미션도 잘부탁드립니다!

해당 미션 구현 많이 어려우셨을텐데 고생 많으셨습니다!
개인적으로 살펴봤을 때, 지오의 의견을 들어보고 얘기를 나눠봐야 할 내용들이 많았던 것 같았어요.

모든 부분에 대해서 코멘트를 남기기에는 요청이 왔다갔다 하면서 수정될 부분도 많을 것 같아서, 모든 부분에 대해서 코멘트를 남기기 보다는 하나씩 같이 의견을 나눠보면 좋을 것 같다는 생각이 들었습니다.

궁금한 점이나 논의하고 싶은 내용이 있으면 언제든 DM 주세요! 🙏
화이팅입니다💪

Comment on lines +1 to +2

Copy link
Member

Choose a reason for hiding this comment

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

README 작성 좋습니다👍

Copy link
Member

Choose a reason for hiding this comment

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

참고로 아래와 같은 형태로, PR 에서 봐야할 커밋들을 필터를 걸 수 있습니다!
(필터를 안걸면 모든 코드가 로드 되다 보니... 제 맥이 버거워 하는군요)
PR > 좌측 commit > shift + click > 봐야할 커밋 드래그
PR 필터

Copy link
Author

Choose a reason for hiding this comment

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

그 점을 신경쓰지 못했네요 😅
PR 소개글 맨 위에 추가해두었습니다!

Comment on lines +63 to +69
implementation(libs.kotlinx.serialization.json)
implementation(libs.logging.interceptor)
implementation(libs.shimmer)
implementation(libs.androidx.security.crypto)
implementation(libs.retrofit)
implementation(libs.converter.gson)
implementation(libs.retrofit2.kotlinx.serialization.converter)
Copy link
Member

Choose a reason for hiding this comment

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

아마 프로젝트를 설정할 때부터 version catalogs를 사용하도록 되어 있었을 것 같은데, 이전에는 gradle을 kotlin 이전에 groovy로 적던 시절도 있었어요~
오래된 프로젝트일 수록 마이그레이션이 이뤄지지 않은 경우 groovy, 또는 version catalogs 가 적용이 안된 프로젝트일 때도 있답니다!
이전에는 어떻게 gradle 을 정의했었는지도 추후에 시간이 남을 때 살펴본다면 많은 도움이 될 것 같다는 생각이 듭니다💪

지금 당장 하기에는 너무 과한 내용일 것 같아서 추후에 한번 시간이 남을 때 살펴보시면 좋을 것 같아요

  • groovy -> groovy to kotlin -> buildSrc등 version catalogs 이전 gradle 관리법 -> version catalogs -> custom plugins

Comment on lines +66 to +67
implementation(libs.androidx.security.crypto)
implementation(libs.retrofit)
Copy link
Member

Choose a reason for hiding this comment

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

libs.androidx.security.crypto를 채택하신 이유가 있을까요~?

Copy link
Author

Choose a reason for hiding this comment

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

사용자의 아이디와 비밀번호를 암호화하여 저장하기 위함입니다! 😁

처음에는 간단한 구조이기 때문에 키-값 형태로 SharedPreferences를 통해 저장했습니다.

하지만 이는 기기 내부에 파일로 저장되어 위험하다는 것을 학습했습니다. 🤔
위 부분을 Device Explorer로 탐색해 찾아보니, 값들이 평문으로 저장되어 있었습니다.

따라서 암호화하여 저장하는 방법을 찾다 보니 EncryptedSharedPreferences를 발견했고, 사용해보았습니다.
이 또한 Device Explorer로 탐색해 찾아보니, 값들이 암호화되어 저장된 것을 확인했습니다. 👍

Copy link
Member

Choose a reason for hiding this comment

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

그렇군요~
간단하게 SharedPreference에는 암호화가 안되어 있어서, 사용을 해보려고 했다면 괜찮을 것 같군요!
실제 서비스라면 이렇게 값에 대해서 로컬에 그대로 넣어두는 방식을 사용하지는 않을 것이라서, 연습용이었다면 일단은 넘어갈 수 있을 것 같습니다😀

Comment on lines 16 to 17
tools:targetApi="31" >
tools:targetApi="31">
Copy link
Member

Choose a reason for hiding this comment

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

targetApi 를 설정하면 어떻게 동작을 할까요~?

Copy link
Author

@giovannijunseokim giovannijunseokim May 30, 2025

Choose a reason for hiding this comment

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

설정한 버전 위에서만 동작하는 것처럼 하여 린트 경고를 없앨 수 있습니다! 😆

tools:targetApi에 관한 공식 문서 를 살펴보았습니다. 👀

해당 속성은 @TargetApi를 사용하는 것처럼 해당 API 레벨 또는 그 위에서만 동작하는 것처럼 하여 린트 경고를 없애준다고 합니다.

하지만 minSdkVersiontargetApi로 설정한 버전 사이에서 실행될 경우 예기치 못한 에러가 날 수 있겠다고 생각했습니다. 🤔

따라서 해당 속성을 제거해주었습니다!
9eca1f9

모르는 부분 짚어주셔서 덕분에 공부해볼 수 있었습니다. 감사합니다! 😁

Copy link
Member

Choose a reason for hiding this comment

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

실제 서비스를 운영하다보면, minSdk 및 targetApi 등은 서비스를 사용하는 여러 사용자한테 영향을 줄 수 있으니 사용에 유의를 해야해서 한번 알아둔다면 추후 도움이 될 것 같아서 남겨두었었습니다~

Comment on lines 16 to 19
.addInterceptor(
HttpLoggingInterceptor().apply {
level = HttpLoggingInterceptor.Level.BODY
},
Copy link
Member

Choose a reason for hiding this comment

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

코드레빗이 저랑 같은 의견을 남겨두었군요~
코드레빗 코멘트

실제 서비스에서도 API 의 요청을 로그로 볼 수 있겠군요🫣

Copy link
Author

Choose a reason for hiding this comment

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

프로그램이 디버그용으로 실행됐는지, 실제 서비스인지 분기 처리를 추가했습니다! 👍

처음엔 BuildConfig.DEBUG 상수를 사용하려 했는데, AGP 버전이 올라감에 따라 사용이 불가해졌더라구요 🥺
따라서 환경에 따라 남길 로그의 레벨을 정해주었습니다! 💪

1063871

Comment on lines 18 to 27
override fun equals(other: Any?): Boolean {
if (this === other) return true
if (javaClass != other?.javaClass) return false

other as ProductItem

return cartItemId == other.cartItemId
}

override fun hashCode(): Int = cartItemId.hashCode()
Copy link
Member

Choose a reason for hiding this comment

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

모든 data class 에서 equals 나 hasCode 를 정의하고 있는 구현이 나오게 된 이유가 있을까요~?🤔

Copy link
Author

@giovannijunseokim giovannijunseokim Jun 2, 2025

Choose a reason for hiding this comment

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

data 클래스는 생성자 파라미터로 존재하는 프로퍼티를 통해 equals, hashCode를 결정하는 것을 확인했습니다.
다만 이 경우엔 checked에 의해 다른 객체로 봐서는 안 된다고 생각했었습니다. 🤔

하지만 이렇게 하면 equals 비교가 일관적이지 않다는 문제도 있을 것 같습니다.
또한 해당 객체는 화면에 표시될 컴포넌트의 상태를 표현하는 객체로서, checked가 다르다면 다른 객체로 보는 것이 더 좋을 것 같습니다.

따라서 equals, hashCode를 따로 재정의하지 않도록 수정했습니다!

ad1dbe1

Copy link
Member

Choose a reason for hiding this comment

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

오호~ 지오의 의견 너무 좋네요👍

Comment on lines 55 to 58
fun submitList(items: List<CartItemType>) {
this.items = items
notifyDataSetChanged()
}
Copy link
Member

@Gyuil-Hwnag Gyuil-Hwnag May 29, 2025

Choose a reason for hiding this comment

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

이 부분도 코드레빗의 코멘트를 한번 참고해보시면 좋을 것 같다는 생각이 듭니다💪
코드레빗 코멘트

Copy link
Author

@giovannijunseokim giovannijunseokim Jun 3, 2025

Choose a reason for hiding this comment

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

ListAdapter를 사용해 바뀐 부분만 다시 그리도록 해보았습니다. 😆

ListAdapter에 들어갈 DiffUtil.ItemCallback을 구현하는 부분에서 헷갈리는 것이 많았습니다 🥲

areItemsTheSame에서는 id값과 같은 유일한 식별자를 통한 비교를, areContentsTheSame 내용을 비교해야 한다고 알고 있었습니다.
다만 아이템이 식별자를 가지고 있지 않아, 대체 어떤 값을 비교해야 할지 생각해보았습니다. 🤔

여러 자료를 읽어보고 areItemsTheSame은 뷰 레이아웃을 새로 구현해야 할지, areContentsTheSame는 내부 값을 바꿔주어야 할지 체크하는 것으로 확인했습니다. 👀

따라서 새로운 뷰 레이아웃이 필요한 경우는 타입이 다를 때라고 판단했고, 타입 검사 및 id가 있다면 id까지 검사하도록 해주었습니다.

0fa2eb0

이게 맞는 방법인지 궁금합니다. 🥺

Copy link
Member

Choose a reason for hiding this comment

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

is CartItemType.PaginationItem -> newItem is CartItemType.PaginationItem

이 부분은 살짝 고민이 되긴 하는군요~🤔
이렇게 된다면, 위치가 달라진다면 새로운 뷰라고 인식을 할 수도 있겠다는 생각이 들지만 현재 구조상에서는 아래와 같은 방법으로도 해볼 수 있겠다는 생각이 들었어요!

is CartItemType.PaginationItem -> oldItem.viewType == newItem.viewType || (newItem is CartItemType.PaginationItem && oldItem.page == newItem.page)

Copy link
Member

Choose a reason for hiding this comment

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

사실 단순하게는 id 등 유니크한 값이 없다면, == 으로 비교를 하는 방법도 있긴 합니다😅

Comment on lines 17 to 30
binding.shoppingCartItemActionListener =
object : CartItemActionListener {
override fun onRemoveProduct(item: CartItemType.ProductItem) {
onRemoveProduct(item)
}

override fun onPlusProductQuantity(item: CartItemType.ProductItem) {
onPlusQuantity(item)
}

override fun onMinusProductQuantity(item: CartItemType.ProductItem) {
onMinusQuantity(item)
}
}
Copy link
Member

Choose a reason for hiding this comment

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

ActionListener 을 Activity or ViewModel 에서 상속을 받게 하는 방법도 있었을텐데, Adapter 에서 지정을 하여서 전달이 되도록 한 이유가 있을까요~?

Copy link
Author

Choose a reason for hiding this comment

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

클래스의 책임이 커지지 않도록 하고, 캡슐화를 견고히 하기 위함입니다. 😄

먼저, ActionListener는 사용자의 액션에 반응하는 역할을 의미하는 interface입니다.

따라서 ViewModel이 이를 구현하는 것은 뷰에 필요한 데이터를 저장한다는 기존의 책임과 떨어지며, SRP를 위반할 수 있다고 생각했습니다. 🤔
인터페이스는 역할이지만, 여러 역할을 구현하려면 여러 작업을 수행할 수 있어야 하고, 그만큼 클래스가 커질 수 있다고 생각했습니다. 😁

또한 Activity에서 할 수도 있었지만, 직접 넘겨준 이유는 이 방식이 조금 더 견고한 캡슐화라고 생각했기 때문입니다. 💪
물론 ActivityActionListener를 구현하고, ActionListener 타입으로 사용하면 문제가 되지 않지만, 이는 잠재적으로 캐스팅을 통해 Activity를 사용할 수 있다고 생각했습니다. 🤔
이는 뷰모델 또한 마찬가지일 것 같습니다!

Copy link
Member

Choose a reason for hiding this comment

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

오호~ 너무 좋은 이견이네요👍
이 부분은 ViewModel 에서 상속을 받을 수도 있다! 라는 하나의 아이디어 차원에서 보셔도 좋을 것 같습니다~

물론 Activity가 ActionListener를 구현하고, ActionListener 타입으로 사용하면 문제가 되지 않지만, 이는 잠재적으로 캐스팅을 통해 Activity를 사용할 수 있다고 생각했습니다. 🤔

이 부분은 어떤 부분에서 이렇게 느끼시게 되었는지 궁금합니다~

Comment on lines 35 to 40
binding.shoppingCartProductCheckBox.setOnClickListener {
if (binding.shoppingCartProductCheckBox.isChecked) {
onSelect(item)
} else {
onUnselect(item)
}
Copy link
Member

Choose a reason for hiding this comment

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

이 부분은 DataBinding을 활용해볼 수도 있겠다는 생각이 듭니다!

Copy link
Author

Choose a reason for hiding this comment

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

넵! 반영해보았습니다 ☺️

Comment on lines 131 to 132
Thread.sleep(1000)
loading.postValue(false)
Copy link
Member

Choose a reason for hiding this comment

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

Thread.sleep(1000) 이 구현된 이유가 있을까요~

Copy link
Author

Choose a reason for hiding this comment

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

스켈레톤이 잘 동작하기 확인하기 위해 추가한 코드입니다! 삭제하는 것이 좋을까요??

Copy link
Member

Choose a reason for hiding this comment

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

그렇다면, 스켈레톤을 위해서 존재한다라는 주석이나 알 수 있게 상수로 뽑아보는 방법도 있을 것 같습니다~
사실 이건 저도 개발을 하면서 느꼈던 것이지만 히스토리를 모르는 상태에서 볼 때 별다른 히스토리가 없는 경우 왜 이게 있는거지? 라는 생각이 들 것 같았어요
그리고 이렇게 두었을 때 과연 몇년이 지난뒤에 볼 때에도 아! 이래서 존재하는구나! 라는 것을 깜빡하는 경우도 있다 보니, 명시를 하는 방법도 좋을 것 같다는 생각이 듭니다!

hyemdooly pushed a commit that referenced this pull request Jun 3, 2025
* Squashed commit of the following:

commit ee14a860ec9a0714f214fcd95f654211afad7d53
Author: m6z1 <[email protected]>
Date:   Mon May 26 17:25:13 2025 +0900

    refactor: mock server 클래스 네이밍 수정

commit a4a475aa8a1513138ac0d1219e006db5e6cc59f1
Author: m6z1 <[email protected]>
Date:   Mon May 26 17:24:56 2025 +0900

    test: mock 상품 서버 테스트 추가

commit 47fdb3bea0ee013cb424c87c8bfb8d30108956bc
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:38:17 2025 +0900

    chore: 사용하지 않는 코드 제거

commit 612f085807c885699c164d20f6e86d17f7ed56c4
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:35:51 2025 +0900

    test: 변경된 프로덕션 코드에 테스트 성공하도록 수정

commit dca0b22d72d29978bc665ac0194982d1904bb39b
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:11:59 2025 +0900

    refactor: 함수 분리

commit 01fd74e94b7c12be72e13f5ff8daa461208ede41
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:03:38 2025 +0900

    refactor: 상품 목록 뷰 수량 조절 컴포넌트 사용

commit 31531c70376089106aca19669d623c75212e3362
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:22:53 2025 +0900

    refactor: 불필요한 함수 제거

commit 6e28f6050542ccc04302c19cdac02c8bb59ffe98
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:18:17 2025 +0900

    feat: 상품 목록 값 서버 통신으로 호출

commit 42855097a4721063665b068c823ce32639837821
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:17:41 2025 +0900

    chore: 패키지 이동

commit 78818df44b0758dc9c5e82cabce440403f304780
Author: m6z1 <[email protected]>
Date:   Mon May 26 14:57:46 2025 +0900

    build: 네트워크용 라이브러리 추가

commit caf311ff815614eb919d8cebcae31702122f7eee
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:51:22 2025 +0900

    chore: 패키지 분리

commit ae13808677f08f12f8cbb510aeef10af0354e05e
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:40:08 2025 +0900

    fix: 최근 본 상품 이전의 상품 개수 업데이트 안 되는 이슈 해결

commit f45a1c61953dd5883735ba1a56a92977ff20ed1b
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:21:57 2025 +0900

    feat: 마지막으로 본 상품 페이지 뒤로가기 시 상품 목록 이동 구현

commit 5bf546fdf96a39ef84bfe6a64db5da86496aaa0f
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:27:51 2025 +0900

    fix: 마지막에 본 상품 클릭 시 마지막에 본 상품 ui 출력되는 이슈 해결

commit e8fd2f41bb2f2397fcb25a4378815852ff5b7182
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:04:52 2025 +0900

    feat: 마지막으로 본 상품일 경우 마지막으로 본 상품 ui 가시성 처리

commit 8c46f764a2567fadf19dd33cafee52497a4ec9a6
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:03:08 2025 +0900

    feat: 상품 상세화면에서 마지막으로 본 상품 출력 로직 구현

commit b16d1ab30766be7ac144df73b7824837a69fcea7
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:47:49 2025 +0900

    refactor: string 리소스 추출

commit 66930ef84673dcd35a2e04e49f53c060d6a1052d
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:45:11 2025 +0900

    feat: 앱 재시작돼도 최근 본 상품 목록 유지

commit ba7864091b772e7ee917f3b0e4152c12c844ffba
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:07:33 2025 +0900

    refactor: RecyclerView 아이템 데코레이터 구현

commit 694ed96ee0250a214b1773d225731cde11e2c083
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:02:10 2025 +0900

    feat: 최근 본 상품 로직 구현

commit 10b2c41995678e2cd75cca6c5bf179da198c2731
Author: m6z1 <[email protected]>
Date:   Mon May 26 01:39:17 2025 +0900

    chore: 불필요한 파일 제거

commit d83505db73294dbaba35f2501108bd217ace370e
Author: m6z1 <[email protected]>
Date:   Mon May 26 01:39:12 2025 +0900

    feat: 앱 재시작에도 상품 목록 장바구니 개수 유지

commit 28f983d287be72890bd3d2f99071ffb22b302cca
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:56 2025 +0900

    feat: 앱 재시작에도 장바구니 데이터 유지

commit f9212ff04a70429d6cd5bfe9fe4296e8f94fea6e
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:41 2025 +0900

    build: Room 라이브러리 버전 2.7.1 업데이트

commit 3884639a89d30be1804a6571705bb2782c4bcabf
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:15 2025 +0900

    refactor: application class 생성

commit 534abd57fad0a7b502e4827aa31ba35648cab837
Author: m6z1 <[email protected]>
Date:   Sun May 25 19:02:09 2025 +0900

    docs: 기능 요구 사항 정리

commit fea92920ee32b6cf5e39bb5e31ab3fc22ed81726
Author: m6z1 <[email protected]>
Date:   Sun May 25 18:56:01 2025 +0900

    build: room 라이브러리 추가

commit 2d4262ce2b9a64af8433115c8c950051b66dec3c
Author: m6z1 <[email protected]>
Date:   Sun May 25 15:12:43 2025 +0900

    feat: 장바구니 화면에서 뒤로 갔을 때 상태 일치 로직 구현

commit 2c3f80de3ec329a009faf842b6eb436ac6d34c4c
Author: m6z1 <[email protected]>
Date:   Sun May 25 14:16:38 2025 +0900

    feat: 상품 상세 화면에서 뒤로 갔을 때 상태 일치 로직 구현

commit 57b84e929376b0f2dc80df52252a816ace74b2b4
Author: m6z1 <[email protected]>
Date:   Thu May 22 17:11:32 2025 +0900

    feat: 장바구니에 담은 수량 조절 로직 구현

commit 609dffb3ffbc68b3c5dd0f461369c8793fba60c2
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:58:09 2025 +0900

    feat: 장바구니 상품 제거 / 장바구니 수량 빼는 로직 분리

commit 6753a2cca3abc0fb406b5c1721f0e2f1827f0915
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:23:04 2025 +0900

    feat: 장바구니 화면 수량 별 가격 출력 구현

commit f402d7cd9223d0c08d6433c8e25089b7e5e20181
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:22:45 2025 +0900

    refactor: 장바구니 상품 조회 반환 타입 수정

commit 4a0f8bb5ae5b3e600a2032e446f96e440248c60e
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:46:49 2025 +0900

    feat: 상품 상세 화면 수량만큼 선택한 총 가격 출력 구현

commit eeb7c0fb2991195183e81e750b079993a5dcae2a
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:40:18 2025 +0900

    feat: 상품 상세 화면 수량 조절 버튼 구현

commit a6cc3d7bee32fe9fbd1e17aff9d19b65133b8251
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:40:08 2025 +0900

    feat: 상품 수량 공용 컴포넌트 Ui 구현

commit d4d75847633f6508b3246ef589c1088300fa2f11
Author: m6z1 <[email protected]>
Date:   Thu May 22 13:34:51 2025 +0900

    feat: 상품 목록 뷰 장바구니 로직 추가

    - 각 상품에서 + - 버튼을 통해 수량을 조절할 수 있다.
    - 장바구니에 담근 총 수량이 보인다.

commit 967db9894b60d73b7ba3513e87862d85abccab9f
Author: m6z1 <[email protected]>
Date:   Wed May 21 17:17:17 2025 +0900

    feat: 각 상품에 + 버튼 ui 구현

commit 90a01e7aeb3560e84c5237fbdaf0dd5464f1b7f6
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:41:47 2025 +0900

    refactor: 함수 네이밍 명시적으로 수정

commit 85b96fc36d86051debe34415217b798fe4a60f04
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:37:05 2025 +0900

    refactor: 중복되는 값 변수에 할당

    - ProductsViewModel에서 중복되는 라이브 데이터 값 할당 후 사용

commit 83f3c2baaa82e81d79343f8d24a4a13fd5435793
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:22:53 2025 +0900

    refactor: 상품 목록 아이템 추가 함수 네이밍 수정

commit 93c65d1e824bc4b8aa22cd8236a6bdff7cada002
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:21:09 2025 +0900

    chore: activity exported 속성 수정

commit 5834af9e3b78e5857db83d2b8b6be782278dc8f1
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:18:21 2025 +0900

    refactor: 상품 목록 조회 호출 로직 수정

commit ad2e4ca0075a301fee2cea0a6d01f46020a4022e
Author: m6z1 <[email protected]>
Date:   Wed May 21 11:26:17 2025 +0900

    refactor: result 콜백 매개변수 네이밍 수정

commit a6fbdb0403a5cf770a713656f27c4681cf918724
Author: m6z1 <[email protected]>
Date:   Wed May 21 11:23:13 2025 +0900

    docs: 기능 요구 사항 정리

commit 519909ad15a249eea2d31c129b39a9bf8398fdb1
Author: Son Myeongji <[email protected]>
Date:   Tue May 20 20:13:07 2025 +0900

    [쇼핑 장바구니 1, 2단계] 뭉치 미션 제출합니다. (#101)

    * docs: 기능 요구 사항 작성

    * build: 데이터 바인딩 추가

    * feat: Product 생성

    * feat: 상품 목록 화면에서 행당 2개의 상품을 출력

    * chore: 패키지 분리

    * build: Glide 라이브러리 추가

    * chore: 더미 데이터 수정

    * feat: ProductUrls 구현

    * build: kapt 추가

    * feat: BindingAdapter setImageUrl 구현

    * feat: 인터넷 권한 추가

    * feat: 이미지 바인딩 어댑터 사용

    * chore: BindingAdapter 패키지 이동

    * feat: 아이템 간 마진 조정

    * chore: 메뉴 아이콘들 추가

    * feat: 앱 테마 NoActionBar 수정

    * feat: 상품 목록 페이지 toolbar 구현

    * feat: color 리소스 이름 변경

    * feat: 장바구니 화면 구현

    * feat: 장바구니 버튼 클릭 이벤트 구현

    * feat: 뒤로 가기 버튼 클릭 이벤트 구현

    * feat: 상품 상세 화면 구현

    * chore: 패키지 이동

    * feat: Product 직렬화

    * feat: 상품 클릭 시 상품 상세로 이동

    * refactor: 에러 메시지 String 리소스 추출

    * feat: 상품 상세 화면 X 버튼 클릭 이벤트 구현

    * chore: 패키지 분리

    * feat: 장바구니 저장소 구현

    * feat: 장바구니 추가 기능 구현

    * feat: 상품 목록 저장소 구현

    * feat: 상품 목록 뷰모델 구현

    * feat: 장바구니 뷰모델 구현

    * feat: 장바구니 상품 삭제 구현

    * docs: 기능 요구 사항 작성

    * feat: 상품 목록 더보기 구현

    * refactor: 함수 이름 변경

    * feat: 장바구니 페이지네이션 뷰 구현

    * refactor: 팩토리 메서드 네이밍 수정

    * feat: 장바구니 페이지네이션 뷰홀더 추가

    * feat: 페이지네이션 구현

    * feat: 페이지에 5개씩 가져오도록 구현

    * feat: 장바구니 페이지네이션 구현

    * docs: 기능 요구 사항 체크리스트 업데이트

    * feat: 페이지네이션 아이템 가시성 처리

    * refactor: 상품 목록 뷰 멀티 뷰 타입으로 개선

    * test: ProductsViewModel 테스트 추가

    등록된 상품들을 가져올 수 있다

    * test: ShoppingCartViewModel 테스트 추가

    - 장바구니에 담은 상품들을 보여준다
    - 제거하고 싶은 상품을 장바구니에서 삭제할 수 있다
    - 장바구니의 다음 페이지 정보를 확인할 수 있다
    - 장바구니의 이전 페이지 정보를 확인할 수 있다

    * refactor: 매퍼 함수 위치 수정

    * refactor: 중복되는 layoutManager 설정 제거

    * refactor: 클릭 리스너 interface 네이밍 수정

    * refactor: 상품 상세 뷰 스크롤 되도록 수정

    * refactor: repository 비동기 콜백 구조로 수정

    * refactor: 불필요한 함수 호출 로직 개선

    * refactor: 사용하지 않는 데이터바인딩 변수 제거

    * refactor: 함수 분리

    * feat: 장바구니 마지막 페이지 데이터 없을 경우 이전 페이지로 이동하도록 수정

    * fix: 장바구니 무한 호출 이슈 해결

    * refactor: 더보기 버튼 가시성 로직 수정

    * refactor: 페이지네이션 여부 판단 책임 뷰모델로 이동

    * refactor: 무한스크롤 여부 판단 책임 뷰모델로 이동

    * refactor: Product 객체 생성자에 imageUrl 추가

    * chore: view/common 패키지 분리

    * refactor: 휘발성 이벤트 SingleLiveData 적용

    * refactor: 화면 회전 시 뷰모델 호출 횟수 개선

    * chore: 코드 포맷팅

    * refactor: 상품 목록 RecyclerView 데이터 수정 로직 개선

    * fix: 더보기 버튼 클릭 시 상품 목록 데이터 호출되지 않는 이슈 해결

    * build: corecore-testing 라이브러리 추가

    * test: 뷰모델 테스트 위한 확장함수 구현

    * test: ProductsViewModel 테스트 추가

    * test: TestFixture 매개변수의 값에 따라 생성될 수 있도록 수정

    * test: ShoppingCartViewModel 테스트 추가

    * test: ProductDetailViewModel 테스트 추가

    * test: ProductDetail UI 테스트 추가

    ---------

    Co-authored-by: Giovanni Junseo Kim <[email protected]>

commit e31149b
Author: woowahan-dino <[email protected]>
Date:   Mon Apr 7 14:31:36 2025 +0900

    build: upgrade to kotlin 2.1.0 and android gradle plugin 8.5.2

commit 281c081
Author: woowahan-pjs <[email protected]>
Date:   Fri Apr 12 12:00:25 2024 +0900

    build: upgrade to android gradle plugin 8.3.1 and add junit 5

commit 186fb7f
Author: woowahan-pjs <[email protected]>
Date:   Mon May 8 14:05:24 2023 +0900

    feat: set up the project

commit c0c96e0
Author: 박재성 <[email protected]>
Date:   Mon Apr 10 20:30:26 2023 +0900

    Initial commit

* docs: 기능 요구 사항 정리

* build: preferences datastore 라이브러리 추가

* chore: storage 네이밍 수정

* feat: 사용자 인증 repository 구현

* feat: 사용자의 인증 정보를 저장

* chore: 코드 포맷팅

* build: kotlin serialization 의존성 추가

* build: retrofit 의존성 추가

* feat: api client 구현

* feat: 상품 목록 호출 api 생성

* feat: 상품 목록 서버 통신 구현

* build: serialization converter 의존성 추가

* refactor: converter gson 에서 json 으로 변경

* feat: 상품 목록 서버 호출 로직 구현

* feat: 서버에서 가져온 장바구니 총 수량을 표시

* feat: ktlint Format

* feat: 장바구니에 아이템 추가 api 구현

* feat: 장바구니 수량 수정 api 구현

* docs: 기능 요구 사항 체크리스트 업데이트

* feat: 상품 상세 정보 api 연동

* refactor: ResponseDto 네이밍 수정

* feat: 장바구니 목록 api 연동

* fix: 쇼핑카트 아이템 추가 안 되는 이슈 해결

* refactor: ui 아이템 수량 observable 인터페이스 상속

* fix: 수량 변경 path 값 수정

* fix: onPlusShoppingCartClick 수정

잘못된 뷰모델 메서드 호출 minus -> add

* fix: 잘못된 retrofit convertertype 수정

* fix: 수량 조절 api 로직 수정

* fix: 장바구니 캐시 로직 제거

* fix: +버튼을 눌렀을 때 장바구니 서버에 반영 안되는 문제 해결

* fix: 장바구니 수량 가져와 상품 목록 수량 보이도록 수정

* fix: 다른 화면에서 다시 상품 목록 돌아왔을 때 장바구니 수량 업데이트 로직 수정

* feat: 서버의 장바구니 아이템 삭제 기능 구현

* feat: 상품 목록 뷰 스켈레톤 ui 적용

* feat: 상품 목록 뷰 스켈레톤 ui 구현

* feat: 장바구니 목록 뷰 스켈레톤 ui 구현

* refactor: 스켈레톤 layout 네이밍 수정

* fix: 더보기 버튼 데이터 불러와지지 않는 이슈 해결

* refactor: 불필요한 장바구니 local db 제거

* fix: 상품 상세화면으로 cartId 및 수량 넘기는 로직 수정

* fix: 상품 상세 화면 수량 조절 로직 구분

* fix: 수량 업데이트 되지 않는 현상 해결

* chore: 상품 상세 화면에서 최근 본 상품 클릭 리스너 제거

* docs: step2 기능 요구사항 작성

* feat: 장바구니 주문하기 ui 구현

* feat: 장바구니 추천 페이지 ui 구현

* feat: 장바구니 추천 상품 아이템 구현

* feat: 장바구니에서 선택한 총 가격과 개수 구현

* fix: 장바구니에서 수량 변경 시 체크 상태가 소실되는 문제 해결

* feat: 전체 장바구니 선택 버튼 로직 구현

* fix: 최근 본 상품 목록 추가되지 않는 이슈 해결

* refactor: 장바구니 페이지 무한스크롤로 수정

* fix: 장바구니 목록 보이지 않는 현상 해결

* fix: 장바구니 무한스크롤 로직 수정

* fix: 무한스크롤 아이템 추가 로직 수정

* fix: 무한스크롤 판단 여부 수정

* fix: 장바구니 호출 size 수정

* feat: Product Category 추가

* fix: 상품 목록 뷰 최근 본 상품 없을 때 값이 덮어씌워지는 이슈 해결

* feat: 장바구니 추천 화면에서 주문하기 위해 선택한 아이템 받아 총 가격 및 총 개수 출력

* feat: 상품 추천 알고리즘 구현

* fix: 가장 최근 본 상품 화면에서 최근 본 상품 뜨는 로직 수정

* fix: 최근 본 상품 저장 로직 수정

* refactor: 상품 목록 뷰 ListAdapter로 개선

* feat: 추천 상품 수량 추가 버튼 구현

* fix: increaseQuantity 수량 증가 버튼 클릭 시 장바구니 호출 로직 수정

* fix: 추천 상품 수량 중복으로 추가되는 현상 해결

* fix: 추천 상품 장바구니 수량 감소 버튼 로직 수정

* feat: http loggin interceptor 추가

* feat: 추천 상품 수량 장바구니 추가 로직 구현

* feat: 추천 상품에서 뒤로갔을 때 장바구니 업데이트 로직 추가

* refactor: 장바구니 목록 ListAdapter로 수정

* chore: .gitkeep 파일 제거

* feat: 장바구니에 선택된 상품이 없으면 주문하기 버튼 비활성화

* chore: ktlint 포맷팅

* test: 통과하지 않는 테스트 제거

* refactor: repository 인스턴스 변수 네이밍 수정

* refactor: BaseUrl 숨기도록 수정

* refactor: 사용자 인증용 interceptor 네이밍 수정

* refactor: 서버 통신 시 사용자 인증이 필요한 객체와 필요없는 객체 생성 함수 분리

* refactor: 사용자 정보 숨기도록 개선

* refactor: 상수화

* refactor: Authentication model 데이터 레이어로 이동

* refactor: 재사용할 컴포넌트(수량 조절)아이템 타입 네이밍 수정

* refactor: boolean 타입을 가지는 변수명 네이밍 수정

* fix: 데이터 바인딩 네이밍 수정

* refactor: 추천 상품 ListAdapter로 개선

* refactor: 아이템 가시성 처리 데이터바인딩으로 수정

* refactor: 수량이 0으로 변경될 경우 delete api 사용

* fix: 추천 상품 수량 0으로 변경 시 ui 업데이트 되지 않는 현상 해결

* refactor: data source 분리

* refactor 최근 본 상품 값 업데이트 시 로직 개선

---------

Co-authored-by: oungsi2000 <[email protected]>
laco-dev pushed a commit that referenced this pull request Jun 4, 2025
* Squashed commit of the following:

commit ee14a860ec9a0714f214fcd95f654211afad7d53
Author: m6z1 <[email protected]>
Date:   Mon May 26 17:25:13 2025 +0900

    refactor: mock server 클래스 네이밍 수정

commit a4a475aa8a1513138ac0d1219e006db5e6cc59f1
Author: m6z1 <[email protected]>
Date:   Mon May 26 17:24:56 2025 +0900

    test: mock 상품 서버 테스트 추가

commit 47fdb3bea0ee013cb424c87c8bfb8d30108956bc
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:38:17 2025 +0900

    chore: 사용하지 않는 코드 제거

commit 612f085807c885699c164d20f6e86d17f7ed56c4
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:35:51 2025 +0900

    test: 변경된 프로덕션 코드에 테스트 성공하도록 수정

commit dca0b22d72d29978bc665ac0194982d1904bb39b
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:11:59 2025 +0900

    refactor: 함수 분리

commit 01fd74e94b7c12be72e13f5ff8daa461208ede41
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:03:38 2025 +0900

    refactor: 상품 목록 뷰 수량 조절 컴포넌트 사용

commit 31531c70376089106aca19669d623c75212e3362
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:22:53 2025 +0900

    refactor: 불필요한 함수 제거

commit 6e28f6050542ccc04302c19cdac02c8bb59ffe98
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:18:17 2025 +0900

    feat: 상품 목록 값 서버 통신으로 호출

commit 42855097a4721063665b068c823ce32639837821
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:17:41 2025 +0900

    chore: 패키지 이동

commit 78818df44b0758dc9c5e82cabce440403f304780
Author: m6z1 <[email protected]>
Date:   Mon May 26 14:57:46 2025 +0900

    build: 네트워크용 라이브러리 추가

commit caf311ff815614eb919d8cebcae31702122f7eee
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:51:22 2025 +0900

    chore: 패키지 분리

commit ae13808677f08f12f8cbb510aeef10af0354e05e
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:40:08 2025 +0900

    fix: 최근 본 상품 이전의 상품 개수 업데이트 안 되는 이슈 해결

commit f45a1c61953dd5883735ba1a56a92977ff20ed1b
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:21:57 2025 +0900

    feat: 마지막으로 본 상품 페이지 뒤로가기 시 상품 목록 이동 구현

commit 5bf546fdf96a39ef84bfe6a64db5da86496aaa0f
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:27:51 2025 +0900

    fix: 마지막에 본 상품 클릭 시 마지막에 본 상품 ui 출력되는 이슈 해결

commit e8fd2f41bb2f2397fcb25a4378815852ff5b7182
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:04:52 2025 +0900

    feat: 마지막으로 본 상품일 경우 마지막으로 본 상품 ui 가시성 처리

commit 8c46f764a2567fadf19dd33cafee52497a4ec9a6
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:03:08 2025 +0900

    feat: 상품 상세화면에서 마지막으로 본 상품 출력 로직 구현

commit b16d1ab30766be7ac144df73b7824837a69fcea7
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:47:49 2025 +0900

    refactor: string 리소스 추출

commit 66930ef84673dcd35a2e04e49f53c060d6a1052d
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:45:11 2025 +0900

    feat: 앱 재시작돼도 최근 본 상품 목록 유지

commit ba7864091b772e7ee917f3b0e4152c12c844ffba
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:07:33 2025 +0900

    refactor: RecyclerView 아이템 데코레이터 구현

commit 694ed96ee0250a214b1773d225731cde11e2c083
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:02:10 2025 +0900

    feat: 최근 본 상품 로직 구현

commit 10b2c41995678e2cd75cca6c5bf179da198c2731
Author: m6z1 <[email protected]>
Date:   Mon May 26 01:39:17 2025 +0900

    chore: 불필요한 파일 제거

commit d83505db73294dbaba35f2501108bd217ace370e
Author: m6z1 <[email protected]>
Date:   Mon May 26 01:39:12 2025 +0900

    feat: 앱 재시작에도 상품 목록 장바구니 개수 유지

commit 28f983d287be72890bd3d2f99071ffb22b302cca
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:56 2025 +0900

    feat: 앱 재시작에도 장바구니 데이터 유지

commit f9212ff04a70429d6cd5bfe9fe4296e8f94fea6e
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:41 2025 +0900

    build: Room 라이브러리 버전 2.7.1 업데이트

commit 3884639a89d30be1804a6571705bb2782c4bcabf
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:15 2025 +0900

    refactor: application class 생성

commit 534abd57fad0a7b502e4827aa31ba35648cab837
Author: m6z1 <[email protected]>
Date:   Sun May 25 19:02:09 2025 +0900

    docs: 기능 요구 사항 정리

commit fea92920ee32b6cf5e39bb5e31ab3fc22ed81726
Author: m6z1 <[email protected]>
Date:   Sun May 25 18:56:01 2025 +0900

    build: room 라이브러리 추가

commit 2d4262ce2b9a64af8433115c8c950051b66dec3c
Author: m6z1 <[email protected]>
Date:   Sun May 25 15:12:43 2025 +0900

    feat: 장바구니 화면에서 뒤로 갔을 때 상태 일치 로직 구현

commit 2c3f80de3ec329a009faf842b6eb436ac6d34c4c
Author: m6z1 <[email protected]>
Date:   Sun May 25 14:16:38 2025 +0900

    feat: 상품 상세 화면에서 뒤로 갔을 때 상태 일치 로직 구현

commit 57b84e929376b0f2dc80df52252a816ace74b2b4
Author: m6z1 <[email protected]>
Date:   Thu May 22 17:11:32 2025 +0900

    feat: 장바구니에 담은 수량 조절 로직 구현

commit 609dffb3ffbc68b3c5dd0f461369c8793fba60c2
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:58:09 2025 +0900

    feat: 장바구니 상품 제거 / 장바구니 수량 빼는 로직 분리

commit 6753a2cca3abc0fb406b5c1721f0e2f1827f0915
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:23:04 2025 +0900

    feat: 장바구니 화면 수량 별 가격 출력 구현

commit f402d7cd9223d0c08d6433c8e25089b7e5e20181
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:22:45 2025 +0900

    refactor: 장바구니 상품 조회 반환 타입 수정

commit 4a0f8bb5ae5b3e600a2032e446f96e440248c60e
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:46:49 2025 +0900

    feat: 상품 상세 화면 수량만큼 선택한 총 가격 출력 구현

commit eeb7c0fb2991195183e81e750b079993a5dcae2a
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:40:18 2025 +0900

    feat: 상품 상세 화면 수량 조절 버튼 구현

commit a6cc3d7bee32fe9fbd1e17aff9d19b65133b8251
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:40:08 2025 +0900

    feat: 상품 수량 공용 컴포넌트 Ui 구현

commit d4d75847633f6508b3246ef589c1088300fa2f11
Author: m6z1 <[email protected]>
Date:   Thu May 22 13:34:51 2025 +0900

    feat: 상품 목록 뷰 장바구니 로직 추가

    - 각 상품에서 + - 버튼을 통해 수량을 조절할 수 있다.
    - 장바구니에 담근 총 수량이 보인다.

commit 967db9894b60d73b7ba3513e87862d85abccab9f
Author: m6z1 <[email protected]>
Date:   Wed May 21 17:17:17 2025 +0900

    feat: 각 상품에 + 버튼 ui 구현

commit 90a01e7aeb3560e84c5237fbdaf0dd5464f1b7f6
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:41:47 2025 +0900

    refactor: 함수 네이밍 명시적으로 수정

commit 85b96fc36d86051debe34415217b798fe4a60f04
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:37:05 2025 +0900

    refactor: 중복되는 값 변수에 할당

    - ProductsViewModel에서 중복되는 라이브 데이터 값 할당 후 사용

commit 83f3c2baaa82e81d79343f8d24a4a13fd5435793
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:22:53 2025 +0900

    refactor: 상품 목록 아이템 추가 함수 네이밍 수정

commit 93c65d1e824bc4b8aa22cd8236a6bdff7cada002
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:21:09 2025 +0900

    chore: activity exported 속성 수정

commit 5834af9e3b78e5857db83d2b8b6be782278dc8f1
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:18:21 2025 +0900

    refactor: 상품 목록 조회 호출 로직 수정

commit ad2e4ca0075a301fee2cea0a6d01f46020a4022e
Author: m6z1 <[email protected]>
Date:   Wed May 21 11:26:17 2025 +0900

    refactor: result 콜백 매개변수 네이밍 수정

commit a6fbdb0403a5cf770a713656f27c4681cf918724
Author: m6z1 <[email protected]>
Date:   Wed May 21 11:23:13 2025 +0900

    docs: 기능 요구 사항 정리

commit 519909ad15a249eea2d31c129b39a9bf8398fdb1
Author: Son Myeongji <[email protected]>
Date:   Tue May 20 20:13:07 2025 +0900

    [쇼핑 장바구니 1, 2단계] 뭉치 미션 제출합니다. (#101)

    * docs: 기능 요구 사항 작성

    * build: 데이터 바인딩 추가

    * feat: Product 생성

    * feat: 상품 목록 화면에서 행당 2개의 상품을 출력

    * chore: 패키지 분리

    * build: Glide 라이브러리 추가

    * chore: 더미 데이터 수정

    * feat: ProductUrls 구현

    * build: kapt 추가

    * feat: BindingAdapter setImageUrl 구현

    * feat: 인터넷 권한 추가

    * feat: 이미지 바인딩 어댑터 사용

    * chore: BindingAdapter 패키지 이동

    * feat: 아이템 간 마진 조정

    * chore: 메뉴 아이콘들 추가

    * feat: 앱 테마 NoActionBar 수정

    * feat: 상품 목록 페이지 toolbar 구현

    * feat: color 리소스 이름 변경

    * feat: 장바구니 화면 구현

    * feat: 장바구니 버튼 클릭 이벤트 구현

    * feat: 뒤로 가기 버튼 클릭 이벤트 구현

    * feat: 상품 상세 화면 구현

    * chore: 패키지 이동

    * feat: Product 직렬화

    * feat: 상품 클릭 시 상품 상세로 이동

    * refactor: 에러 메시지 String 리소스 추출

    * feat: 상품 상세 화면 X 버튼 클릭 이벤트 구현

    * chore: 패키지 분리

    * feat: 장바구니 저장소 구현

    * feat: 장바구니 추가 기능 구현

    * feat: 상품 목록 저장소 구현

    * feat: 상품 목록 뷰모델 구현

    * feat: 장바구니 뷰모델 구현

    * feat: 장바구니 상품 삭제 구현

    * docs: 기능 요구 사항 작성

    * feat: 상품 목록 더보기 구현

    * refactor: 함수 이름 변경

    * feat: 장바구니 페이지네이션 뷰 구현

    * refactor: 팩토리 메서드 네이밍 수정

    * feat: 장바구니 페이지네이션 뷰홀더 추가

    * feat: 페이지네이션 구현

    * feat: 페이지에 5개씩 가져오도록 구현

    * feat: 장바구니 페이지네이션 구현

    * docs: 기능 요구 사항 체크리스트 업데이트

    * feat: 페이지네이션 아이템 가시성 처리

    * refactor: 상품 목록 뷰 멀티 뷰 타입으로 개선

    * test: ProductsViewModel 테스트 추가

    등록된 상품들을 가져올 수 있다

    * test: ShoppingCartViewModel 테스트 추가

    - 장바구니에 담은 상품들을 보여준다
    - 제거하고 싶은 상품을 장바구니에서 삭제할 수 있다
    - 장바구니의 다음 페이지 정보를 확인할 수 있다
    - 장바구니의 이전 페이지 정보를 확인할 수 있다

    * refactor: 매퍼 함수 위치 수정

    * refactor: 중복되는 layoutManager 설정 제거

    * refactor: 클릭 리스너 interface 네이밍 수정

    * refactor: 상품 상세 뷰 스크롤 되도록 수정

    * refactor: repository 비동기 콜백 구조로 수정

    * refactor: 불필요한 함수 호출 로직 개선

    * refactor: 사용하지 않는 데이터바인딩 변수 제거

    * refactor: 함수 분리

    * feat: 장바구니 마지막 페이지 데이터 없을 경우 이전 페이지로 이동하도록 수정

    * fix: 장바구니 무한 호출 이슈 해결

    * refactor: 더보기 버튼 가시성 로직 수정

    * refactor: 페이지네이션 여부 판단 책임 뷰모델로 이동

    * refactor: 무한스크롤 여부 판단 책임 뷰모델로 이동

    * refactor: Product 객체 생성자에 imageUrl 추가

    * chore: view/common 패키지 분리

    * refactor: 휘발성 이벤트 SingleLiveData 적용

    * refactor: 화면 회전 시 뷰모델 호출 횟수 개선

    * chore: 코드 포맷팅

    * refactor: 상품 목록 RecyclerView 데이터 수정 로직 개선

    * fix: 더보기 버튼 클릭 시 상품 목록 데이터 호출되지 않는 이슈 해결

    * build: corecore-testing 라이브러리 추가

    * test: 뷰모델 테스트 위한 확장함수 구현

    * test: ProductsViewModel 테스트 추가

    * test: TestFixture 매개변수의 값에 따라 생성될 수 있도록 수정

    * test: ShoppingCartViewModel 테스트 추가

    * test: ProductDetailViewModel 테스트 추가

    * test: ProductDetail UI 테스트 추가

    ---------

    Co-authored-by: Giovanni Junseo Kim <[email protected]>

commit e31149b
Author: woowahan-dino <[email protected]>
Date:   Mon Apr 7 14:31:36 2025 +0900

    build: upgrade to kotlin 2.1.0 and android gradle plugin 8.5.2

commit 281c081
Author: woowahan-pjs <[email protected]>
Date:   Fri Apr 12 12:00:25 2024 +0900

    build: upgrade to android gradle plugin 8.3.1 and add junit 5

commit 186fb7f
Author: woowahan-pjs <[email protected]>
Date:   Mon May 8 14:05:24 2023 +0900

    feat: set up the project

commit c0c96e0
Author: 박재성 <[email protected]>
Date:   Mon Apr 10 20:30:26 2023 +0900

    Initial commit

* docs: 기능 요구 사항 정리

* build: preferences datastore 라이브러리 추가

* chore: storage 네이밍 수정

* feat: 사용자 인증 repository 구현

* feat: 사용자의 인증 정보를 저장

* chore: 코드 포맷팅

* build: kotlin serialization 의존성 추가

* build: retrofit 의존성 추가

* feat: api client 구현

* feat: 상품 목록 호출 api 생성

* feat: 상품 목록 서버 통신 구현

* build: serialization converter 의존성 추가

* refactor: converter gson 에서 json 으로 변경

* feat: 상품 목록 서버 호출 로직 구현

* feat: 서버에서 가져온 장바구니 총 수량을 표시

* feat: ktlint Format

* feat: 장바구니에 아이템 추가 api 구현

* feat: 장바구니 수량 수정 api 구현

* docs: 기능 요구 사항 체크리스트 업데이트

* feat: 상품 상세 정보 api 연동

* refactor: ResponseDto 네이밍 수정

* feat: 장바구니 목록 api 연동

* fix: 쇼핑카트 아이템 추가 안 되는 이슈 해결

* refactor: ui 아이템 수량 observable 인터페이스 상속

* fix: 수량 변경 path 값 수정

* fix: onPlusShoppingCartClick 수정

잘못된 뷰모델 메서드 호출 minus -> add

* fix: 잘못된 retrofit convertertype 수정

* fix: 수량 조절 api 로직 수정

* fix: 장바구니 캐시 로직 제거

* fix: +버튼을 눌렀을 때 장바구니 서버에 반영 안되는 문제 해결

* fix: 장바구니 수량 가져와 상품 목록 수량 보이도록 수정

* fix: 다른 화면에서 다시 상품 목록 돌아왔을 때 장바구니 수량 업데이트 로직 수정

* feat: 서버의 장바구니 아이템 삭제 기능 구현

* feat: 상품 목록 뷰 스켈레톤 ui 적용

* feat: 상품 목록 뷰 스켈레톤 ui 구현

* feat: 장바구니 목록 뷰 스켈레톤 ui 구현

* refactor: 스켈레톤 layout 네이밍 수정

* fix: 더보기 버튼 데이터 불러와지지 않는 이슈 해결

* refactor: 불필요한 장바구니 local db 제거

* fix: 상품 상세화면으로 cartId 및 수량 넘기는 로직 수정

* fix: 상품 상세 화면 수량 조절 로직 구분

* fix: 수량 업데이트 되지 않는 현상 해결

* chore: 상품 상세 화면에서 최근 본 상품 클릭 리스너 제거

* docs: step2 기능 요구사항 작성

* feat: 장바구니 주문하기 ui 구현

* feat: 장바구니 추천 페이지 ui 구현

* feat: 장바구니 추천 상품 아이템 구현

* feat: 장바구니에서 선택한 총 가격과 개수 구현

* fix: 장바구니에서 수량 변경 시 체크 상태가 소실되는 문제 해결

* feat: 전체 장바구니 선택 버튼 로직 구현

* fix: 최근 본 상품 목록 추가되지 않는 이슈 해결

* refactor: 장바구니 페이지 무한스크롤로 수정

* fix: 장바구니 목록 보이지 않는 현상 해결

* fix: 장바구니 무한스크롤 로직 수정

* fix: 무한스크롤 아이템 추가 로직 수정

* fix: 무한스크롤 판단 여부 수정

* fix: 장바구니 호출 size 수정

* feat: Product Category 추가

* fix: 상품 목록 뷰 최근 본 상품 없을 때 값이 덮어씌워지는 이슈 해결

* feat: 장바구니 추천 화면에서 주문하기 위해 선택한 아이템 받아 총 가격 및 총 개수 출력

* feat: 상품 추천 알고리즘 구현

* fix: 가장 최근 본 상품 화면에서 최근 본 상품 뜨는 로직 수정

* fix: 최근 본 상품 저장 로직 수정

* refactor: 상품 목록 뷰 ListAdapter로 개선

* feat: 추천 상품 수량 추가 버튼 구현

* fix: increaseQuantity 수량 증가 버튼 클릭 시 장바구니 호출 로직 수정

* fix: 추천 상품 수량 중복으로 추가되는 현상 해결

* fix: 추천 상품 장바구니 수량 감소 버튼 로직 수정

* feat: http loggin interceptor 추가

* feat: 추천 상품 수량 장바구니 추가 로직 구현

* feat: 추천 상품에서 뒤로갔을 때 장바구니 업데이트 로직 추가

* refactor: 장바구니 목록 ListAdapter로 수정

* chore: .gitkeep 파일 제거

* feat: 장바구니에 선택된 상품이 없으면 주문하기 버튼 비활성화

* chore: ktlint 포맷팅

* test: 통과하지 않는 테스트 제거

* refactor: ProductsViewModel 코루틴으로 변경

* refactor: ShoppingCartViewModel 코루틴으로 변경

* fix: 장바구니 상품이 삭제되면 모두 로드가 안되는 버그 해결

* refactor: 주문정보 표시 로직 orderBarViewModel로 이동

* refactor: dto 사용하지 않는 필드 제거

* refactor: dto 중첩

Ktlint Format

* refactor: include 감싸는 Layout 제거

* refactor: 사용되지 않는 view 제거

* refactor: isChecked xml에서 인자 제거

* refactor: ShoppingCartRecommendViewModel 로직 간결하게

* fix: 추천 상품에서 장바구니로 돌아오면 장바구니가 중복되는 문제 해결

* refactor: data layor에서 가져온 값 뷰모델에서 사용

* refactor: LiveData.map 확장함수 사용

* fix: 화면 회전 시 결제 금액 정보가 날아가는 문제 해결

* fix: 장바구니 화면 회전 시 중복된 데이터 추가 버그 해결

* refactor: ListAdapter 로 변경

* refactor: 사용되지 않는 장바구니 pagination view 제거

* refactor: 단방향 이벤트 흐름 반영

* refactor: 스켈레톤ui 데이터바인딩으로 전환

* refactor: 뷰모델 초기화 생성자에서 하도록 변경

* refactor: Dto postfix 제거

* refactor: 명시적으로 thread join으로 변경

* refactor: 리사이클러 뷰 아이템 api 로딩상태 관리

* test: ProductsActivity 테스트 작성

* test: ProductsActivity 테스트 수정

* test: ProductsDetailActivity 테스트 작성

* test: ShoppingCartActivity 테스트 작성

* test: ShoppingCartRecommend 테스트 작성

---------

Co-authored-by: m6z1 <[email protected]>
oungsi2000 added a commit to oungsi2000/android-shopping-order that referenced this pull request Jun 4, 2025
* Squashed commit of the following:

commit ee14a860ec9a0714f214fcd95f654211afad7d53
Author: m6z1 <[email protected]>
Date:   Mon May 26 17:25:13 2025 +0900

    refactor: mock server 클래스 네이밍 수정

commit a4a475aa8a1513138ac0d1219e006db5e6cc59f1
Author: m6z1 <[email protected]>
Date:   Mon May 26 17:24:56 2025 +0900

    test: mock 상품 서버 테스트 추가

commit 47fdb3bea0ee013cb424c87c8bfb8d30108956bc
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:38:17 2025 +0900

    chore: 사용하지 않는 코드 제거

commit 612f085807c885699c164d20f6e86d17f7ed56c4
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:35:51 2025 +0900

    test: 변경된 프로덕션 코드에 테스트 성공하도록 수정

commit dca0b22d72d29978bc665ac0194982d1904bb39b
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:11:59 2025 +0900

    refactor: 함수 분리

commit 01fd74e94b7c12be72e13f5ff8daa461208ede41
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:03:38 2025 +0900

    refactor: 상품 목록 뷰 수량 조절 컴포넌트 사용

commit 31531c70376089106aca19669d623c75212e3362
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:22:53 2025 +0900

    refactor: 불필요한 함수 제거

commit 6e28f6050542ccc04302c19cdac02c8bb59ffe98
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:18:17 2025 +0900

    feat: 상품 목록 값 서버 통신으로 호출

commit 42855097a4721063665b068c823ce32639837821
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:17:41 2025 +0900

    chore: 패키지 이동

commit 78818df44b0758dc9c5e82cabce440403f304780
Author: m6z1 <[email protected]>
Date:   Mon May 26 14:57:46 2025 +0900

    build: 네트워크용 라이브러리 추가

commit caf311ff815614eb919d8cebcae31702122f7eee
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:51:22 2025 +0900

    chore: 패키지 분리

commit ae13808677f08f12f8cbb510aeef10af0354e05e
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:40:08 2025 +0900

    fix: 최근 본 상품 이전의 상품 개수 업데이트 안 되는 이슈 해결

commit f45a1c61953dd5883735ba1a56a92977ff20ed1b
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:21:57 2025 +0900

    feat: 마지막으로 본 상품 페이지 뒤로가기 시 상품 목록 이동 구현

commit 5bf546fdf96a39ef84bfe6a64db5da86496aaa0f
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:27:51 2025 +0900

    fix: 마지막에 본 상품 클릭 시 마지막에 본 상품 ui 출력되는 이슈 해결

commit e8fd2f41bb2f2397fcb25a4378815852ff5b7182
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:04:52 2025 +0900

    feat: 마지막으로 본 상품일 경우 마지막으로 본 상품 ui 가시성 처리

commit 8c46f764a2567fadf19dd33cafee52497a4ec9a6
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:03:08 2025 +0900

    feat: 상품 상세화면에서 마지막으로 본 상품 출력 로직 구현

commit b16d1ab30766be7ac144df73b7824837a69fcea7
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:47:49 2025 +0900

    refactor: string 리소스 추출

commit 66930ef84673dcd35a2e04e49f53c060d6a1052d
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:45:11 2025 +0900

    feat: 앱 재시작돼도 최근 본 상품 목록 유지

commit ba7864091b772e7ee917f3b0e4152c12c844ffba
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:07:33 2025 +0900

    refactor: RecyclerView 아이템 데코레이터 구현

commit 694ed96ee0250a214b1773d225731cde11e2c083
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:02:10 2025 +0900

    feat: 최근 본 상품 로직 구현

commit 10b2c41995678e2cd75cca6c5bf179da198c2731
Author: m6z1 <[email protected]>
Date:   Mon May 26 01:39:17 2025 +0900

    chore: 불필요한 파일 제거

commit d83505db73294dbaba35f2501108bd217ace370e
Author: m6z1 <[email protected]>
Date:   Mon May 26 01:39:12 2025 +0900

    feat: 앱 재시작에도 상품 목록 장바구니 개수 유지

commit 28f983d287be72890bd3d2f99071ffb22b302cca
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:56 2025 +0900

    feat: 앱 재시작에도 장바구니 데이터 유지

commit f9212ff04a70429d6cd5bfe9fe4296e8f94fea6e
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:41 2025 +0900

    build: Room 라이브러리 버전 2.7.1 업데이트

commit 3884639a89d30be1804a6571705bb2782c4bcabf
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:15 2025 +0900

    refactor: application class 생성

commit 534abd57fad0a7b502e4827aa31ba35648cab837
Author: m6z1 <[email protected]>
Date:   Sun May 25 19:02:09 2025 +0900

    docs: 기능 요구 사항 정리

commit fea92920ee32b6cf5e39bb5e31ab3fc22ed81726
Author: m6z1 <[email protected]>
Date:   Sun May 25 18:56:01 2025 +0900

    build: room 라이브러리 추가

commit 2d4262ce2b9a64af8433115c8c950051b66dec3c
Author: m6z1 <[email protected]>
Date:   Sun May 25 15:12:43 2025 +0900

    feat: 장바구니 화면에서 뒤로 갔을 때 상태 일치 로직 구현

commit 2c3f80de3ec329a009faf842b6eb436ac6d34c4c
Author: m6z1 <[email protected]>
Date:   Sun May 25 14:16:38 2025 +0900

    feat: 상품 상세 화면에서 뒤로 갔을 때 상태 일치 로직 구현

commit 57b84e929376b0f2dc80df52252a816ace74b2b4
Author: m6z1 <[email protected]>
Date:   Thu May 22 17:11:32 2025 +0900

    feat: 장바구니에 담은 수량 조절 로직 구현

commit 609dffb3ffbc68b3c5dd0f461369c8793fba60c2
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:58:09 2025 +0900

    feat: 장바구니 상품 제거 / 장바구니 수량 빼는 로직 분리

commit 6753a2cca3abc0fb406b5c1721f0e2f1827f0915
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:23:04 2025 +0900

    feat: 장바구니 화면 수량 별 가격 출력 구현

commit f402d7cd9223d0c08d6433c8e25089b7e5e20181
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:22:45 2025 +0900

    refactor: 장바구니 상품 조회 반환 타입 수정

commit 4a0f8bb5ae5b3e600a2032e446f96e440248c60e
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:46:49 2025 +0900

    feat: 상품 상세 화면 수량만큼 선택한 총 가격 출력 구현

commit eeb7c0fb2991195183e81e750b079993a5dcae2a
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:40:18 2025 +0900

    feat: 상품 상세 화면 수량 조절 버튼 구현

commit a6cc3d7bee32fe9fbd1e17aff9d19b65133b8251
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:40:08 2025 +0900

    feat: 상품 수량 공용 컴포넌트 Ui 구현

commit d4d75847633f6508b3246ef589c1088300fa2f11
Author: m6z1 <[email protected]>
Date:   Thu May 22 13:34:51 2025 +0900

    feat: 상품 목록 뷰 장바구니 로직 추가

    - 각 상품에서 + - 버튼을 통해 수량을 조절할 수 있다.
    - 장바구니에 담근 총 수량이 보인다.

commit 967db9894b60d73b7ba3513e87862d85abccab9f
Author: m6z1 <[email protected]>
Date:   Wed May 21 17:17:17 2025 +0900

    feat: 각 상품에 + 버튼 ui 구현

commit 90a01e7aeb3560e84c5237fbdaf0dd5464f1b7f6
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:41:47 2025 +0900

    refactor: 함수 네이밍 명시적으로 수정

commit 85b96fc36d86051debe34415217b798fe4a60f04
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:37:05 2025 +0900

    refactor: 중복되는 값 변수에 할당

    - ProductsViewModel에서 중복되는 라이브 데이터 값 할당 후 사용

commit 83f3c2baaa82e81d79343f8d24a4a13fd5435793
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:22:53 2025 +0900

    refactor: 상품 목록 아이템 추가 함수 네이밍 수정

commit 93c65d1e824bc4b8aa22cd8236a6bdff7cada002
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:21:09 2025 +0900

    chore: activity exported 속성 수정

commit 5834af9e3b78e5857db83d2b8b6be782278dc8f1
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:18:21 2025 +0900

    refactor: 상품 목록 조회 호출 로직 수정

commit ad2e4ca0075a301fee2cea0a6d01f46020a4022e
Author: m6z1 <[email protected]>
Date:   Wed May 21 11:26:17 2025 +0900

    refactor: result 콜백 매개변수 네이밍 수정

commit a6fbdb0403a5cf770a713656f27c4681cf918724
Author: m6z1 <[email protected]>
Date:   Wed May 21 11:23:13 2025 +0900

    docs: 기능 요구 사항 정리

commit 519909ad15a249eea2d31c129b39a9bf8398fdb1
Author: Son Myeongji <[email protected]>
Date:   Tue May 20 20:13:07 2025 +0900

    [쇼핑 장바구니 1, 2단계] 뭉치 미션 제출합니다. (woowacourse#101)

    * docs: 기능 요구 사항 작성

    * build: 데이터 바인딩 추가

    * feat: Product 생성

    * feat: 상품 목록 화면에서 행당 2개의 상품을 출력

    * chore: 패키지 분리

    * build: Glide 라이브러리 추가

    * chore: 더미 데이터 수정

    * feat: ProductUrls 구현

    * build: kapt 추가

    * feat: BindingAdapter setImageUrl 구현

    * feat: 인터넷 권한 추가

    * feat: 이미지 바인딩 어댑터 사용

    * chore: BindingAdapter 패키지 이동

    * feat: 아이템 간 마진 조정

    * chore: 메뉴 아이콘들 추가

    * feat: 앱 테마 NoActionBar 수정

    * feat: 상품 목록 페이지 toolbar 구현

    * feat: color 리소스 이름 변경

    * feat: 장바구니 화면 구현

    * feat: 장바구니 버튼 클릭 이벤트 구현

    * feat: 뒤로 가기 버튼 클릭 이벤트 구현

    * feat: 상품 상세 화면 구현

    * chore: 패키지 이동

    * feat: Product 직렬화

    * feat: 상품 클릭 시 상품 상세로 이동

    * refactor: 에러 메시지 String 리소스 추출

    * feat: 상품 상세 화면 X 버튼 클릭 이벤트 구현

    * chore: 패키지 분리

    * feat: 장바구니 저장소 구현

    * feat: 장바구니 추가 기능 구현

    * feat: 상품 목록 저장소 구현

    * feat: 상품 목록 뷰모델 구현

    * feat: 장바구니 뷰모델 구현

    * feat: 장바구니 상품 삭제 구현

    * docs: 기능 요구 사항 작성

    * feat: 상품 목록 더보기 구현

    * refactor: 함수 이름 변경

    * feat: 장바구니 페이지네이션 뷰 구현

    * refactor: 팩토리 메서드 네이밍 수정

    * feat: 장바구니 페이지네이션 뷰홀더 추가

    * feat: 페이지네이션 구현

    * feat: 페이지에 5개씩 가져오도록 구현

    * feat: 장바구니 페이지네이션 구현

    * docs: 기능 요구 사항 체크리스트 업데이트

    * feat: 페이지네이션 아이템 가시성 처리

    * refactor: 상품 목록 뷰 멀티 뷰 타입으로 개선

    * test: ProductsViewModel 테스트 추가

    등록된 상품들을 가져올 수 있다

    * test: ShoppingCartViewModel 테스트 추가

    - 장바구니에 담은 상품들을 보여준다
    - 제거하고 싶은 상품을 장바구니에서 삭제할 수 있다
    - 장바구니의 다음 페이지 정보를 확인할 수 있다
    - 장바구니의 이전 페이지 정보를 확인할 수 있다

    * refactor: 매퍼 함수 위치 수정

    * refactor: 중복되는 layoutManager 설정 제거

    * refactor: 클릭 리스너 interface 네이밍 수정

    * refactor: 상품 상세 뷰 스크롤 되도록 수정

    * refactor: repository 비동기 콜백 구조로 수정

    * refactor: 불필요한 함수 호출 로직 개선

    * refactor: 사용하지 않는 데이터바인딩 변수 제거

    * refactor: 함수 분리

    * feat: 장바구니 마지막 페이지 데이터 없을 경우 이전 페이지로 이동하도록 수정

    * fix: 장바구니 무한 호출 이슈 해결

    * refactor: 더보기 버튼 가시성 로직 수정

    * refactor: 페이지네이션 여부 판단 책임 뷰모델로 이동

    * refactor: 무한스크롤 여부 판단 책임 뷰모델로 이동

    * refactor: Product 객체 생성자에 imageUrl 추가

    * chore: view/common 패키지 분리

    * refactor: 휘발성 이벤트 SingleLiveData 적용

    * refactor: 화면 회전 시 뷰모델 호출 횟수 개선

    * chore: 코드 포맷팅

    * refactor: 상품 목록 RecyclerView 데이터 수정 로직 개선

    * fix: 더보기 버튼 클릭 시 상품 목록 데이터 호출되지 않는 이슈 해결

    * build: corecore-testing 라이브러리 추가

    * test: 뷰모델 테스트 위한 확장함수 구현

    * test: ProductsViewModel 테스트 추가

    * test: TestFixture 매개변수의 값에 따라 생성될 수 있도록 수정

    * test: ShoppingCartViewModel 테스트 추가

    * test: ProductDetailViewModel 테스트 추가

    * test: ProductDetail UI 테스트 추가

    ---------

    Co-authored-by: Giovanni Junseo Kim <[email protected]>

commit e31149b
Author: woowahan-dino <[email protected]>
Date:   Mon Apr 7 14:31:36 2025 +0900

    build: upgrade to kotlin 2.1.0 and android gradle plugin 8.5.2

commit 281c081
Author: woowahan-pjs <[email protected]>
Date:   Fri Apr 12 12:00:25 2024 +0900

    build: upgrade to android gradle plugin 8.3.1 and add junit 5

commit 186fb7f
Author: woowahan-pjs <[email protected]>
Date:   Mon May 8 14:05:24 2023 +0900

    feat: set up the project

commit c0c96e0
Author: 박재성 <[email protected]>
Date:   Mon Apr 10 20:30:26 2023 +0900

    Initial commit

* docs: 기능 요구 사항 정리

* build: preferences datastore 라이브러리 추가

* chore: storage 네이밍 수정

* feat: 사용자 인증 repository 구현

* feat: 사용자의 인증 정보를 저장

* chore: 코드 포맷팅

* build: kotlin serialization 의존성 추가

* build: retrofit 의존성 추가

* feat: api client 구현

* feat: 상품 목록 호출 api 생성

* feat: 상품 목록 서버 통신 구현

* build: serialization converter 의존성 추가

* refactor: converter gson 에서 json 으로 변경

* feat: 상품 목록 서버 호출 로직 구현

* feat: 서버에서 가져온 장바구니 총 수량을 표시

* feat: ktlint Format

* feat: 장바구니에 아이템 추가 api 구현

* feat: 장바구니 수량 수정 api 구현

* docs: 기능 요구 사항 체크리스트 업데이트

* feat: 상품 상세 정보 api 연동

* refactor: ResponseDto 네이밍 수정

* feat: 장바구니 목록 api 연동

* fix: 쇼핑카트 아이템 추가 안 되는 이슈 해결

* refactor: ui 아이템 수량 observable 인터페이스 상속

* fix: 수량 변경 path 값 수정

* fix: onPlusShoppingCartClick 수정

잘못된 뷰모델 메서드 호출 minus -> add

* fix: 잘못된 retrofit convertertype 수정

* fix: 수량 조절 api 로직 수정

* fix: 장바구니 캐시 로직 제거

* fix: +버튼을 눌렀을 때 장바구니 서버에 반영 안되는 문제 해결

* fix: 장바구니 수량 가져와 상품 목록 수량 보이도록 수정

* fix: 다른 화면에서 다시 상품 목록 돌아왔을 때 장바구니 수량 업데이트 로직 수정

* feat: 서버의 장바구니 아이템 삭제 기능 구현

* feat: 상품 목록 뷰 스켈레톤 ui 적용

* feat: 상품 목록 뷰 스켈레톤 ui 구현

* feat: 장바구니 목록 뷰 스켈레톤 ui 구현

* refactor: 스켈레톤 layout 네이밍 수정

* fix: 더보기 버튼 데이터 불러와지지 않는 이슈 해결

* refactor: 불필요한 장바구니 local db 제거

* fix: 상품 상세화면으로 cartId 및 수량 넘기는 로직 수정

* fix: 상품 상세 화면 수량 조절 로직 구분

* fix: 수량 업데이트 되지 않는 현상 해결

* chore: 상품 상세 화면에서 최근 본 상품 클릭 리스너 제거

* docs: step2 기능 요구사항 작성

* feat: 장바구니 주문하기 ui 구현

* feat: 장바구니 추천 페이지 ui 구현

* feat: 장바구니 추천 상품 아이템 구현

* feat: 장바구니에서 선택한 총 가격과 개수 구현

* fix: 장바구니에서 수량 변경 시 체크 상태가 소실되는 문제 해결

* feat: 전체 장바구니 선택 버튼 로직 구현

* fix: 최근 본 상품 목록 추가되지 않는 이슈 해결

* refactor: 장바구니 페이지 무한스크롤로 수정

* fix: 장바구니 목록 보이지 않는 현상 해결

* fix: 장바구니 무한스크롤 로직 수정

* fix: 무한스크롤 아이템 추가 로직 수정

* fix: 무한스크롤 판단 여부 수정

* fix: 장바구니 호출 size 수정

* feat: Product Category 추가

* fix: 상품 목록 뷰 최근 본 상품 없을 때 값이 덮어씌워지는 이슈 해결

* feat: 장바구니 추천 화면에서 주문하기 위해 선택한 아이템 받아 총 가격 및 총 개수 출력

* feat: 상품 추천 알고리즘 구현

* fix: 가장 최근 본 상품 화면에서 최근 본 상품 뜨는 로직 수정

* fix: 최근 본 상품 저장 로직 수정

* refactor: 상품 목록 뷰 ListAdapter로 개선

* feat: 추천 상품 수량 추가 버튼 구현

* fix: increaseQuantity 수량 증가 버튼 클릭 시 장바구니 호출 로직 수정

* fix: 추천 상품 수량 중복으로 추가되는 현상 해결

* fix: 추천 상품 장바구니 수량 감소 버튼 로직 수정

* feat: http loggin interceptor 추가

* feat: 추천 상품 수량 장바구니 추가 로직 구현

* feat: 추천 상품에서 뒤로갔을 때 장바구니 업데이트 로직 추가

* refactor: 장바구니 목록 ListAdapter로 수정

* chore: .gitkeep 파일 제거

* feat: 장바구니에 선택된 상품이 없으면 주문하기 버튼 비활성화

* chore: ktlint 포맷팅

* test: 통과하지 않는 테스트 제거

* refactor: ProductsViewModel 코루틴으로 변경

* refactor: ShoppingCartViewModel 코루틴으로 변경

* fix: 장바구니 상품이 삭제되면 모두 로드가 안되는 버그 해결

* refactor: 주문정보 표시 로직 orderBarViewModel로 이동

* refactor: dto 사용하지 않는 필드 제거

* refactor: dto 중첩

Ktlint Format

* refactor: include 감싸는 Layout 제거

* refactor: 사용되지 않는 view 제거

* refactor: isChecked xml에서 인자 제거

* refactor: ShoppingCartRecommendViewModel 로직 간결하게

* fix: 추천 상품에서 장바구니로 돌아오면 장바구니가 중복되는 문제 해결

* refactor: data layor에서 가져온 값 뷰모델에서 사용

* refactor: LiveData.map 확장함수 사용

* fix: 화면 회전 시 결제 금액 정보가 날아가는 문제 해결

* fix: 장바구니 화면 회전 시 중복된 데이터 추가 버그 해결

* refactor: ListAdapter 로 변경

* refactor: 사용되지 않는 장바구니 pagination view 제거

* refactor: 단방향 이벤트 흐름 반영

* refactor: 스켈레톤ui 데이터바인딩으로 전환

* refactor: 뷰모델 초기화 생성자에서 하도록 변경

* refactor: Dto postfix 제거

* refactor: 명시적으로 thread join으로 변경

* refactor: 리사이클러 뷰 아이템 api 로딩상태 관리

* test: ProductsActivity 테스트 작성

* test: ProductsActivity 테스트 수정

* test: ProductsDetailActivity 테스트 작성

* test: ShoppingCartActivity 테스트 작성

* test: ShoppingCartRecommend 테스트 작성

---------

Co-authored-by: m6z1 <[email protected]>
oungsi2000 pushed a commit to oungsi2000/android-shopping-order that referenced this pull request Jun 4, 2025
commit ee14a860ec9a0714f214fcd95f654211afad7d53
Author: m6z1 <[email protected]>
Date:   Mon May 26 17:25:13 2025 +0900

    refactor: mock server 클래스 네이밍 수정

commit a4a475aa8a1513138ac0d1219e006db5e6cc59f1
Author: m6z1 <[email protected]>
Date:   Mon May 26 17:24:56 2025 +0900

    test: mock 상품 서버 테스트 추가

commit 47fdb3bea0ee013cb424c87c8bfb8d30108956bc
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:38:17 2025 +0900

    chore: 사용하지 않는 코드 제거

commit 612f085807c885699c164d20f6e86d17f7ed56c4
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:35:51 2025 +0900

    test: 변경된 프로덕션 코드에 테스트 성공하도록 수정

commit dca0b22d72d29978bc665ac0194982d1904bb39b
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:11:59 2025 +0900

    refactor: 함수 분리

commit 01fd74e94b7c12be72e13f5ff8daa461208ede41
Author: m6z1 <[email protected]>
Date:   Mon May 26 16:03:38 2025 +0900

    refactor: 상품 목록 뷰 수량 조절 컴포넌트 사용

commit 31531c70376089106aca19669d623c75212e3362
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:22:53 2025 +0900

    refactor: 불필요한 함수 제거

commit 6e28f6050542ccc04302c19cdac02c8bb59ffe98
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:18:17 2025 +0900

    feat: 상품 목록 값 서버 통신으로 호출

commit 42855097a4721063665b068c823ce32639837821
Author: m6z1 <[email protected]>
Date:   Mon May 26 15:17:41 2025 +0900

    chore: 패키지 이동

commit 78818df44b0758dc9c5e82cabce440403f304780
Author: m6z1 <[email protected]>
Date:   Mon May 26 14:57:46 2025 +0900

    build: 네트워크용 라이브러리 추가

commit caf311ff815614eb919d8cebcae31702122f7eee
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:51:22 2025 +0900

    chore: 패키지 분리

commit ae13808677f08f12f8cbb510aeef10af0354e05e
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:40:08 2025 +0900

    fix: 최근 본 상품 이전의 상품 개수 업데이트 안 되는 이슈 해결

commit f45a1c61953dd5883735ba1a56a92977ff20ed1b
Author: m6z1 <[email protected]>
Date:   Mon May 26 13:21:57 2025 +0900

    feat: 마지막으로 본 상품 페이지 뒤로가기 시 상품 목록 이동 구현

commit 5bf546fdf96a39ef84bfe6a64db5da86496aaa0f
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:27:51 2025 +0900

    fix: 마지막에 본 상품 클릭 시 마지막에 본 상품 ui 출력되는 이슈 해결

commit e8fd2f41bb2f2397fcb25a4378815852ff5b7182
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:04:52 2025 +0900

    feat: 마지막으로 본 상품일 경우 마지막으로 본 상품 ui 가시성 처리

commit 8c46f764a2567fadf19dd33cafee52497a4ec9a6
Author: m6z1 <[email protected]>
Date:   Mon May 26 04:03:08 2025 +0900

    feat: 상품 상세화면에서 마지막으로 본 상품 출력 로직 구현

commit b16d1ab30766be7ac144df73b7824837a69fcea7
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:47:49 2025 +0900

    refactor: string 리소스 추출

commit 66930ef84673dcd35a2e04e49f53c060d6a1052d
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:45:11 2025 +0900

    feat: 앱 재시작돼도 최근 본 상품 목록 유지

commit ba7864091b772e7ee917f3b0e4152c12c844ffba
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:07:33 2025 +0900

    refactor: RecyclerView 아이템 데코레이터 구현

commit 694ed96ee0250a214b1773d225731cde11e2c083
Author: m6z1 <[email protected]>
Date:   Mon May 26 03:02:10 2025 +0900

    feat: 최근 본 상품 로직 구현

commit 10b2c41995678e2cd75cca6c5bf179da198c2731
Author: m6z1 <[email protected]>
Date:   Mon May 26 01:39:17 2025 +0900

    chore: 불필요한 파일 제거

commit d83505db73294dbaba35f2501108bd217ace370e
Author: m6z1 <[email protected]>
Date:   Mon May 26 01:39:12 2025 +0900

    feat: 앱 재시작에도 상품 목록 장바구니 개수 유지

commit 28f983d287be72890bd3d2f99071ffb22b302cca
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:56 2025 +0900

    feat: 앱 재시작에도 장바구니 데이터 유지

commit f9212ff04a70429d6cd5bfe9fe4296e8f94fea6e
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:41 2025 +0900

    build: Room 라이브러리 버전 2.7.1 업데이트

commit 3884639a89d30be1804a6571705bb2782c4bcabf
Author: m6z1 <[email protected]>
Date:   Sun May 25 23:56:15 2025 +0900

    refactor: application class 생성

commit 534abd57fad0a7b502e4827aa31ba35648cab837
Author: m6z1 <[email protected]>
Date:   Sun May 25 19:02:09 2025 +0900

    docs: 기능 요구 사항 정리

commit fea92920ee32b6cf5e39bb5e31ab3fc22ed81726
Author: m6z1 <[email protected]>
Date:   Sun May 25 18:56:01 2025 +0900

    build: room 라이브러리 추가

commit 2d4262ce2b9a64af8433115c8c950051b66dec3c
Author: m6z1 <[email protected]>
Date:   Sun May 25 15:12:43 2025 +0900

    feat: 장바구니 화면에서 뒤로 갔을 때 상태 일치 로직 구현

commit 2c3f80de3ec329a009faf842b6eb436ac6d34c4c
Author: m6z1 <[email protected]>
Date:   Sun May 25 14:16:38 2025 +0900

    feat: 상품 상세 화면에서 뒤로 갔을 때 상태 일치 로직 구현

commit 57b84e929376b0f2dc80df52252a816ace74b2b4
Author: m6z1 <[email protected]>
Date:   Thu May 22 17:11:32 2025 +0900

    feat: 장바구니에 담은 수량 조절 로직 구현

commit 609dffb3ffbc68b3c5dd0f461369c8793fba60c2
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:58:09 2025 +0900

    feat: 장바구니 상품 제거 / 장바구니 수량 빼는 로직 분리

commit 6753a2cca3abc0fb406b5c1721f0e2f1827f0915
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:23:04 2025 +0900

    feat: 장바구니 화면 수량 별 가격 출력 구현

commit f402d7cd9223d0c08d6433c8e25089b7e5e20181
Author: m6z1 <[email protected]>
Date:   Thu May 22 16:22:45 2025 +0900

    refactor: 장바구니 상품 조회 반환 타입 수정

commit 4a0f8bb5ae5b3e600a2032e446f96e440248c60e
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:46:49 2025 +0900

    feat: 상품 상세 화면 수량만큼 선택한 총 가격 출력 구현

commit eeb7c0fb2991195183e81e750b079993a5dcae2a
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:40:18 2025 +0900

    feat: 상품 상세 화면 수량 조절 버튼 구현

commit a6cc3d7bee32fe9fbd1e17aff9d19b65133b8251
Author: m6z1 <[email protected]>
Date:   Thu May 22 15:40:08 2025 +0900

    feat: 상품 수량 공용 컴포넌트 Ui 구현

commit d4d75847633f6508b3246ef589c1088300fa2f11
Author: m6z1 <[email protected]>
Date:   Thu May 22 13:34:51 2025 +0900

    feat: 상품 목록 뷰 장바구니 로직 추가

    - 각 상품에서 + - 버튼을 통해 수량을 조절할 수 있다.
    - 장바구니에 담근 총 수량이 보인다.

commit 967db9894b60d73b7ba3513e87862d85abccab9f
Author: m6z1 <[email protected]>
Date:   Wed May 21 17:17:17 2025 +0900

    feat: 각 상품에 + 버튼 ui 구현

commit 90a01e7aeb3560e84c5237fbdaf0dd5464f1b7f6
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:41:47 2025 +0900

    refactor: 함수 네이밍 명시적으로 수정

commit 85b96fc36d86051debe34415217b798fe4a60f04
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:37:05 2025 +0900

    refactor: 중복되는 값 변수에 할당

    - ProductsViewModel에서 중복되는 라이브 데이터 값 할당 후 사용

commit 83f3c2baaa82e81d79343f8d24a4a13fd5435793
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:22:53 2025 +0900

    refactor: 상품 목록 아이템 추가 함수 네이밍 수정

commit 93c65d1e824bc4b8aa22cd8236a6bdff7cada002
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:21:09 2025 +0900

    chore: activity exported 속성 수정

commit 5834af9e3b78e5857db83d2b8b6be782278dc8f1
Author: m6z1 <[email protected]>
Date:   Wed May 21 13:18:21 2025 +0900

    refactor: 상품 목록 조회 호출 로직 수정

commit ad2e4ca0075a301fee2cea0a6d01f46020a4022e
Author: m6z1 <[email protected]>
Date:   Wed May 21 11:26:17 2025 +0900

    refactor: result 콜백 매개변수 네이밍 수정

commit a6fbdb0403a5cf770a713656f27c4681cf918724
Author: m6z1 <[email protected]>
Date:   Wed May 21 11:23:13 2025 +0900

    docs: 기능 요구 사항 정리

commit 519909ad15a249eea2d31c129b39a9bf8398fdb1
Author: Son Myeongji <[email protected]>
Date:   Tue May 20 20:13:07 2025 +0900

    [쇼핑 장바구니 1, 2단계] 뭉치 미션 제출합니다. (woowacourse#101)

    * docs: 기능 요구 사항 작성

    * build: 데이터 바인딩 추가

    * feat: Product 생성

    * feat: 상품 목록 화면에서 행당 2개의 상품을 출력

    * chore: 패키지 분리

    * build: Glide 라이브러리 추가

    * chore: 더미 데이터 수정

    * feat: ProductUrls 구현

    * build: kapt 추가

    * feat: BindingAdapter setImageUrl 구현

    * feat: 인터넷 권한 추가

    * feat: 이미지 바인딩 어댑터 사용

    * chore: BindingAdapter 패키지 이동

    * feat: 아이템 간 마진 조정

    * chore: 메뉴 아이콘들 추가

    * feat: 앱 테마 NoActionBar 수정

    * feat: 상품 목록 페이지 toolbar 구현

    * feat: color 리소스 이름 변경

    * feat: 장바구니 화면 구현

    * feat: 장바구니 버튼 클릭 이벤트 구현

    * feat: 뒤로 가기 버튼 클릭 이벤트 구현

    * feat: 상품 상세 화면 구현

    * chore: 패키지 이동

    * feat: Product 직렬화

    * feat: 상품 클릭 시 상품 상세로 이동

    * refactor: 에러 메시지 String 리소스 추출

    * feat: 상품 상세 화면 X 버튼 클릭 이벤트 구현

    * chore: 패키지 분리

    * feat: 장바구니 저장소 구현

    * feat: 장바구니 추가 기능 구현

    * feat: 상품 목록 저장소 구현

    * feat: 상품 목록 뷰모델 구현

    * feat: 장바구니 뷰모델 구현

    * feat: 장바구니 상품 삭제 구현

    * docs: 기능 요구 사항 작성

    * feat: 상품 목록 더보기 구현

    * refactor: 함수 이름 변경

    * feat: 장바구니 페이지네이션 뷰 구현

    * refactor: 팩토리 메서드 네이밍 수정

    * feat: 장바구니 페이지네이션 뷰홀더 추가

    * feat: 페이지네이션 구현

    * feat: 페이지에 5개씩 가져오도록 구현

    * feat: 장바구니 페이지네이션 구현

    * docs: 기능 요구 사항 체크리스트 업데이트

    * feat: 페이지네이션 아이템 가시성 처리

    * refactor: 상품 목록 뷰 멀티 뷰 타입으로 개선

    * test: ProductsViewModel 테스트 추가

    등록된 상품들을 가져올 수 있다

    * test: ShoppingCartViewModel 테스트 추가

    - 장바구니에 담은 상품들을 보여준다
    - 제거하고 싶은 상품을 장바구니에서 삭제할 수 있다
    - 장바구니의 다음 페이지 정보를 확인할 수 있다
    - 장바구니의 이전 페이지 정보를 확인할 수 있다

    * refactor: 매퍼 함수 위치 수정

    * refactor: 중복되는 layoutManager 설정 제거

    * refactor: 클릭 리스너 interface 네이밍 수정

    * refactor: 상품 상세 뷰 스크롤 되도록 수정

    * refactor: repository 비동기 콜백 구조로 수정

    * refactor: 불필요한 함수 호출 로직 개선

    * refactor: 사용하지 않는 데이터바인딩 변수 제거

    * refactor: 함수 분리

    * feat: 장바구니 마지막 페이지 데이터 없을 경우 이전 페이지로 이동하도록 수정

    * fix: 장바구니 무한 호출 이슈 해결

    * refactor: 더보기 버튼 가시성 로직 수정

    * refactor: 페이지네이션 여부 판단 책임 뷰모델로 이동

    * refactor: 무한스크롤 여부 판단 책임 뷰모델로 이동

    * refactor: Product 객체 생성자에 imageUrl 추가

    * chore: view/common 패키지 분리

    * refactor: 휘발성 이벤트 SingleLiveData 적용

    * refactor: 화면 회전 시 뷰모델 호출 횟수 개선

    * chore: 코드 포맷팅

    * refactor: 상품 목록 RecyclerView 데이터 수정 로직 개선

    * fix: 더보기 버튼 클릭 시 상품 목록 데이터 호출되지 않는 이슈 해결

    * build: corecore-testing 라이브러리 추가

    * test: 뷰모델 테스트 위한 확장함수 구현

    * test: ProductsViewModel 테스트 추가

    * test: TestFixture 매개변수의 값에 따라 생성될 수 있도록 수정

    * test: ShoppingCartViewModel 테스트 추가

    * test: ProductDetailViewModel 테스트 추가

    * test: ProductDetail UI 테스트 추가

    ---------

    Co-authored-by: Giovanni Junseo Kim <[email protected]>

commit e31149b
Author: woowahan-dino <[email protected]>
Date:   Mon Apr 7 14:31:36 2025 +0900

    build: upgrade to kotlin 2.1.0 and android gradle plugin 8.5.2

commit 281c081
Author: woowahan-pjs <[email protected]>
Date:   Fri Apr 12 12:00:25 2024 +0900

    build: upgrade to android gradle plugin 8.3.1 and add junit 5

commit 186fb7f
Author: woowahan-pjs <[email protected]>
Date:   Mon May 8 14:05:24 2023 +0900

    feat: set up the project

commit c0c96e0
Author: 박재성 <[email protected]>
Date:   Mon Apr 10 20:30:26 2023 +0900

    Initial commit
@Gyuil-Hwnag Gyuil-Hwnag self-requested a review June 5, 2025 11:40
Copy link
Member

@Gyuil-Hwnag Gyuil-Hwnag left a comment

Choose a reason for hiding this comment

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

지오 안녕하세요~
해당 미션 너무 고생 많으셨습니다!
리뷰 반영 정말 잘 해주셨네요💯
해당 미션은 다음 미션 진행을 위하여 머지하도록 하겠습니다.

이번 미션 Server 와의 연동등 많이 어려우셨을텐데, 너무 잘해주셨습니다👍
다음 미션인 Coroutine 등도 적용을 하다보면 많은 부분들에서 변경이 이루어지겠군요
마지막까지 화이팅입니다💪
도움이 될만한 코멘트 달았으니 확인하여 다음 미션에서 반영해주셔도 좋을 것 같습니다.

궁금한 점이나 논의하고 싶은 내용이 있으면 언제든 DM 주세요! 🙏

Comment on lines 19 to 20
class ProductsHttpClient(
private val baseUrl: String,
private val baseUrl: String = BuildConfig.BASE_URL,
Copy link
Member

Choose a reason for hiding this comment

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

이 부분들은 이전 미션에서 작업을 했던 흔적들인가 보군요~

Comment on lines +55 to +69
@Serializable
data class Pageable(
@SerialName("offset")
val offset: Long?,
@SerialName("pageNumber")
val pageNumber: Int?,
@SerialName("pageSize")
val pageSize: Int?,
@SerialName("paged")
val paged: Boolean?,
@SerialName("sort")
val sort: Sort?,
@SerialName("unpaged")
val unpaged: Boolean?,
)
Copy link
Member

Choose a reason for hiding this comment

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

Pageable Response에 포맷이 정해져 있다면 공통적으로 만들어서 사용을 해보는 방법도 있을 것 같다는 생각이 듭니다~💪

Comment on lines +81 to +89
val hasPrevious: Boolean = if (pageable?.pageNumber == null) false else pageable.pageNumber > 0

val hasNext: Boolean =
run {
val pageNumber = pageable?.pageNumber ?: return@run false
val totalPages = this.totalPages ?: return@run false

pageNumber + 1 < totalPages
}
Copy link
Member

Choose a reason for hiding this comment

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

이 부분은 과연 Reponse 에서 변환을 해줘야 하는건가? 라는 생각이 들 수도 있는데, 지오의 의견은 어떠신가요~?

Comment on lines +60 to +63
val response = cartService.postCartItem(CartRequest(productId, quantity)).execute()
val cartItemId: Long? =
response.headers()["Location"]?.substringAfter("/cart-items/", "")?.toLongOrNull()
return cartItemId
Copy link
Member

Choose a reason for hiding this comment

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

이 부분은 Header에서 추출을 하도록 하신 이유가 있을까요~?

Comment on lines +23 to +27
override fun pageableProducts(
page: Int,
size: Int,
): PageableProductData {
val response: ProductsResponse? = productService.getProducts(page, size).execute().body()
Copy link
Member

Choose a reason for hiding this comment

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

이 부분들은 보다보니, 저도 의문이 들었는데 코드레빗의 코멘트가 존재했었군요!
Call 형태로 반환을 하고 객체를 통해서 처리를 하는 방법이 있겠군요~
코드레빗 코멘트
Retrofit의 Call.enqueue()로 비동기 콜백 처리하기

Comment on lines +20 to +26
val response: ProductsResponse? = productService.getProducts(page, size).execute().body()

return PageableProductData(
products = response?.content?.mapNotNull { it.toEntityOrNull() } ?: emptyList(),
loadable = response?.loadable == true,
)
}
Copy link
Member

Choose a reason for hiding this comment

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

해당 내용의 핵심 포인트를 아래의 부분이라는 생각이 듭니다~

if (!response.isSuccessful) {
    val errorMsg = response.errorBody()?.string().orEmpty()
    throw RemoteDataException("상품 조회 실패: $errorMsg")
}
val body = response.body() ?: throw RemoteDataException("응답 본문이 비어있습니다.")

이를 통해서, 서버에러 or 네트워크 에러 or 데이터 에러인지에 대해서 판별이 가능하고 더 나아가서는 로그로 남겨둔다면 해당 API의 문제를 보다 더 잘 알아차릴 수도 있겠다는 생각이 들었어요

Comment on lines +66 to +70
binding.onOrder = {
val intent =
RecommendActivity.newIntent(this, viewModel.selectedCartItems.value ?: emptySet())
activityResultLauncher.launch(intent)
}
Copy link
Member

Choose a reason for hiding this comment

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

이 부분들은, 인터페이스 binding.button.setOnClickListenr 등으로 처리도 가능했을 것 같은데, 이와 같은 형태로 Function 형태로 구현을 하게 된 이유가 있을까요~?🤔
(틀린 방법은 아니지만, 처음에 보고 눈에 들어와서요!)

Comment on lines 55 to 58
fun submitList(items: List<CartItemType>) {
this.items = items
notifyDataSetChanged()
}
Copy link
Member

Choose a reason for hiding this comment

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

사실 단순하게는 id 등 유니크한 값이 없다면, == 으로 비교를 하는 방법도 있긴 합니다😅

@Gyuil-Hwnag Gyuil-Hwnag merged commit 6080933 into woowacourse:giovannijunseokim Jun 5, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants