-
Notifications
You must be signed in to change notification settings - Fork 1
✨ [feat] 대시보드 현재 출현 생물 섹션 추가 (#30) #143
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: develop
Are you sure you want to change the base?
Conversation
- CurrentCreaturesSectionReactor 구현 (현재 시간/월 기반 필터링) - CurrentCreaturesView 구현 (물고기/벌레/해산물 필터 버튼) - 사용자 반구 설정 기반 출현 생물 표시 - 대시보드에 '현재 출현 생물' 섹션 추가 - 한국어/영어 로컬라이제이션 추가 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
|
Warning Rate limit exceeded@geeksbaek has exceeded the limit for the number of commits that can be reviewed per hour. Please wait 29 minutes and 44 seconds before requesting another review. ⌛ How to resolve this issue?After the wait time has elapsed, a review can be triggered using the We recommend that you space out your commits to avoid hitting the rate limit. 🚦 How do rate limits work?CodeRabbit enforces hourly rate limits for each developer per organization. Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout. Please see our FAQ for further information. 📒 Files selected for processing (2)
📝 WalkthroughWalkthroughThe pull request introduces a new "Current Creatures" dashboard section that displays creatures available at the current time with filtering by creature type. It includes a reactor managing time-based availability logic, a UI view with filters and collection display, localization strings for multiple languages, and integration into the dashboard. Changes
Sequence DiagramsequenceDiagram
participant User
participant DashboardVC as DashboardViewController
participant CurrentCreaturesView
participant CurrentCreaturesReactor
participant Coordinator
participant DataFetcher
User->>DashboardVC: Dashboard loads
DashboardVC->>CurrentCreaturesReactor: initialize(coordinator)
DashboardVC->>CurrentCreaturesView: init with reactor
CurrentCreaturesView->>CurrentCreaturesReactor: trigger fetchCreatures action
CurrentCreaturesReactor->>DataFetcher: fetch all creatures by category
DataFetcher-->>CurrentCreaturesReactor: creatures data
CurrentCreaturesReactor->>CurrentCreaturesReactor: compute availability<br/>(time, hemisphere, month)
CurrentCreaturesReactor-->>CurrentCreaturesView: update state (allCreatures)
CurrentCreaturesView->>CurrentCreaturesView: render collection view<br/>with creature icons
User->>CurrentCreaturesView: tap filter button (e.g., Fish)
CurrentCreaturesView->>CurrentCreaturesReactor: send filterChanged action
CurrentCreaturesReactor->>CurrentCreaturesReactor: apply category filter<br/>to creatures
CurrentCreaturesReactor-->>CurrentCreaturesView: update state (filteredCreatures)
CurrentCreaturesView->>CurrentCreaturesView: refresh collection view<br/>with filtered creatures
User->>CurrentCreaturesView: tap creature icon
CurrentCreaturesView->>CurrentCreaturesReactor: send creatureTapped action
CurrentCreaturesReactor->>Coordinator: navigate to creature detail
Coordinator-->>User: show creature details
Estimated code review effort🎯 4 (Complex) | ⏱️ ~50 minutes Poem
Pre-merge checks and finishing touches❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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: 0
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/ViewModels/ItemsReactor.swift (1)
79-81: Fix variable naming typo:notCollectedIems→notCollectedItems.Line 79 contains a typo in the variable name (
Iemsinstead ofItems). This inconsistency affects readability and maintainability, especially since the variable is used in thecombineLatestcall on line 81.🔎 Proposed fix
- let notCollectedIems = setUpUserItem() + let notCollectedItems = setUpUserItem() .compactMap { [weak self] items in self?.setUpNotCollected(items) } let userItems = Observable.combineLatest(collectedItems, notCollectedIems) + let userItems = Observable.combineLatest(collectedItems, notCollectedItems) .map { Mutation.setUserItems(collected: $0.0, notCollected: $0.1) }
📜 Review details
Configuration used: defaults
Review profile: CHILL
Plan: Pro
📒 Files selected for processing (11)
Animal-Crossing-Wiki/Projects/App/Resources/en.lproj/Localizable.stringsAnimal-Crossing-Wiki/Projects/App/Resources/ko.lproj/Localizable.stringsAnimal-Crossing-Wiki/Projects/App/Sources/Extension/String+extension.swiftAnimal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/ViewControllers/ItemsViewController.swiftAnimal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/ViewModels/ItemsReactor.swiftAnimal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/Views/CategoryRow.swiftAnimal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/Views/ItemSeasonView.swiftAnimal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/Coordinator/DashboardCoordinator.swiftAnimal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/ViewControllers/DashboardViewController.swiftAnimal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/ViewModels/CurrentCreaturesSectionReactor.swiftAnimal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/Views/CurrentCreaturesView.swift
💤 Files with no reviewable changes (1)
- Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/Views/CategoryRow.swift
🧰 Additional context used
🧬 Code graph analysis (3)
Animal-Crossing-Wiki/Projects/App/Resources/ko.lproj/Localizable.strings (3)
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Collection/ViewControllers/CollectionProgressViewController.swift (1)
setUpNavigationItem(40-42)Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Collection/ViewControllers/CollectionViewController.swift (1)
setUpNavigationItem(46-48)Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Animals/ViewControllers/NPCViewController.swift (1)
all(13-24)
Animal-Crossing-Wiki/Projects/App/Resources/en.lproj/Localizable.strings (2)
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Animals/ViewControllers/NPCViewController.swift (1)
all(13-24)Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Animals/ViewControllers/VillagersViewController.swift (1)
all(12-259)
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/ViewModels/ItemsReactor.swift (1)
Animal-Crossing-Wiki/Projects/App/Sources/Utility/Items.swift (2)
setUpUserCollection(69-95)updateItem(401-411)
🪛 SwiftLint (0.57.0)
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/ViewModels/CurrentCreaturesSectionReactor.swift
[Warning] 90-90: Conditional statements should always return on the next line
(conditional_returns_on_newline)
[Warning] 111-111: Conditional statements should always return on the next line
(conditional_returns_on_newline)
[Warning] 149-149: Conditional statements should always return on the next line
(conditional_returns_on_newline)
[Warning] 173-173: Conditional statements should always return on the next line
(conditional_returns_on_newline)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (1)
- GitHub Check: Check Build
🔇 Additional comments (19)
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/ViewModels/ItemsReactor.swift (1)
303-303: Formatting change approved.The extra space after the arrow operator has been removed. No behavioral impact.
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/Views/ItemSeasonView.swift (1)
76-76: Good refactor to idiomatic Swift.Using the
isoperator for type checking is more idiomatic and readable than the cast-and-nil-check pattern (as? ... != nil). The behavior remains functionally equivalent.Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Catalog/ViewControllers/ItemsViewController.swift (2)
397-414: Good refactoring, but verify relevance to PR objectives.Using
_for the unusedactionparameter is correct Swift style and improves code clarity. However, this change appears unrelated to the PR's stated objective of adding a "Current Creatures" dashboard section.Was this file modified intentionally as part of this feature, or is this an incidental cleanup?
415-431: Consistent refactoring applied.Same improvement as the
allSelectActionabove—correctly uses_for the unused parameter.Animal-Crossing-Wiki/Projects/App/Sources/Extension/String+extension.swift (1)
27-38: LGTM: Improved String extension logic.The changes correctly optimize the
isChosungcheck usingisEmptyinstead ofcount > 0and add an early break for efficiency. The logic now properly validates that all characters in the string are Hangul initials.Animal-Crossing-Wiki/Projects/App/Resources/en.lproj/Localizable.strings (1)
1524-1528: Localization entries look good.The new keys appropriately support the Current Creatures UI. Note that "All" is defined in multiple places throughout this file (lines 162, 285, 289, 1528), which works but could make future maintenance harder if context-specific translations are ever needed.
Animal-Crossing-Wiki/Projects/App/Resources/ko.lproj/Localizable.strings (1)
1529-1533: Korean localization looks appropriate.The translations align with the English localization structure and appear suitable for the Current Creatures UI.
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/ViewModels/CurrentCreaturesSectionReactor.swift (6)
13-38: Clean ReactorKit structure.The reactor follows standard ReactorKit patterns with well-defined actions, mutations, and state. The separation of
creaturesandfilteredCreaturesin state is good for performance.
40-58: Safe action handling with defensive programming.The use of safe array access at line 50 prevents potential crashes from invalid indices. Good defensive coding.
110-128: Hemisphere and month filtering logic is correct.The method properly checks both hemisphere-specific month availability and time ranges. Assumes
monthsArrayuses 1-indexed months (1=January, 12=December).
144-181: Time parsing logic handles format variations well.The defensive handling of both en-dash (" – ") and hyphen (" - ") separators is good practice. The 12-hour to 24-hour conversion correctly handles edge cases (12 AM → 0, 12 PM → 12).
Consider verifying the time parsing with actual game data to ensure the format strings match expectations (e.g., "4 AM – 9 PM", "All day").
183-190: Correctly handles overnight time ranges.The logic properly handles both normal (8 AM – 5 PM) and overnight (9 PM – 4 AM) ranges. Note that the implementation uses a half-open interval (
hour >= start && hour < end), so a creature available "4 AM – 9 AM" is catchable at 4:00 but not at 9:00. This is standard game time range behavior.
84-108: ✓ Category.critters is correctly defined and Category conforms to Comparable.The static property
Category.crittersreturns[.fishes, .seaCreatures, .bugs], and theCategoryenum'sComparableconformance defines proper sort order (critters first, followed by other categories). Sorting by category in this method works as intended.Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/Views/CurrentCreaturesView.swift (4)
11-71: Well-structured UI components.The view hierarchy is cleanly organized with appropriate stack views, and the empty state is properly constrained. Good UX considerations with both count display and empty state messaging.
73-93: Clean filter button implementation.The button styling is consistent and the selection state is clearly communicated through visual changes. The
updateFilterButtonAppearancemethod ensures mutual exclusivity of button selection.
123-202: Comprehensive and correct Rx bindings.The view properly binds to reactor state and actions. The filter button appearance updates happen in
do(onNext:)which provides immediate visual feedback. The use ofMainScheduler.asyncInstancefor state observation ensures UI updates on the main thread.
205-211: Clean public API with convenience initializer.The extension provides a clear entry point for constructing the view with its reactor, following good encapsulation practices.
Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/Coordinator/DashboardCoordinator.swift (1)
40-53: Clean integration of new reactor into coordinator.The new
CurrentCreaturesSectionReactoris wired into the dashboard setup following the same pattern as existing sections. The coordinator is properly passed for navigation handling.Animal-Crossing-Wiki/Projects/App/Sources/Presentation/Dashboard/ViewControllers/DashboardViewController.swift (1)
60-111: Dashboard integration is well-executed.The new Current Creatures section is cleanly integrated following the established pattern. The placement between "Collection Progress" and "Residents who can visit randomly" is logical, and the pawprint icon appropriately represents the creatures feature.
- CurrentCreaturesSectionReactor 시간 필터링 개선 - CurrentCreaturesView UI 개선 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
Summary
Changes
CurrentCreaturesSectionReactor: 현재 시간/월 기반 생물 필터링 로직CurrentCreaturesView: 필터 버튼 및 컬렉션 뷰 UITest plan
Closes #30
🤖 Generated with Claude Code
Summary by CodeRabbit
New Features
Improvements
✏️ Tip: You can customize this high-level summary in your review settings.