-
Notifications
You must be signed in to change notification settings - Fork 0
Using JobInterviewAssignmentKit #8
Conversation
# Conflicts: # Bookie/ViewModel/BookViewModel.swift # Bookie/ViewModel/BooksViewModel.swift
# Conflicts: # BookieTests/BookieTests.swift # project.yml
# Conflicts: # Bookie/UI/BooksScreenSwiftUI.swift # Bookie/ViewModel/BooksViewModel.swift
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 integrates the JobInterviewAssignmentKit dependency and updates the view model implementations to use generics, alongside adjustments to dependency injection and build script configurations.
- Added JobInterviewAssignmentKit dependency in project.yml.
- Updated BooksViewModel and BookViewModel to use generic type parameters and refined initialization.
- Adjusted DI registrations and updated build script command paths with absolute mint paths.
Reviewed Changes
Copilot reviewed 9 out of 9 changed files in this pull request and generated 2 comments.
Show a summary per file
File | Description |
---|---|
project.yml | Added JobInterviewAssignmentKit and updated build script command paths. |
Bookie/ViewModel/BooksViewModel.swift | Made BooksViewModel generic, introduced SetupParams, and removed optional chaining. |
Bookie/ViewModel/BookViewModel.swift | Updated BookViewModel to be generic and imported JobInterviewAssignmentKit. |
Bookie/UI/BooksScreenSwiftUI.swift | Updated viewModel type to generic and updated binding signatures. |
Bookie/UI/BooksScreen.swift | Updated viewModel type to generic. |
Bookie/UI/BookScreenSwiftUI.swift | Updated viewModel type to generic in binding definitions. |
Bookie/UI/BookScreen.swift | Updated viewModel type to generic. |
Bookie/DI/DI.swift | Updated dependency registration to use Coordinator instead of CoordinatorSwiftUI. |
Bookie/DI/CoordinatorSwiftUI.swift | Updated return types to use new Swift 5.9 existential syntax for AnyScreen protocols. |
Comments suppressed due to low confidence (3)
Bookie/ViewModel/BooksViewModel.swift:44
- [nitpick] The introduced SetupParams struct is not currently integrated into the view model initialization; consider either utilizing it for configuration consistency or removing it if redundant.
struct SetupParams { ... }
Bookie/ViewModel/BooksViewModel.swift:86
- Removing optional chaining on 'screen' assumes it is always non-nil; please confirm that the initialization order guarantees that a valid screen is always assigned.
await screen.onNewDataReceived(oldSet: oldSet, newSet: createSet(from: books))
Bookie/DI/DI.swift:34
- Ensure that the new Coordinator provides equivalent functionality to the previous CoordinatorSwiftUI to maintain expected navigation flow.
Coordinator()
- script: "/opt/homebrew/bin/mint run swiftgen" | ||
name: SwiftGen | ||
postCompileScripts: | ||
- script: "mint run swiftformat . --swiftversion 5.5" | ||
- script: "/opt/homebrew/bin/mint run swiftformat . --swiftversion 5.5" | ||
name: SwiftFormat | ||
- script: "mint run swiftlint" | ||
- script: "/opt/homebrew/bin/mint run swiftlint" |
Copilot
AI
May 14, 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.
[nitpick] The use of absolute paths for mint commands can improve reliability; ensure that these paths are consistent across different environments.
Copilot uses AI. Check for mistakes.
|
||
final class BooksScreenSwiftUI: UIHostingController<BooksScreenRootView>, AnyBooksScreen { | ||
private var viewModel: BooksViewModel! | ||
var viewModel: BooksViewModel<BooksScreenSwiftUI>! |
Copilot
AI
May 14, 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.
[nitpick] Changing the viewModel from private to internal exposes it beyond the class; consider whether this exposure is intentional or if encapsulation should be maintained.
var viewModel: BooksViewModel<BooksScreenSwiftUI>! | |
private var viewModel: BooksViewModel<BooksScreenSwiftUI>! |
Copilot uses AI. Check for mistakes.
No description provided.