Skip to content

feat: 8주차 미션_묵은지#57

Open
mookeunji05 wants to merge 22 commits into
mainfrom
mookeunji-8
Open

feat: 8주차 미션_묵은지#57
mookeunji05 wants to merge 22 commits into
mainfrom
mookeunji-8

Conversation

@mookeunji05
Copy link
Copy Markdown
Collaborator

@mookeunji05 mookeunji05 commented May 20, 2026

📌 PR 제목

🔗 관련 이슈

Closes #이슈번호

✨ 변경 사항

  • 기능1 추가
  • UI 수정
  • 버그 수정

🔍 테스트

  • 테스트 완료
  • 에러 없음

📸 스크린샷 (선택)

홈 화면 구매하기 화면 위시리스트 화면

🚨 추가 이슈

}

@Composable
fun MainScreen() {
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.

아직 스크린 분리가 안 되었네용

Copy link
Copy Markdown
Collaborator

@jeongkyueun jeongkyueun left a comment

Choose a reason for hiding this comment

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

LazyVerticalGrid로 마이그레이션 잘 하신 거 같습니다 !! 고생 많으셨어요!

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.

나이키앱에 아디다스 너무 재밌고 좋아요ㅎㅎ

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.

items() DSL과 key 지정, CartScreen에서 Events Flow Up 패턴을 적용하신 점 좋았습니다!

다만 이번 미션의 핵심인 Type-safe Navigation이 아직 적용되지 않았습니다! 현재 문자열로 화면을 전환하고 있는데, @serializable + data object + NavController 방식으로 바꿔주세요!
그리고 모든 화면이 MainActivity.kt 한 파일에 작성되어 있는데, 화면마다 파일을 분리해주시면 가독성과 유지보수성이 훨씬 좋아집니다!

LazyColumn + chunked + Row 조합도 LazyVerticalGrid로 바꿔주시면 더 간결하고 안전하게 구현할 수 있습니다!

위시리스트 상태도 ViewModel로 끌어올려서 관리해주시면 화면 재구성 시 상태가 유지됩니다!
수고하셨습니다!

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.

HomeScreen, StoreScreen, WishlistScreen, CartScreen이 모두 MainActivity.kt 한 파일에 작성되어 있습니다! 화면마다 파일을 분리해주시면 가독성과 유지보수성이 훨씬 좋아집니다! 예를 들어 ui/home/HomeScreen.kt, ui/store/StoreScreen.kt 처럼 패키지 구조도 함께 잡아주시면 더 좋습니다!

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.

현재 selectedTab 문자열로 화면을 전환하고 있는데, NavController + NavHost 기반의 Type-safe Navigation이 적용되지 않았습니다! @serializable + data object 방식으로 Route를 정의하고 composable<Route.Home> 형태로 바꿔주세요!

kotlin@Serializable sealed interface Route {
    @Serializable data object Home : Route
    @Serializable data object Store : Route
    ...
}
composable<Route.Home> { HomeScreen() }

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.

StoreScreen과 WishlistScreen에서 chunked() + LazyColumn + Row 조합으로 2열 그리드를 구현하셨는데, LazyVerticalGrid를 사용하시면 훨씬 간결하게 구현할 수 있고 key도 아이템별로 안정적으로 잡을 수 있습니다!

kotlinLazyVerticalGrid(
    columns = GridCells.Fixed(2)
) {
    items(
        items = products,
        key = { it.id }
    ) { product ->
        StoreProductItem(product = product)
    }
}

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.

wishlistedIds를 MainScreen 내부 remember로 관리하고 계신데, 화면이 재구성되면 상태가 초기화될 수 있습니다! ViewModel로 끌어올려서 관리하시는 걸 추천드립니다!

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.

5 participants