Skip to content

feature#44 search 검색 후 화면 개발 #46

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

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

Conversation

soochan8
Copy link
Collaborator

@soochan8 soochan8 commented Aug 18, 2025

🔖 요약

  1. 검색 후 보여지는 화면 개발
  2. 책임 분리 (SearchResultScreen, SearchResultScreenContent)
  3. 필터 composable 개발 (SearchFilterScreen)
  4. 필터 상태 및 이벤트 추가

🛠 작업 내용

  1. 검색어 입력 후, 검색 결과 보여지는 화면 개발
  • 공통 ProductModel 사용하여 리스트 노출
  1. 필터 composable 개발
  • AnimatedVisibility 사용하여 필터 컴포넌트 visibility 처리
  1. 카테고리 필터 이벤트 추가

❗️ 참고 사항

  • 필터 적용 시, 리스트 업데이트 예정 (필터 데이터 구조 구상 중)
  • 리스트 표현 방법 1단/2단 구분 예정

@soochan8 soochan8 requested a review from f-lab-pepe August 18, 2025 07:31
@soochan8 soochan8 self-assigned this Aug 18, 2025
- 중복 category name 기준으로 distinct 처리
- handleFilterClear() : 필터 초기화 및 검색 결과 재조회
- handleSubCategoryClick() : 서브카테고리 클릭 시 조회
- updateFilterProductCount() : 필터링된 상품 개수 계산
- updateFilteredProductList() : 필터링된 상품 리스트
- handleCategoryHeaderClick() : 상위 카테고리 클릭 이벤트
- initializeCategoryFilters() : 상위 카테고리 목록
@soochan8 soochan8 added the feat 새로운 기능 추가 label Aug 19, 2025
if (subCategoryNames.isEmpty()) {
return emptyList() // 선택된 필터가 없으면 빈 리스트 반환
}
return getAll()
Copy link

Choose a reason for hiding this comment

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

ProductDao 전반적으로 getAll() 를 사용해서 쿼리하고 있는데요. DB 쿼리에 파라메터로 넣지 않는 이유가 있으신가요?

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@f-lab-pepe @jaeho
단순하고 빠르게 기능을 구현하기 위해서 사용했던 것 같습니다. 멘토님의 코멘트를 생각해보다가 getAll()을 계속 사용하면 중복으로 조회가 발생하므로 불필요한 비용이 발생하는 것 같습니다. 현재 구조에서는 고정된 상품 리스트를 사용하고 있으므로 core모듈에서 공통으로 1번만 조회한 후 여러 모듈에서 재사용 하는 것이 성능면에서 최적화 될 것이라고 생각됩니다.
이렇게 진행하는 것이 괜찮은 방법일까요?


@Composable
fun SearchResultScreen(
viewModel: SearchViewModel = hiltViewModel(),
Copy link

Choose a reason for hiding this comment

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

hiltViewModel() 이건 불필요해보여요

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

@jaeho @f-lab-pepe
넵 해당 부분은 #48 리팩토링 하는 과정에서 제거 완료하였습니다!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feat 새로운 기능 추가
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants