-
Notifications
You must be signed in to change notification settings - Fork 0
BUG FIX Content #80
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
base: dev
Are you sure you want to change the base?
BUG FIX Content #80
Conversation
Kimyonhae
commented
Jan 12, 2026
- 웨이트 트레이닝 이미지 버그
- 몸무게 타입 변경 및 모델링 타입 변경
Summary of ChangesHello @Kimyonhae, 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은 웨이트 트레이닝 이미지 관련 버그를 해결하고, 애플리케이션 전반에 걸쳐 몸무게 데이터 타입을 정수에서 소수점(Double)으로 변경하여 더 정확한 몸무게 기록 및 표시를 가능하게 합니다. 이는 데이터 모델, DTO, 그리고 UI 컴포넌트에 걸쳐 일관된 타입 변경을 포함합니다. Highlights
🧠 New Feature in Public Preview: You can now enable Memory to help Gemini Code Assist learn from your team's feedback. This makes future code reviews more consistent and personalized to your project's style. Click here to enable Memory in your admin console. 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
이 PR은 웨이트 트레이닝 이미지 관련 버그를 수정하고, 몸무게 데이터 타입을 Int에서 Double로 변경하는 내용을 담고 있습니다. 전반적으로 변경 사항은 명확하며, PR의 목적을 잘 달성하고 있습니다. 다만, 몸무게 입력을 위해 새로 추가된 weightGroup 뷰에서 사용자 경험(UX)을 저해할 수 있는 부분을 발견하여 수정을 제안합니다. 또한 코드 중복을 줄이기 위한 리팩토링 제안도 포함했습니다. 자세한 내용은 아래 주석을 확인해주세요.
I am having trouble creating individual review comments. Click here to see my feedback.
RecordManagment/Presentation/View/Exercise/ExerciseRecordView.swift (276-280)
몸무게 입력 처리 로직에 사용자 경험을 저해할 수 있는 부분이 있습니다.
현재 구현에서는 사용자가 소수점을 포함한 숫자를 잘못 입력할 경우(예: "1.2." 입력), Double(filtered)가 nil이 되어 값이 0으로 초기화됩니다. 이로 인해 사용자가 입력하던 "1.2"라는 값이 사라져버리는 문제가 발생합니다.
잘못된 입력에 대해 값을 0으로 초기화하는 대신, 유효하지 않은 입력일 경우 바인딩된 값을 업데이트하지 않도록 수정하여 사용자가 입력을 수정할 기회를 주는 것이 좋습니다. 이렇게 하면 사용자가 실수로 잘못 입력하더라도 기존 입력 내용이 유지되어 더 나은 사용자 경험을 제공할 수 있습니다.
if let value = Double(filtered) {
number.wrappedValue = value
} else if filtered.isEmpty && isFocused == focused {
number.wrappedValue = 0
}RecordManagment/Presentation/View/Exercise/ExerciseRecordView.swift (251-300)
weightGroup 함수는 기존의 inputGroup 함수와 매우 유사한 구조를 가지고 있습니다. 현재는 Int와 Double 타입을 처리하기 위해 두 개의 함수로 분리되어 있지만, 이로 인해 코드 중복이 발생하고 유지보수성이 저하될 수 있습니다.
향후에 제네릭(Generic)을 사용하여 이 두 함수를 하나로 통합하는 것을 고려해보세요. 예를 들어, Numeric 및 LosslessStringConvertible 프로토콜을 활용하여 숫자 입력을 처리하는 범용적인 뷰 헬퍼 함수를 만들 수 있습니다. 이렇게 하면 코드 중복을 줄이고 재사용성을 높일 수 있습니다.