-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 리뷰 v2 전체 구현 #384
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
[Feat] 리뷰 v2 전체 구현 #384
Changes from 89 commits
Commits
Show all changes
104 commits
Select commit
Hold shift + click to select a range
eeaea72
add: 리뷰 v2를 위한 compose 파일 세팅
HI-JIN2 5066e6e
chore: rename "ReviewWritexxx"
HI-JIN2 d069e82
feat: 리뷰 v2 ui 구현 중
HI-JIN2 9c6f019
feat: data 연결
HI-JIN2 499ea91
chore: refactoring
HI-JIN2 3a7cdf8
feat: button 구현
HI-JIN2 1414222
chore: ratingbar 사이즈 조정
HI-JIN2 de3327c
chore: lazy column의 item 디자인 컴포넌트로 분리
HI-JIN2 4ab4ffd
chore: 디자인 시스템 변경 반영
HI-JIN2 5c2fa77
chore: add v2
HI-JIN2 3290846
fix: dto 및 Model 수정
HI-JIN2 8e32b2f
feat: 리뷰 작성 compose ui
HI-JIN2 6755b16
feat: 좋아요 버튼 분리
HI-JIN2 3327ed0
feat: 리뷰 리스트 화면 실제 api로 연결
HI-JIN2 77ac6fe
feat: isEmpty flag 제거
HI-JIN2 d459897
feat: ui모델 중 하나만 값이 들어가고, 하나는 null인 문제를 update로 해결
HI-JIN2 0a9d62d
refactor: Meal/menu를 뷰모델이 아닌 usecase에서 분기처리하도록 수정
HI-JIN2 91c5ff2
feat: 리뷰 작성하러 가기 버튼 클릭시 네비게이션
HI-JIN2 e96c8f7
feat: 메뉴명/Id 묶어서 네비게이션 인자로 보냄
HI-JIN2 126f832
feat: 메뉴명/Id 묶어서 네비게이션 인자로 보냄
HI-JIN2 1ef9859
feat: write에서 meal일시 메뉴리스트 조회하도록 수정
HI-JIN2 35c3eb4
feat: write에서 menu도 받을 수 있게 수정
HI-JIN2 e8834ef
feat: data 레이어에서 meal/menu 분기 처리
HI-JIN2 fd83ecb
feat: menu Pair<Long, String>로 변경
HI-JIN2 bab8e72
fix: 좋아요 버튼에 메뉴 번호 잘못들어가는 문제 수정
HI-JIN2 887a174
fix: 리뷰 쓰고 뒤로가기
HI-JIN2 f8d3a5e
fix: 갤러리
HI-JIN2 63d7b27
feat: 사진 포함 작성 가능
HI-JIN2 1e3b91f
feat: 사진이 포함된 리뷰 보여주기
HI-JIN2 3fb5f1d
feat: 좋아하는 메뉴 태그 반영
HI-JIN2 c598aee
feat: 버튼 하단 고정
HI-JIN2 0f4e389
fix: progress bar 미동작 수정
HI-JIN2 f57c944
chore: package
HI-JIN2 cba45c1
chore: top bar 반영
HI-JIN2 6c0ec83
feat: 바텀시트 연결
HI-JIN2 a2c745e
chore: 리베이스 실수
HI-JIN2 0df89bc
chore: 리베이스 실수2
HI-JIN2 46f48df
chore: reimport
HI-JIN2 8c56de2
chore: 리베이스 실수 Manifest
HI-JIN2 7e8a5d0
add: LikeButtonPreview
HI-JIN2 b9a31f4
chore: UI 디테일 반영
HI-JIN2 bab0806
feat: EatSsuButton에 disable 상태 추가
HI-JIN2 4724d2e
chore: code prettier
HI-JIN2 87cebff
fix: 리스트의 size로 구분
HI-JIN2 05f8181
refactor: 리뷰 수정/삭제/내리뷰에 대해서 flow<base<dto>>가 아닌 suspend domain을 반환하도록 수정
HI-JIN2 1f7aa68
refactor: bottom sheet를 재정의하도록 수정
HI-JIN2 3bbfb4f
feat: 내 리뷰 v2
HI-JIN2 8e5a0ce
feat: chip 좋아요 유무 반영
HI-JIN2 b1774d5
feat: 리뷰 삭제까지 연결
HI-JIN2 7f584df
feat: 내리뷰 삭제까지 연결
HI-JIN2 f440db8
feat: 삭제 후 리스트를 갱신하기 위해서 api 재호출
HI-JIN2 7d501af
feat: 리뷰 수정
HI-JIN2 c0f31c0
feat: 리뷰 수정 중
HI-JIN2 09dd63d
feat: 리뷰 작성할 수 있는 메뉴들 조회하는 API
HI-JIN2 6f9b4f5
feat: getValidMenuForReview API 수정에 따른 변경
HI-JIN2 1084cb6
feat: 둘러보기가 없으므로 @NoToken 제거
HI-JIN2 d652c9a
feat: < 뒤로가기 연결
HI-JIN2 3ccdfee
chore: gray100 spacer 디테일
HI-JIN2 6d8b846
chore: Loading일 때 메뉴명 보이게
HI-JIN2 9012daf
fix: 식단표 -> 리뷰 이동시에 두번 클릭되는거 막음
HI-JIN2 077a71d
fix: 리뷰 작성 최소조건 (별점)
HI-JIN2 8f6a345
chore: prettier
HI-JIN2 662eaf1
fix: menulist dto 변경으로 인한 수정
HI-JIN2 a57bc13
fix: myreview user->review로 엔드포인트 변경
HI-JIN2 8bb922c
fix: myreview user->review로 엔드포인트 변경2
HI-JIN2 37b8deb
fix: 리스트에서 받아온 name명 그대로 유지
HI-JIN2 71ea209
fix: 프로그래스 바 너비 고정
HI-JIN2 b63fd2f
fix: 프로그래스 바 굵기 수정 5dp
HI-JIN2 d45f47b
fix: uistate 나눔
HI-JIN2 a6f14ec
feat: 리뷰 수정하기 구현
HI-JIN2 d483227
feat: 내리뷰 -> 리뷰 수정하기 구현
HI-JIN2 d542e72
chore: 10.1 dto 전사 수정
HI-JIN2 31b3cb6
chore: import 실수
HI-JIN2 7e5a271
chore: 10.1 dto 전사 수정
HI-JIN2 bb729f1
refactor: 완료시 back 처리 고도화
HI-JIN2 ecbb349
delete: 이젠 안쓰는 xml 파일 삭제
HI-JIN2 b40a182
feat: 별점에 대한 프로그래스 바 디테일 작업
HI-JIN2 7278968
feat: DelayedLoadingIndicator 컴포넌트 화
HI-JIN2 4d69dc0
chore: core:common 모듈로 reimport
HI-JIN2 4b5f3f8
chore: WriteMealReviewRequest 현재 dto에 맞춰 임시 수정
HI-JIN2 56c61c8
chore: 신고하기로 text 수정
HI-JIN2 e4550bc
chore: null 여부 수정
HI-JIN2 512febe
chore: 더보기 버튼 수정
HI-JIN2 78c4a2c
chore: 프로그래스바 주석
HI-JIN2 50072a9
chore: 주석
HI-JIN2 91b1688
feat: 내리뷰에 닉네임 넣기
HI-JIN2 7a033e3
fix: label -> placeholder로 수정해서 floating 되지 않게 함
HI-JIN2 dd39050
fix: 하나라도 값이 바뀌어야 수정 버튼이 활성화
HI-JIN2 dd8cc0d
chore: gemini code review
HI-JIN2 961f894
chore: API DTO 수정 반영
HI-JIN2 077530f
chore: 유리님 코드리뷰
HI-JIN2 dee1a91
chore: change var to val
HI-JIN2 8297128
chore: Pair<id,name> -> MenuMini
HI-JIN2 ccbc209
chore: 유리님 리뷰 반영2
HI-JIN2 83fe0be
fix: LazyColumn key 에러
HI-JIN2 53d713d
fix: 사진 압축 추가
HI-JIN2 e521118
chore: 리뷰 삭제 이후, 같은 코루틴 안에서 suspend로 연속 실행으로 수정
HI-JIN2 b12e317
chore: 안쓰는 data class 제거
HI-JIN2 c90e8a0
Merge branch 'develop' into feat/review-v2-ui
HI-JIN2 566fdeb
chore: rebase 안되서 merge 방식으로 conflict 해결
HI-JIN2 c2d3cd8
chore: 매의 눈으로 코드 다듬기
HI-JIN2 673b5fd
chore: domain 계층에서 data 안쓰도록 수정
HI-JIN2 5379896
chore: WriteReviewData 모델 제거
HI-JIN2 8723837
merge develop
HI-JIN2 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
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
17 changes: 17 additions & 0 deletions
17
app/src/main/java/com/eatssu/android/data/dto/request/WriteMealReviewRequest.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,17 @@ | ||
| package com.eatssu.android.data.dto.request | ||
|
|
||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
|
|
||
| data class WriteMealReviewRequest( | ||
| @SerializedName("mealId") var mealId: Long, | ||
| @SerializedName("rating") var rating: Int, | ||
| @SerializedName("menuLikes") var menuLikes: List<MenuLikes>? = arrayListOf(), | ||
| @SerializedName("content") var content: String? = null, | ||
| @SerializedName("imageUrls") var imageUrls: ArrayList<String>? = arrayListOf() | ||
| ) { | ||
| data class MenuLikes( | ||
| @SerializedName("menuId") var menuId: Long? = null, | ||
| @SerializedName("isLike") var isLike: Boolean? = null | ||
| ) | ||
| } |
32 changes: 32 additions & 0 deletions
32
app/src/main/java/com/eatssu/android/data/dto/request/WriteMenuReviewRequest.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,32 @@ | ||
| package com.eatssu.android.data.dto.request | ||
|
|
||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| data class WriteMenuReviewRequest( | ||
| @SerializedName("menuId") var menuId: Long? = null, | ||
| @SerializedName("mainRating") var mainRating: Int? = null, | ||
| @SerializedName("amountRating") var amountRating: Int? = null, | ||
| @SerializedName("tasteRating") var tasteRating: Int? = null, | ||
| @SerializedName("content") var content: String? = null, | ||
| @SerializedName("imageUrl") var imageUrl: String? = null, | ||
| @SerializedName("menuLike") var menuLike: MenuLike? = MenuLike() | ||
| ) { | ||
| data class MenuLike( | ||
| @SerializedName("menuId") var menuId: Long? = null, | ||
| @SerializedName("isLike") var isLike: Boolean? = null | ||
| ) | ||
| } | ||
|
|
||
| //todo api 수정되면 다시 살리기 (추석이후 api 수정 예정) | ||
| //data class WriteMenuReviewRequest( | ||
| // @SerializedName("rating") var rating: Int? = null, | ||
| // @SerializedName("menuLikes") var menuLikes: List<MenuLikes> = arrayListOf(), | ||
| // @SerializedName("content") var content: String? = null, | ||
| // @SerializedName("imageUrls") var imageUrls: List<String> = arrayListOf() | ||
| // | ||
| //) { | ||
| // data class MenuLikes( | ||
| // @SerializedName("menuId") var menuId: Long? = null, | ||
| // @SerializedName("isLike") var isLike: Boolean? = null | ||
| // ) | ||
| //} |
13 changes: 0 additions & 13 deletions
13
app/src/main/java/com/eatssu/android/data/dto/request/WriteReviewRequest.kt
This file was deleted.
Oops, something went wrong.
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
51 changes: 51 additions & 0 deletions
51
app/src/main/java/com/eatssu/android/data/dto/response/MealReviewListResponse.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,51 @@ | ||
| package com.eatssu.android.data.dto.response | ||
|
|
||
| import com.eatssu.android.domain.model.Review | ||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| data class MealReviewListResponse( | ||
| @SerializedName("numberOfElements") var numberOfElements: Int? = null, | ||
| @SerializedName("hasNext") var hasNext: Boolean? = null, | ||
| @SerializedName("dataList") var dataList: ArrayList<DataList> = arrayListOf() | ||
| ) { | ||
| data class DataList( | ||
| @SerializedName("reviewId") var reviewId: Long? = null, | ||
| @SerializedName("menuList") var menuList: ArrayList<MenuList> = arrayListOf(), | ||
| @SerializedName("writerId") var writerId: Long? = null, | ||
| @SerializedName("isWriter") var isWriter: Boolean? = null, | ||
| @SerializedName("writerNickname") var writerNickname: String? = null, | ||
| @SerializedName("rating") var rating: Int? = null, | ||
| @SerializedName("writtenAt") var writtenAt: String? = null, | ||
| @SerializedName("content") var content: String? = null, | ||
| @SerializedName("imageUrls") var imageUrls: ArrayList<String> = arrayListOf(), | ||
| ) { | ||
| data class MenuList( | ||
| @SerializedName("id") var id: Long? = null, | ||
| @SerializedName("name") var name: String? = null, | ||
| @SerializedName("isLike") var isLike: Boolean? = null, | ||
| ) | ||
| } | ||
| } | ||
|
|
||
|
|
||
| fun MealReviewListResponse?.toDomain(): List<Review> { | ||
| // MealReviewListResponse 객체 자체가 null이면 emptyList() 반환 | ||
| return this?.dataList?.map { data -> | ||
| Review( | ||
| reviewId = data.reviewId ?: -1L, | ||
| isWriter = data.isWriter ?: false, | ||
| menuList = data.menuList.map { menu -> | ||
| Review.Menu( | ||
| menuId = menu.id ?: -1L, | ||
| name = menu.name ?: "", | ||
| isLike = menu.isLike ?: false | ||
| ) | ||
| }, | ||
| writerNickname = data.writerNickname ?: "유저", | ||
|
||
| rating = data.rating ?: 0, | ||
| writeDate = data.writtenAt ?: "", | ||
| content = data.content ?: "", | ||
| imgUrl = data.imageUrls.firstOrNull(), | ||
| ) | ||
| } ?: emptyList() | ||
| } | ||
24 changes: 9 additions & 15 deletions
24
app/src/main/java/com/eatssu/android/data/dto/response/MenuOfMealResponse.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 |
|---|---|---|
| @@ -1,26 +1,20 @@ | ||
| package com.eatssu.android.data.dto.response | ||
|
|
||
| import com.eatssu.android.domain.model.MenuMini | ||
| import com.google.gson.annotations.SerializedName | ||
|
|
||
| data class MenuOfMealResponse( | ||
| @SerializedName("briefMenus") var briefMenus: ArrayList<MenusInformation> = arrayListOf(), | ||
| @SerializedName("menuList") var menuList: ArrayList<MenuList> = arrayListOf() | ||
| ) | ||
|
|
||
| data class MenusInformation( | ||
| data class MenuList( | ||
|
|
||
| @SerializedName("menuId") var menuId: Long, | ||
| @SerializedName("name") var name: String, | ||
| @SerializedName("menuId") var menuId: Long? = null, | ||
| @SerializedName("name") var name: String? = null | ||
|
|
||
| ) | ||
|
|
||
| fun MenuOfMealResponse.toMenuMiniList(): List<MenuMini> { | ||
| return briefMenus.map { it.toMenuMini() } | ||
| } | ||
| ) | ||
|
|
||
| fun MenusInformation.toMenuMini(): MenuMini { | ||
| return MenuMini( | ||
| id = this.menuId, | ||
| name = this.name | ||
| ) | ||
| fun MenuOfMealResponse.toDomain(): List<Pair<Long, String>> { | ||
| return menuList.map { | ||
| (it.menuId ?: -1L) to (it.name ?: "") | ||
| } | ||
| } |
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.
DTO(Data Transfer Object)의 속성은
var대신val로 선언하여 불변(immutable)으로 만드는 것이 좋습니다. 데이터 클래스는 일반적으로 상태를 가지지 않는 데이터 컨테이너로 사용되므로, 불변성을 유지하면 코드의 안정성과 예측 가능성을 높일 수 있습니다. 이 패턴은 다른 DTO 파일들(WriteMealReviewRequest.kt,WriteMenuReviewRequest.kt등)에도 동일하게 적용하는 것을 권장합니다.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.
다른 request 확인해보니까 review 작성 관련 request만 var로 선언되어있는데 이유가 있을까요?
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.
그리고 다른 request는 default값이 없는데 리뷰 작성 request들만 default값이 있는 이유도 궁금합니다!
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.
오 생각해보니까 request면 디폴트값이나 nullable을 규제하는게 맞겠네여 수정해올게요..!
제가 별 생각 없이 작업한 것 같아요🥹