-
Notifications
You must be signed in to change notification settings - Fork 0
[Refactor] 경기 일정에서 LCK 이외의 팀도 대응 #263
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이번 변경에서는 Changes
Sequence Diagram(s)sequenceDiagram
participant DataLayer as InformationMapper
participant Domain as GameSchedule
participant Presentation as GameScheduleListViewController
DataLayer->>Domain: gameDTO.aTeamName, bTeamName (String) → Game(homeTeam, awayTeam)
Domain-->>Presentation: Game(homeTeam: String, awayTeam: String)
Presentation->>Presentation: 팀 이름을 그대로 표시, 이미지 로딩 실패 시 fallback 이미지 사용
Assessment against linked issues
Assessment against linked issues: Out-of-scope changes(해당 변경 내역에서는 linked issue의 목적과 무관한 변경사항이 발견되지 않았습니다.) ✨ Finishing Touches
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. 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
SupportNeed help? Create a ticket on our support page for assistance with any issues or questions. Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments. CodeRabbit Commands (Invoked using PR comments)
Other keywords and placeholders
CodeRabbit Configuration File (
|
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: 0
🧹 Nitpick comments (1)
Wable-iOS/Presentation/Overview/GameSchedule/View/GameScheduleListViewController.swift (1)
137-141: 팀 이미지 로딩 로직을 개선하여 국제 대회 팀들을 더 안정적으로 지원하세요.현재 구현은 기본적인 기능은 제공하지만, 국제 대회 팀 이름이 이미지 에셋 이름과 일치하지 않거나 공백/특수문자가 포함된 경우 문제가 발생할 수 있습니다.
다음과 같은 개선을 제안합니다:
-let homeTeamName = game.homeTeam -let homeTeamLogoImage = UIImage(named: homeTeamName.lowercased()) ?? .tbd +let homeTeamName = game.homeTeam +let homeTeamLogoImage = loadTeamLogoImage(for: homeTeamName) -let awayTeamName = game.awayTeam -let awayTeamLogoImage = UIImage(named: awayTeamName.lowercased()) ?? .tbd +let awayTeamName = game.awayTeam +let awayTeamLogoImage = loadTeamLogoImage(for: awayTeamName)그리고 헬퍼 메서드를 추가하세요:
private func loadTeamLogoImage(for teamName: String) -> UIImage { // 팀 이름을 이미지 에셋 이름으로 변환 (공백 제거, 소문자 변환 등) let imageName = teamName.lowercased() .replacingOccurrences(of: " ", with: "_") .replacingOccurrences(of: ".", with: "") return UIImage(named: imageName) ?? .tbd }
📜 Review details
Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (4)
Wable-iOS/Data/Mapper/InformationMapper.swift(1 hunks)Wable-iOS/Domain/Entity/GameSchedule.swift(1 hunks)Wable-iOS/Domain/UseCase/Overview/OverviewUseCase.swift(2 hunks)Wable-iOS/Presentation/Overview/GameSchedule/View/GameScheduleListViewController.swift(1 hunks)
🔇 Additional comments (4)
Wable-iOS/Domain/UseCase/Overview/OverviewUseCase.swift (2)
115-117: 팀 이름 변환 로직이 올바르게 구현되었습니다.LCKTeam enum의 rawValue를 사용하여 String으로 변환하는 방식이 도메인 모델 변경에 맞게 적절히 구현되었습니다.
127-127: 모크 데이터 반환 로직이 올바르게 수정되었습니다.빈 배열을 반환하던 것을 실제 생성된 mockGameSchedules를 반환하도록 수정하여 모크 데이터 기능이 정상적으로 동작할 수 있게 되었습니다.
Wable-iOS/Data/Mapper/InformationMapper.swift (1)
24-26: 매핑 로직이 올바르게 단순화되었습니다.LCKTeam enum 변환을 제거하고 DTO의 팀 이름을 직접 할당하는 방식으로 변경하여 국제 대회 팀들도 지원할 수 있게 되었습니다. 매핑 로직이 단순화되어 가독성도 향상되었습니다.
Wable-iOS/Domain/Entity/GameSchedule.swift (1)
21-23: GameSchedule 엔티티 non-optional String 변경 승인DTO(
FetchGameSchedules.swift)에서aTeamName과bTeamName이 이미 non-optionalString으로 선언되어 있고,
도메인 레이어 매핑(OverviewUseCase.swift)에서도homeTeam·awayTeam에nil처리 로직이 전혀 없어
옵셔널 제거가 안전한 것으로 확인되었습니다.
- DTO:
let aTeamName: String,let bTeamName: String- 매핑:
homeTeam: lckTeams[homeTeamIndex].rawValue,awayTeam: lckTeams[awayTeamIndex].rawValue이상 없습니다.
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.
고생하셨습니다! 이제 핫픽스를 올리러 가볼까요 ㅎㅎ
[Refactor] 경기 일정에서 LCK 이외의 팀도 대응
👻 PULL REQUEST
📄 작업 내용
💻 주요 코드 설명
📍 LCKTeam을 수정하지 않은 이유
✅ 이번 PR에서 이런 부분을 중점적으로 체크해주세요!
잠깐 확인하고 갈까요?
들여쓰기를 5번 이하로 준수했는지, 코드 가독성이 적절한지 확인해주세요.
한 줄당 120자 제한을 준수했는지 확인해주세요.
MARK 주석이 정해진 순서와 형식에 맞게 작성되었는지 확인해주세요.
반복되는 상수 값이 있는지, 있다면 Constant enum으로 분리되어 있는지 확인해주세요.
삼항 연산자가 길어질 경우 적절히 개행되어 있는지 확인해주세요.
조건문에서 중괄호가 올바르게 사용되었는지 확인해주세요.
라이브러리 import가 퍼스트파티와 서드파티로 구분되고 알파벳순으로 정렬되었는지 확인해주세요.
용량이 큰 리소스나 호출되지 않을 가능성이 있는 프로퍼티에 lazy var가 적절히 사용되었는지 확인해주세요.
메모리 누수 방지를 위한 weak 참조가 필요한 곳에 적용되었는지 확인해주세요.
도메인 로직과 UI 로직이 적절히 분리되어 있는지 확인해주세요.
🔗 연결된 이슈
Summary by CodeRabbit
신규 기능
버그 수정