-
Notifications
You must be signed in to change notification settings - Fork 1.2k
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
[MBL-1501] PPO view model navigation events #2161
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.
I like the way navigation is set up! I don't think I've seen multiple views access the same view model in our code before, but it's clean and simple and I like it (apart from the one name that I think is confusing). I'm concerned about the alert dot/badges; if you want to either tag TODO
s for those or split those changes into a separate pr, I'd be happy to approve this one.
Kickstarter-iOS/Features/PledgedProjectsOverview/PPOContainerViewController.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgedProjectsOverview/PPOContainerViewController.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgedProjectsOverview/PPOContainerViewController.swift
Show resolved
Hide resolved
7ab8d14
to
460ccb7
Compare
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.
Nice! I did add a few questions but nothing that needs to be blocking
Kickstarter-iOS/Features/PledgedProjectsOverview/PPOEmptyStateView.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgedProjectsOverview/PPOViewModelTests.swift
Show resolved
Hide resolved
…PPOView for new view model Add a new property 'ppoViewModel' to PPOContainerViewController. Modify the initialization of PPOView in PPOContainerViewController to use the new view model. Update the sink method in PPOContainerViewController to set badge and paged view controllers based on results. Change the declaration of viewModel in PPOView to be a binding.
1753b04
to
43df552
Compare
📲 What
Implements most of the logic for navigation events in the PPO view model and the tab bar integration.
🛠 How
Each user interaction was added to the PPOViewModel separately, with separate subjects to represent each type of user interaction. This will let us handle navigation events and analytics separately.
A
PPONavigationEvent
enum was added to represent different locations the user might navigate to. Then, the individual subjects are mapped to their respective navigation events, and those get merged into a navigationEvents publisher.Contextual information for routing locations (e.g. which project was backed) and handling of routing will be added once we connect this to a navigation service in MBL-1451).
Unit tests were added to cover these inputs and their navigation events.
✅ Acceptance criteria
All tests should pass.