-
Notifications
You must be signed in to change notification settings - Fork 0
내부 테스트 피드백 수정 #275
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
내부 테스트 피드백 수정 #275
Conversation
Summary of ChangesHello @pinocchio22, 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! 이 풀 리퀘스트는 내부 테스트 피드백을 반영하여 사용자 경험을 전반적으로 개선하고 여러 버그를 수정하는 데 중점을 두었습니다. 검색 기능의 편의성을 높이고, 북마크 아이콘을 교체하여 시각적 일관성을 확보했으며, 리스트 뷰의 레이아웃과 셀 재사용 문제를 해결하여 성능을 최적화했습니다. 또한, 아이템 및 맵 상세 정보 표시를 강화하고, 몬스터 태그뷰의 중첩 문제를 해결하는 등 다양한 영역에서 앱의 완성도를 높였습니다. 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
내부 테스트에서 발견된 다양한 피드백을 반영한 수정 사항들이 인상적입니다. 특히 UICollectionViewCell의 재사용 문제를 해결하기 위해 indexPath를 확인하는 로직을 추가하고 prepareForReuse를 구현한 점은 매우 훌륭한 개선입니다. 전반적으로 코드 품질을 높이는 좋은 변경들이 많습니다. 몇 가지 '매직 넘버' 사용과 접근 제어 수준에 대한 사소한 개선점을 제안드렸으니 확인해 보시면 좋겠습니다. 수고하셨습니다!
|
|
||
| // MARK: - Components | ||
| private let imageView = ItemImageView(image: nil, cornerRadius: Constant.imageRadius, inset: Constant.imageInset, backgroundColor: .listMap) | ||
| public let imageView = ItemImageView(image: nil, cornerRadius: Constant.imageRadius, inset: Constant.imageInset, backgroundColor: .listMap) |
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.
imageView의 접근 제어 수준을 public으로 변경하셨는데, 캡슐화를 위해 private으로 유지하는 것이 좋습니다. imageView의 속성을 외부에서 직접 변경하기보다는, CardList에 필요한 기능을 수행하는 메서드를 추가하여 노출하는 방식(예: setMapImage)을 사용하는 것이 더 안전하고 유지보수하기 좋은 코드 구조입니다. 외부에서 imageView에 직접 접근해야 하는 특별한 이유가 없다면 private으로 되돌리는 것을 고려해 보세요.
| public let imageView = ItemImageView(image: nil, cornerRadius: Constant.imageRadius, inset: Constant.imageInset, backgroundColor: .listMap) | |
| private let imageView = ItemImageView(image: nil, cornerRadius: Constant.imageRadius, inset: Constant.imageInset, backgroundColor: .listMap) |
| setImage(image: image, backgroundColor: backgroundColor) | ||
| imageView.snp.remakeConstraints { make in | ||
| make.center.equalToSuperview() | ||
| make.size.equalTo(40) |
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.
| imageView.snp.makeConstraints { make in | ||
| make.center.equalToSuperview() | ||
| make.size.equalTo(Constant.imageSize) | ||
| make.width.equalTo(imageContentView.snp.width).multipliedBy(0.42) |
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.
imageView의 너비를 imageContentView 너비의 0.42 배로 설정하셨습니다. 이 0.42라는 값은 '매직 넘버'로, 코드의 의도를 파악하기 어렵게 만듭니다. 이 값의 의미를 설명하는 주석을 추가하거나, Constant에 의미 있는 이름의 상수로 정의하여 사용하는 것이 좋겠습니다.
또한, 너비만 제약하고 높이를 제약하지 않으면 이미지의 비율에 따라 레이아웃이 의도치 않게 변경될 수 있습니다. 이미지 뷰의 비율을 유지하기 위해 높이 제약도 추가하는 것을 고려해 보세요. 예를 들어, 정사각형을 유지하려면 make.height.equalTo(imageView.snp.width)와 같은 제약을 추가할 수 있습니다.
| ImageLoader.shared.loadImage(stringURL: imageUrl) { [weak self] image in | ||
| if image == DesignSystemAsset.image(named: "connectionError") { | ||
| self?.mapImageView.snp.remakeConstraints { make in | ||
| make.size.equalTo(165) |
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.
📌 이슈
✅ 작업 사항