-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 리뷰 v2 오류 수정 #424
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
[Feat] 리뷰 v2 오류 수정 #424
Conversation
Summary of ChangesHello @HI-JIN2, I'm Gemini Code Assist1! I'm currently reviewing this pull request and will post my feedback shortly. In the meantime, here's a summary to help you and other reviewers quickly get up to speed! 이 PR은 사용자 경험을 개선하고 기존의 오류를 수정하여 리뷰 관련 기능의 안정성을 높이는 데 중점을 둡니다. 특히, 리뷰 평점 표시의 정확성을 높이고, 리뷰가 없는 경우의 UI를 개선하며, 메뉴 리뷰 수정 시 발생하던 중요한 버그를 해결했습니다. Highlights
Using Gemini Code AssistThe full guide for Gemini Code Assist can be found on our documentation page, here are some quick tips. Invoking Gemini You can request assistance from Gemini at any point by creating a comment using either
Customization To customize Gemini Code Assist for GitHub experience, repository maintainers can create a configuration file and/or provide a custom code review style guide (such as PEP-8 for Python) by creating and adding files to a Limitations & Feedback Gemini Code Assist may make mistakes. Please leave feedback on any instances where its feedback is incorrect or counter productive. You can react with 👍 and 👎 on @gemini-code-assist comments. If you're interested in giving your feedback about your experience with Gemini Code Assist for Github and other Google products, sign up here. You can also get AI-powered code generation, chat, as well as code reviews directly in the IDE at no cost with the Gemini Code Assist IDE Extension. Footnotes
|
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.
Code Review
안녕하세요. 리뷰 v2의 오류 수정 및 개선 사항에 대한 풀 리퀘스트를 검토했습니다. 전반적으로 변경 사항들이 명확한 목적을 가지고 잘 구현되었습니다. 특히 리뷰가 없을 때의 배경색 처리, 리뷰 요약 평점 반올림, 그리고 리뷰 수정 시 발생하던 ArrayList 관련 오류 수정 등 설명해주신 내용들이 코드에 잘 반영된 것을 확인했습니다. 한 가지 코드 중복과 관련하여 가독성 및 유지보수성을 높일 수 있는 제안을 리뷰 댓글로 남겼으니 확인 부탁드립니다. 로깅 관련 작업은 별도 PR로 분리하신 것도 좋은 결정이라고 생각합니다. 수고하셨습니다!
| fun MealReviewInfoResponse.toDomain() = ReviewInfo( | ||
| reviewCnt = totalReviewCount ?: 0, | ||
| rating = rating ?: 0.0, | ||
| rating = (round((rating ?: 0.0) * 10) / 10), |
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.
평점을 소수점 첫째 자리까지 반올림하는 로직이 MenuReviewInfoResponse.kt 파일에서도 동일하게 사용되고 있습니다. 코드 중복을 줄이고 가독성을 높이기 위해, 이 로직을 별도의 유틸리티 함수로 추출하여 사용하는 것을 고려해보시는 것이 좋겠습니다.
또한, 현재 구현 방식 대신 String.format을 사용하여 반올림을 처리하면 의도를 더 명확하게 표현할 수 있습니다. 아래 제안된 코드는 내부적으로 RoundingMode.HALF_UP을 사용하여 반올림을 수행하며, 코드를 더 직관적으로 만들어줍니다.
| rating = (round((rating ?: 0.0) * 10) / 10), | |
| rating = String.format("%.1f", rating ?: 0.0).toDouble(), |
kangyuri1114
left a comment
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.
👍
Summary
피그마 놓친 부분이나 에러 발견 사항을 수정합니다
Describe your changes
To reviewers
로깅도 같이 올리려다가 따로 올리는걸로 할게유