-
Notifications
You must be signed in to change notification settings - Fork 0
[Feat] 소식 탭 큐레이션 UI 구현하기 #290
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
Conversation
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.
Pull Request Overview
This PR implements the UI for the curation tab in the news section, featuring paginated content loading with pull-to-refresh functionality. The implementation includes a view controller, cell, view model, and data model for displaying curated content items.
Key changes:
- Created complete MVVM architecture for curation feature with pagination support
- Implemented custom collection view cell with press animation and URL navigation
- Added mock data generation for testing until API specification is available
Reviewed Changes
Copilot reviewed 6 out of 9 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
CurationViewController.swift |
Main view controller implementing collection view with pull-to-refresh and pagination |
CurationCell.swift |
Custom cell displaying thumbnail, title, source with tap interaction |
CurationViewModel.swift |
View model handling data fetching, pagination logic with mock data |
CurationItem.swift |
Data model with mock samples for curation content |
project.pbxproj |
Xcode project file updates for new source files |
btn_curation.imageset/Contents.json |
Asset catalog entry for curation button icon |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
| final class CurationViewModel { | ||
|
|
||
| private var lastItemID: UUID? | ||
| private var hasMore: Bool = false |
Copilot
AI
Oct 16, 2025
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.
The properties lastItemID and hasMore are accessed from multiple threads (main queue and processingQueue) without synchronization, creating potential race conditions. Consider using @MainActor for the class or protecting these properties with proper synchronization.
| title: item.title, | ||
| source: item.source | ||
| ) { | ||
| UIApplication.shared.open(URL(string: "https://www.naver.com")!) |
Copilot
AI
Oct 16, 2025
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.
Force unwrapping the URL will crash if the string is invalid. Use guard let or if let to safely unwrap the URL before opening it.
| UIApplication.shared.open(URL(string: "https://www.naver.com")!) | |
| if let url = URL(string: "https://www.naver.com") { | |
| UIApplication.shared.open(url) | |
| } |
| $0.isAccessibilityElement = false | ||
| } | ||
|
|
||
| private let descriptionView = UIView(backgroundColor: UIColor("F7F7F7")).then { |
Copilot
AI
Oct 16, 2025
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.
The color value 'F7F7F7' is a magic value. Consider defining it as a named color in the asset catalog or as a constant to improve maintainability.
youz2me
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.
고생하셨습니다~!
|
|
||
| import UIKit | ||
|
|
||
|
|
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.
음? 여기 개행이 두번 들어갔어요
| $0.contentMode = .scaleAspectFill | ||
| $0.clipsToBounds = true | ||
| $0.backgroundColor = .gray200 | ||
| $0.isAccessibilityElement = false |
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.
오... 이건 어떤 프로퍼티인가요?
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.
접근성(예: VoiceOver)등을 위한 프로퍼티인데, 코파일럿 자동완성시치가 했던것을 지우지 않았습니다.
지우도록 하겠습니다.
| private let authorLabel = UILabel().then { | ||
| $0.attributedText = "와블 큐레이터".pretendardString(with: .body3) | ||
| $0.textColor = .wableBlack | ||
| } | ||
|
|
||
| private let timeLabel = UILabel().then { | ||
| $0.attributedText = "· 2시간 전".pretendardString(with: .caption4) | ||
| $0.textColor = .gray500 | ||
| } |
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.
이렇게 해두면 통신을 통해 데이터가 들어가기 전에 유저에게 보여질 위험이 있어서 저는 공백으로 해두는 편이긴 합니다
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.
그거 아주 좋은 생각 같습니다.
반영하겠습니다.
👻 PULL REQUEST
📄 작업 내용
🔗 연결된 이슈