-
Notifications
You must be signed in to change notification settings - Fork 0
[Fix] 소식 탭 경기 일정 화면 변경 대응 #284
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
Walkthrough팀명 회전 방식으로 더미 경기 일정을 동적으로 생성하도록 UseCase를 수정하고, 경기 셀의 점수 표기를 중앙 Changes
Sequence Diagram(s)sequenceDiagram
autonumber
participant V as OverviewView
participant VM as OverviewViewModel
participant UC as OverviewUseCase
participant C as GameScheduleCell
V->>VM: 화면 로드/갱신 요청
VM->>UC: createMockGameSchedules(dayOffset)
UC-->>VM: [경기 일정 목록(회전 팀 페어링, gameNumber 기반 점수)]
VM-->>V: 바인딩된 일정 데이터
loop 각 셀 구성
V->>C: configure(경기 정보)
Note right of C #DDEBF7: 중앙 `versusLabel`로 점수 표시
end
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✨ Finishing touches
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. 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.
Actionable comments posted: 3
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (2)
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift (2)
48-58: 사용하지 않는 속성들을 제거하세요.
homeTeamScoreLabel,colonImageView,awayTeamScoreLabel속성들이 정의되어 있지만 더 이상 뷰 계층에 추가되지 않습니다. 이는 불필요한 코드입니다.다음 diff를 적용하여 사용하지 않는 속성들을 제거하세요:
- private let homeTeamScoreLabel = UILabel().then { - $0.attributedText = "0".pretendardString(with: .head0) - $0.textColor = .wableBlack - } - - private let colonImageView = UIImageView(image: .icVersus.withRenderingMode(.alwaysOriginal)) - - private let awayTeamScoreLabel = UILabel().then { - $0.attributedText = "0".pretendardString(with: .head0) - $0.textColor = .wableBlack - } - private let versusLabel = UILabel().then { $0.attributedText = "VS".pretendardString(with: .head1) }
104-124: 사용하지 않는 파라미터와 로직을 제거하세요.
configure메서드에서homeTeamScore와awayTeamScore파라미터가 전달되고 레이블 텍스트가 설정되지만(lines 119, 121), 해당 레이블들이 뷰 계층에 없어 실제로 표시되지 않습니다. 이는 불필요한 코드입니다.다음 diff를 적용하여 불필요한 파라미터와 로직을 제거하세요:
func configure( gameStatusImage: UIImage?, gameTime: String, homeTeamLogoImage: UIImage?, homeTeamName: String, - homeTeamScore: Int, - awayTeamScore: Int, awayTeamName: String, awayTeamLogoImage: UIImage? ) { statusImageView.image = gameStatusImage timeLabel.text = gameTime homeTeamLogoImageView.image = homeTeamLogoImage homeTeamNameLabel.text = homeTeamName - homeTeamScoreLabel.text = "\(homeTeamScore)" - awayTeamScoreLabel.text = "\(awayTeamScore)" awayTeamNameLabel.text = awayTeamName awayTeamLogoImageView.image = awayTeamLogoImage }
prepareForReuse메서드(lines 92-101)도 함께 업데이트해야 합니다.
🧹 Nitpick comments (5)
Wable-iOS/Resource/Assets.xcassets/Team/100t.imageset/Contents.json (1)
1-23: 신규 에셋 추가 LGTM.
- 숫자로 시작하는 에셋 이름(“100t”)도 사용에 문제 없습니다. 다만 문자열 하드코딩을 줄이기 위해 SwiftGen(Assets) 도입을 권장합니다.
Wable-iOS/Resource/Assets.xcassets/Team/fnc.imageset/Contents.json (1)
1-23: 신규 에셋 추가 LGTM.
- 팀 로고 색상 보존을 위해 template-rendering-intent: original 추가를 고려해주세요(전 에셋 공통 권장).
Wable-iOS/Resource/Assets.xcassets/Team/tes.imageset/Contents.json (1)
1-23: 신규 에셋 추가 LGTM.
- 필요 시 template-rendering-intent: original 속성 추가를 고려해주세요.
Wable-iOS/Resource/Assets.xcassets/Team/blg.imageset/Contents.json (1)
4-4: 이미지셋 교체 검증 완료
- 코드 내
kdf문자열 참조가 모두 제거되었습니다.blg.imageset에 blg.png, blg@2x.png, blg@3x.png가 모두 존재합니다.- Contents.json에 psg 코멘트의 optional properties 설정이 반영되었는지 확인해주세요.
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift (1)
140-143: 주석 처리된 코드를 제거하세요.뷰 계층에서 주석 처리된 코드는 혼란을 초래할 수 있습니다. 변경 이력은 Git에 보관되므로 주석을 제거하는 것이 좋습니다.
다음 diff를 적용하세요:
scoreView.addSubviews( homeTeamLogoImageView, homeTeamNameLabel, - // homeTeamScoreLabel, - // colonImageView, - // awayTeamScoreLabel, versusLabel, awayTeamNameLabel, awayTeamLogoImageView )
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
⛔ Files ignored due to path filters (45)
Wable-iOS/Resource/Assets.xcassets/Team/100t.imageset/100t.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/100t.imageset/100t@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/100t.imageset/100t@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/al.imageset/al.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/al.imageset/al@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/al.imageset/al@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/blg.imageset/blg.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/blg.imageset/blg@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/blg.imageset/blg@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/cfo.imageset/cfo.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/cfo.imageset/cfo@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/cfo.imageset/cfo@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fly.imageset/fly.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fly.imageset/fly@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fly.imageset/fly@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fnc.imageset/fnc.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fnc.imageset/fnc@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fnc.imageset/fnc@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fox.imageset/fox.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fox.imageset/fox@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/fox.imageset/fox@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/g2.imageset/g2.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/g2.imageset/g2@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/g2.imageset/g2@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/ig.imageset/ig.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/ig.imageset/ig@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/ig.imageset/ig@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/kdf.imageset/kdf.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/kdf.imageset/kdf@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/kdf.imageset/kdf@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/mkoi.imageset/mkoi.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/mkoi.imageset/mkoi@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/mkoi.imageset/mkoi@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/psg.imageset/psg.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/psg.imageset/psg@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/psg.imageset/psg@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/tes.imageset/tes.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/tes.imageset/tes@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/tes.imageset/tes@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/tsw.imageset/tsw.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/tsw.imageset/tsw@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/tsw.imageset/tsw@3x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/vks.imageset/vks.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/vks.imageset/vks@2x.pngis excluded by!**/*.pngWable-iOS/Resource/Assets.xcassets/Team/vks.imageset/vks@3x.pngis excluded by!**/*.png
📒 Files selected for processing (15)
Wable-iOS/Domain/UseCase/Overview/OverviewUseCase.swift(2 hunks)Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift(3 hunks)Wable-iOS/Resource/Assets.xcassets/Team/100t.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/al.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/blg.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/cfo.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/fly.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/fnc.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/g2.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/ig.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/mkoi.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/psg.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/tes.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/tsw.imageset/Contents.json(1 hunks)Wable-iOS/Resource/Assets.xcassets/Team/vks.imageset/Contents.json(1 hunks)
🧰 Additional context used
🪛 SwiftLint (0.57.0)
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift
[Warning] 185-185: A doc comment should be attached to a declaration
(orphaned_doc_comment)
🔇 Additional comments (10)
Wable-iOS/Resource/Assets.xcassets/Team/mkoi.imageset/Contents.json (1)
1-23: 신규 에셋 추가 LGTM.
- 1x/2x/3x 배수 구성 적절합니다. 다크 배경 UI에서의 대비(투명 배경 포함)만 한 번 확인 부탁드립니다.
Wable-iOS/Resource/Assets.xcassets/Team/tsw.imageset/Contents.json (1)
1-23: 신규 에셋 추가 LGTM.
- 다른 팀 에셋과 동일한 규격/이름 컨벤션으로 일관성 좋습니다. 위 검증 스크립트로 존재/배수 체크만 진행 부탁드립니다.
Wable-iOS/Resource/Assets.xcassets/Team/cfo.imageset/Contents.json (1)
1-23: 신규 에셋 추가 LGTM.
- 코드에서 사용되는 팀 키와 정확히 일치하는지(대소문자 포함)만 최종 확인 부탁드립니다.
Wable-iOS/Resource/Assets.xcassets/Team/psg.imageset/Contents.json (1)
1-23: 신규 에셋 추가 LGTM. 다만 아래 3가지 점검 부탁드립니다.
- psg.png·psg@2x.png·psg@3x.png 파일 실제 존재 여부 및 해상도(1x/2x/3x) 적합성
- 팀 로고 색상 보존을 위한 템플릿 렌더링 방지 설정(Optional)
- 코드에서 참조하는 팀명과 에셋 폴더명 1:1 매칭 여부 확인
Wable-iOS/Resource/Assets.xcassets/Team/ig.imageset/Contents.json (1)
1-23: 표준 에셋 카탈로그 구조입니다.새로운 팀 로고 에셋이 올바르게 구성되어 있습니다. 1x, 2x, 3x 해상도가 모두 정의되어 있으며 Xcode 표준 형식을 따릅니다.
Wable-iOS/Resource/Assets.xcassets/Team/g2.imageset/Contents.json (1)
1-23: 표준 에셋 카탈로그 구조입니다.새로운 팀 로고 에셋이 올바르게 구성되어 있습니다.
Wable-iOS/Resource/Assets.xcassets/Team/vks.imageset/Contents.json (1)
1-23: 표준 에셋 카탈로그 구조입니다.새로운 팀 로고 에셋이 올바르게 구성되어 있습니다.
Wable-iOS/Resource/Assets.xcassets/Team/fly.imageset/Contents.json (1)
1-23: 표준 에셋 카탈로그 구조입니다.새로운 팀 로고 에셋이 올바르게 구성되어 있습니다.
Wable-iOS/Domain/UseCase/Overview/OverviewUseCase.swift (2)
64-64: LGTM!팀명 배열을 함수 내부로 이동한 것은 적절한 스코프 관리입니다. 주석도 명확하게 의도를 전달하고 있습니다.
114-129: 동적 팀 로테이션 로직이 잘 구현되었습니다.일자별로 팀 목록을 회전시켜 페어링하는 로직이 깔끔합니다.
gameNumber를 기반으로 점수를 계산하는 방식도 테스트 데이터로 적절합니다.
| let teamNames: [String] = [ | ||
| "T1", "GEN", "HLE", "DK", "KT", "NS", "DRX", "BRO", "BFX", "DNF", | ||
| "VKS", "AL", "BLG", "CFO", "FLY", "FNC", "G2", "IG", "MKOI", "PSG", | ||
| "TES", "TSW", "100T", "TBD" | ||
| ] |
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.
팀 개수가 홀수일 경우를 대비하세요.
teamNames 배열은 현재 24개(짝수)의 팀을 포함하고 있어 문제가 없지만, 향후 팀을 추가하거나 제거할 때 홀수 개가 되면 line 115-117의 페어링 로직에서 배열 인덱스 범위 초과 크래시가 발생할 수 있습니다.
다음 diff를 적용하여 안전장치를 추가하세요:
private func createMockGameSchedules() -> AnyPublisher<[GameSchedule], WableError> {
let teamNames: [String] = [
"T1", "GEN", "HLE", "DK", "KT", "NS", "DRX", "BRO", "BFX", "DNF",
"VKS", "AL", "BLG", "CFO", "FLY", "FNC", "G2", "IG", "MKOI", "PSG",
"TES", "TSW", "100T", "TBD"
]
+
+ // 팀 개수가 홀수이면 마지막 팀 제외
+ let validTeamCount = teamNames.count - (teamNames.count % 2)
+
var mockGameSchedules: [GameSchedule] = []그리고 line 114를 다음과 같이 수정하세요:
- let rotatedTeams: [String] = (0..<teamNames.count).map { teamNames[($0 + dayOffset) % teamNames.count] }
+ let rotatedTeams: [String] = (0..<validTeamCount).map { teamNames[($0 + dayOffset) % teamNames.count] }Committable suggestion skipped: line range outside the PR's diff.
🤖 Prompt for AI Agents
In Wable-iOS/Domain/UseCase/Overview/OverviewUseCase.swift around lines 103-107
(and referencing pairing logic at lines 114-117), the hard-coded teamNames list
can become odd-count in future causing an index-out-of-range crash during
pairing; fix by ensuring teamNames has an even number of entries at
initialization (append a placeholder like "BYE" when count % 2 != 0) and update
the pairing loop at line 114 to iterate safely (use a stride step of 2 and guard
that both i and i+1 are within bounds or use min(teamNames.count, ...) to
compute pairs) so the code never accesses i+1 when it doesn't exist.
| /// 점수 레이블 숨김 처리로 인한 주석 처리 | ||
| // homeTeamScoreLabel.snp.makeConstraints { make in | ||
| // make.centerY.equalToSuperview() | ||
| // make.trailing.equalTo(colonImageView.snp.leading).offset(-24) | ||
| // } | ||
|
|
||
| // colonImageView.snp.makeConstraints { make in | ||
| // make.center.equalToSuperview() | ||
| // make.adjustedWidthEqualTo(4) | ||
| // } | ||
|
|
||
| // awayTeamScoreLabel.snp.makeConstraints { make in | ||
| // make.centerY.equalToSuperview() | ||
| // make.leading.equalTo(colonImageView.snp.trailing).offset(24) | ||
| // } |
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.
🛠️ Refactor suggestion | 🟠 Major
주석 처리된 제약조건 코드를 제거하세요.
주석 처리된 제약조건 코드는 더 이상 필요하지 않으며, 코드를 복잡하게 만듭니다. SwiftLint도 line 185의 고아 문서 주석에 대해 경고하고 있습니다.
다음 diff를 적용하여 주석 처리된 코드를 제거하세요:
homeTeamNameLabel.snp.makeConstraints { make in
make.centerY.equalToSuperview()
make.leading.equalTo(homeTeamLogoImageView.snp.trailing).offset(8)
}
- /// 점수 레이블 숨김 처리로 인한 주석 처리
- // homeTeamScoreLabel.snp.makeConstraints { make in
- // make.centerY.equalToSuperview()
- // make.trailing.equalTo(colonImageView.snp.leading).offset(-24)
- // }
-
- // colonImageView.snp.makeConstraints { make in
- // make.center.equalToSuperview()
- // make.adjustedWidthEqualTo(4)
- // }
-
- // awayTeamScoreLabel.snp.makeConstraints { make in
- // make.centerY.equalToSuperview()
- // make.leading.equalTo(colonImageView.snp.trailing).offset(24)
- // }
-
versusLabel.snp.makeConstraints { make in
make.center.equalToSuperview()
}🧰 Tools
🪛 SwiftLint (0.57.0)
[Warning] 185-185: A doc comment should be attached to a declaration
(orphaned_doc_comment)
🤖 Prompt for AI Agents
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift
around lines 185-199: remove the commented-out constraint code blocks (the three
commented makeConstraints closures for homeTeamScoreLabel, colonImageView, and
awayTeamScoreLabel) so there are no orphaned documentation comments; delete
those lines entirely and save the file, then run SwiftLint or build to confirm
the lint warning is resolved.
| "filename" : "al.png", | ||
| "idiom" : "universal", | ||
| "scale" : "1x" | ||
| }, | ||
| { | ||
| "filename" : "fox@2x.png", | ||
| "filename" : "al@2x.png", | ||
| "idiom" : "universal", | ||
| "scale" : "2x" | ||
| }, | ||
| { | ||
| "filename" : "fox@3x.png", | ||
| "filename" : "al@3x.png", |
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.
🧩 Analysis chain
팀 이름 변경이 일관되게 처리되었는지 확인하세요.
파일명이 fox에서 al로 변경되었습니다. 이전 fox 에셋 파일들이 제거되었거나 다른 곳에서 여전히 참조되고 있지 않은지 확인하시기 바랍니다.
다음 스크립트로 fox 관련 남은 참조를 확인하세요:
🏁 Script executed:
#!/bin/bash
# fox 에셋에 대한 남은 참조 확인
rg -i "fox" --type swift -C 2
fd "fox" --type fLength of output: 212
Fox 에셋 제거/이름 변경 필요
- Wable-iOS/Resource/Assets.xcassets/Tag/tag_Fox.imageset 디렉토리 내
Fox.png,Fox@2x.png,Fox@3x.png파일들을al접두사로 변경하거나 불필요하다면 제거하세요.
🤖 Prompt for AI Agents
Wable-iOS/Resource/Assets.xcassets/Tag/tag_Fox.imageset around lines showing
image files (Fox.png, Fox@2x.png, Fox@3x.png): the three Fox image files should
either be renamed to use the "al" prefix (al.png, al@2x.png, al@3x.png) and
update the imageset Contents.json filenames accordingly, or delete the Fox files
and remove their entries from Contents.json if they are unnecessary; ensure
filenames, case, and Contents.json "filename" fields match exactly and that
there are no dangling references in the Xcode asset catalog.
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.
ㅜㅜ 빠른 작업 고생 많으셨습니다 배포는 좀이따 집가서 올릴게요 !!!
| @@ -100,22 +100,29 @@ struct MockOverviewUseCaseImpl: OverviewUseCase { | |||
| } | |||
|
|
|||
| private func createMockGameSchedules() -> AnyPublisher<[GameSchedule], WableError> { | |||
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.
mock을 붙이신 이유가 있나요 ??
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.
저 메서드는 Mock 유즈케이스 객체의 내용입니다.
| $0.textColor = .wableBlack | ||
| } | ||
|
|
||
| private let versusLabel = UILabel().then { |
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.
수정했습니다!
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.
Actionable comments posted: 1
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (3)
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift (3)
48-58: 사용하지 않는 프로퍼티를 제거하세요.
homeTeamScoreLabel,colonImageView,awayTeamScoreLabel은 더 이상 뷰 계층에 추가되지 않으며 사용되지 않습니다. 이들을 완전히 제거하여 코드를 정리하세요.다음 diff를 적용하여 사용하지 않는 프로퍼티를 제거하세요:
- private let homeTeamScoreLabel = UILabel().then { - $0.attributedText = "0".pretendardString(with: .head0) - $0.textColor = .wableBlack - } - - private let colonImageView = UIImageView(image: .icVersus.withRenderingMode(.alwaysOriginal)) - - private let awayTeamScoreLabel = UILabel().then { - $0.attributedText = "0".pretendardString(with: .head0) - $0.textColor = .wableBlack - } - private let versusLabel = UILabel().then {
90-103: prepareForReuse()에서 사용하지 않는 매개변수를 제거하세요.
prepareForReuse()의configure()호출에서homeTeamScore: 0과awayTeamScore: 0인자를 제거하세요. 이는 위의 메서드 시그니처 변경과 함께 수정되어야 합니다.다음 diff를 적용하세요:
override func prepareForReuse() { super.prepareForReuse() configure( gameStatusImage: nil, gameTime: "12.31 (목)", homeTeamLogoImage: nil, homeTeamName: "TBD", - homeTeamScore: 0, - awayTeamScore: 0, awayTeamName: "TBD", awayTeamLogoImage: nil ) }
105-125: configure() 메서드의 불필요 매개변수 제거 및 호출부 갱신
GameScheduleCell.configure 시그니처와 구현에서 homeTeamScore/awayTeamScore를 삭제하고, GameScheduleListViewController.swift의 호출부(라인 143)에서도 해당 인자를 제거하세요.
♻️ Duplicate comments (1)
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift (1)
186-200: 주석 처리된 제약조건 코드를 제거하세요.이전 리뷰에서도 지적되었듯이, 주석 처리된 제약조건 코드는 더 이상 필요하지 않으며 SwiftLint 경고를 유발합니다(line 186의 고아 문서 주석). 이들을 완전히 제거하세요.
다음 diff를 적용하여 주석 처리된 코드를 제거하세요:
homeTeamNameLabel.snp.makeConstraints { make in make.centerY.equalToSuperview() make.leading.equalTo(homeTeamLogoImageView.snp.trailing).offset(8) } - /// 점수 레이블 숨김 처리로 인한 주석 처리 - // homeTeamScoreLabel.snp.makeConstraints { make in - // make.centerY.equalToSuperview() - // make.trailing.equalTo(colonImageView.snp.leading).offset(-24) - // } - - // colonImageView.snp.makeConstraints { make in - // make.center.equalToSuperview() - // make.adjustedWidthEqualTo(4) - // } - - // awayTeamScoreLabel.snp.makeConstraints { make in - // make.centerY.equalToSuperview() - // make.leading.equalTo(colonImageView.snp.trailing).offset(24) - // } - versusLabel.snp.makeConstraints { make in make.center.equalToSuperview() }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (1)
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift(3 hunks)
🧰 Additional context used
🪛 SwiftLint (0.57.0)
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift
[Warning] 186-186: A doc comment should be attached to a declaration
(orphaned_doc_comment)
🔇 Additional comments (2)
Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift (2)
60-63: LGTM!
versusLabel이 적절히 구성되었으며, 다크모드를 위해 명시적으로.wableBlack색상이 할당되었습니다.
202-204: LGTM!
versusLabel의 제약조건이 올바르게 설정되어 scoreView의 중앙에 배치됩니다.
| // homeTeamScoreLabel, | ||
| // colonImageView, | ||
| // awayTeamScoreLabel, | ||
| versusLabel, |
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.
🛠️ Refactor suggestion | 🟠 Major
주석 처리된 코드를 제거하세요.
뷰 계층 구성에서 주석 처리된 레이블들(homeTeamScoreLabel, colonImageView, awayTeamScoreLabel)을 완전히 제거하여 코드를 정리하세요.
다음 diff를 적용하세요:
scoreView.addSubviews(
homeTeamLogoImageView,
homeTeamNameLabel,
- // homeTeamScoreLabel,
- // colonImageView,
- // awayTeamScoreLabel,
versusLabel,
awayTeamNameLabel,
awayTeamLogoImageView
)📝 Committable suggestion
‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation. Thoroughly test & benchmark the code to ensure it meets the requirements.
| // homeTeamScoreLabel, | |
| // colonImageView, | |
| // awayTeamScoreLabel, | |
| versusLabel, | |
| scoreView.addSubviews( | |
| homeTeamLogoImageView, | |
| homeTeamNameLabel, | |
| versusLabel, | |
| awayTeamNameLabel, | |
| awayTeamLogoImageView | |
| ) |
🤖 Prompt for AI Agents
In Wable-iOS/Presentation/Overview/GameSchedule/View/Cell/GameScheduleCell.swift
around lines 141 to 144, remove the commented-out view items "//
homeTeamScoreLabel, // colonImageView, // awayTeamScoreLabel," from the
array/list where versusLabel is listed so the view hierarchy no longer contains
stale commented code; ensure no trailing commas or formatting issues remain and
run a quick build to confirm no other references to those commented identifiers
exist before committing.
👻 PULL REQUEST
📄 작업 내용
🔗 연결된 이슈
Summary by CodeRabbit
New Features
Chores