Skip to content

feat: 4주차 미션_레몬#34

Open
Lemon0610 wants to merge 5 commits intomainfrom
lemon-4
Open

feat: 4주차 미션_레몬#34
Lemon0610 wants to merge 5 commits intomainfrom
lemon-4

Conversation

@Lemon0610
Copy link
Copy Markdown
Collaborator

@Lemon0610 Lemon0610 commented Apr 8, 2026

📌 PR 제목

🔗 관련 이슈

Closes #33

✨ 변경 사항

  • DataStore로 더미 데이터 대체
  • 위시리스트 구현
  • 구매하기 페이지에 Tab기능 추가

🔍 테스트

  • 테스트 완료
  • 에러 없음

📸 스크린샷 (선택)

찜 버튼 추가 찜 버튼 작동 새로운 탭
화면 캡처 2026-04-08 182134 화면 캡처 2026-04-08 182202 화면 캡처 2026-04-08 182148

🚨 추가 이슈

Copy link
Copy Markdown
Collaborator

@sua710 sua710 left a comment

Choose a reason for hiding this comment

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

미션에서 요구하는 대로 잘 구현하신 것 같아요! 대단해요!!

Comment on lines +1 to +5
<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/holo_red_dark" android:state_selected="true" />
<item android:color="@android:color/black" />
</selector> No newline at end of file
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

tint로 하트 색 채운 것 좋은 방법 같습니다!

<?xml version="1.0" encoding="utf-8"?>
<selector xmlns:android="http://schemas.android.com/apk/res/android">
<item android:color="@android:color/holo_red_dark" android:state_selected="true" />
<item android:color="@android:color/black" />
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

색 이쁘요....

android:id="@+id/txtDesc"
android:layout_width="wrap_content"
android:layout_height="wrap_content"
android:text="상품 설명"
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

android:text 항목들 strings에 옮기면 유지보수에 좋을 거 같아요 ! 과제 수행하시느라 수고 많으셨습니다~!!

Copy link
Copy Markdown
Collaborator

@kimdoyeon1234 kimdoyeon1234 left a comment

Choose a reason for hiding this comment

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

이번 주차 과제 수행하시느라 정말 고생 많으셨습니다!

Navigation Component와 DataStore를 활용해 데이터의 영속성과 화면 흐름을 현대적인 방식으로 구현하신 점이 매우 인상적입니다!

다만, include 레이아웃 구조의 단순화나 WindowInsets를 통한 시스템 바 대응, 그리고 Flow 수집 시 리소스 최적화(repeatOnLifecycle) 등을 조금 더 보완하신다면 더욱 견고하고 완성도 높은 앱이 될 것 같습니다

짧은 시간 안에 많은 기능을 안정적으로 녹여내시느라 수고 많으셨습니다!

Comment on lines +31 to +38
private fun loadProducts() {
viewLifecycleOwner.lifecycleScope.launch {
val allProducts = ProductRepository.getProductsOnce(requireContext())

(binding.recyclerGrid.adapter as ProductAdapter).submitList(allProducts)
}
}

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

현재 getProductsOnce를 사용하여 데이터를 일회성으로 로드하고 있습니다. ProductRepository에 구현된 getProductsFlow()를 사용하고, collect를 통해 데이터를 관찰하도록 수정하면, 위시리스트 상태가 변경될 때마다 수동으로 리스트를 다시 불러올 필요 없이 화면이 실시간으로 업데이트되어 사용자 경험이 훨씬 좋아질 것 같아요!

Comment on lines +30 to +32
btnWish.setImageResource(
if (item.isWished) R.drawable.ic_wish_heart else R.drawable.ic_wish_heart
)
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

btnWish 이미지 설정 로직에서 if (item.isWished) 조건문 결과가 모두 동일한 리소스로 설정되어 있습니다. 찜 상태에 따라 빈 하트와 채워진 하트가 구분되도록 리소스를 수정해야 의도한 대로 작동할 것 같습니다!

Comment on lines +22 to 30
<include
android:id="@+id/bottomBarInclude"
layout="@layout/bottom_navigation_view"
android:layout_width="match_parent"
android:layout_height="wrap_content"
android:background="@android:color/white"
app:itemIconTint="@android:color/black"
app:itemTextColor="@android:color/black"
app:labelVisibilityMode="labeled"
app:layout_constraintBottom_toBottomOf="parent"
app:layout_constraintEnd_toEndOf="parent"
app:layout_constraintStart_toStartOf="parent"
app:menu="@menu/bottom_nav_menu" />
app:layout_constraintEnd_toEndOf="parent" />

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

현재 하단 바를 include로 분리하셨는데, 사실 BottomNavigationView는 MainActivity 외에 재사용되는 경우가 드물어 실전에서는 MainActivity.xml에 직접 선언하는 경우가 더 많습니다. 지금 구조는 파일을 두 번 확인해야 하는 번거로움이 있고, ConstraintLayout 환경에서 불필요한 속성->alignParentBottom까지 섞여 있어 구조가 다소 복잡해 보입니다. 코드 응집도를 높이기 위해 include를 제거하고 메인 레이아웃에 통합하는 방향으로 리팩토링해보는 건 어떨까요!

Comment on lines +16 to +20

override fun onCreate(savedInstanceState: Bundle?) {
super.onCreate(savedInstanceState)
enableEdgeToEdge()

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

상단에 enableEdgeToEdge()를 선언하셨는데, 이는 전체 화면을 시스템 바 영역까지 확장하겠다는 의미입니다. 하지만 바로 아래에서 다시 수동으로 패딩을 계산하고 있어 로직이 중복되거나 의도치 않은 여백이 생길 수 있습니다. 하나로 통일하는 것이 구조적으로 깔끔합니다

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.

[Feat] 4주차 미션_레몬

5 participants