-
Notifications
You must be signed in to change notification settings - Fork 0
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
soochan8
wants to merge
20
commits into
develop
Choose a base branch
from
feature/feature#44_search
base: develop
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
Changes from all commits
Commits
Show all changes
20 commits
Select commit
Hold shift + click to select a range
ac9dfc0
feat: 문자열 리소스 추가
soochan8 7e12c34
feat: 초기 필터 더미데이터 생성 및 클릭 시 상태 변경 추가
soochan8 232131e
feat: 최근 검색어 click 추가
soochan8 621cb16
feat: 검색어 입력 후, 포커스 해제
soochan8 2d39afc
feat: 필터(오늘드림, 픽업) enum class 생성
soochan8 fddf615
change: 클래스 네이밍 변경
soochan8 cbaa9d8
remove 필터 data class 제거
soochan8 dce7acf
feat: 필터 관련 이벤트 추가
soochan8 7a1a07e
feat: 구조변경 및 AnimatedVisibility 적용
soochan8 78a083c
feat: 검색 후 보여지는 화면 추가
soochan8 dda15d9
feat: 필터 composable 추가
soochan8 e05d79f
feat: productDao 필터 카테고리 가져오는 메소드 추가
soochan8 3ae2c1a
feat: 필터 카테고리 DTO 추가
soochan8 92a2be7
feat: 필터 카테고리 Mapper, VO, Model 생성
soochan8 d98e56b
remove: import 제거
soochan8 5a2412a
feat:문자열 리소스 추가
soochan8 d203cf3
feat: 필터 카테고리, 카테고리 적용된 상품, 카테고리 적용된 상품 개수 메소드 추가
soochan8 6b1a4d1
feat: 카테고리 필터 상태 및 이벤트 처리 로직 추가
soochan8 3e9ce08
feat: SearchContract 카테고리 필터 상태 및 이벤트 추가
soochan8 8950acd
feat: SearchViewModel 카테고리 필터링 로직 추가
soochan8 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
core/database/src/main/java/com/chan/database/dto/FilterCategoriesDto.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.chan.database.dto | ||
|
||
data class FilterCategoriesDto( | ||
val categoryId: String, | ||
val name: String, | ||
val subCategories: List<SubCategoryDto> | ||
) { | ||
data class SubCategoryDto( | ||
val subCategoryId: String, | ||
val subCategoryName: String, | ||
) | ||
} |
18 changes: 18 additions & 0 deletions
18
feature/search/src/main/java/com/chan/search/data/mappers/CategoryFilterMapper.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
package com.chan.search.data.mappers | ||
|
||
import com.chan.database.dto.FilterCategoriesDto | ||
import com.chan.search.domain.model.FilterCategoriesVO | ||
import com.chan.search.domain.model.SubCategoryVO | ||
|
||
fun FilterCategoriesDto.toCategoryFilterDomain(): FilterCategoriesVO = | ||
FilterCategoriesVO( | ||
categoryId = this.categoryId, | ||
name = this.name, | ||
subCategories = this.subCategories.map { | ||
SubCategoryVO( | ||
subCategoryId = it.subCategoryId, | ||
subCategoryName = it.subCategoryName | ||
) | ||
} | ||
) | ||
|
3 changes: 2 additions & 1 deletion
3
feature/search/src/main/java/com/chan/search/data/mappers/SearchToDomainMapper.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
12 changes: 12 additions & 0 deletions
12
feature/search/src/main/java/com/chan/search/domain/model/FilterCategoriesVO.kt
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
package com.chan.search.domain.model | ||
|
||
data class FilterCategoriesVO( | ||
val categoryId: String, | ||
val name: String, | ||
val subCategories: List<SubCategoryVO> | ||
) | ||
|
||
data class SubCategoryVO( | ||
val subCategoryId: String, | ||
val subCategoryName: String, | ||
) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ProductDao 전반적으로 getAll() 를 사용해서 쿼리하고 있는데요. DB 쿼리에 파라메터로 넣지 않는 이유가 있으신가요?
There was a problem hiding this comment.
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번만 조회한 후 여러 모듈에서 재사용 하는 것이 성능면에서 최적화 될 것이라고 생각됩니다.
이렇게 진행하는 것이 괜찮은 방법일까요?