Skip to content
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

Merged
merged 13 commits into from
Oct 8, 2024

Conversation

stevestreza-ksr
Copy link
Contributor

📲 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.

Copy link
Contributor

@ifosli ifosli left a 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 TODOs for those or split those changes into a separate pr, I'd be happy to approve this one.

Copy link
Contributor

@ifosli ifosli left a 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

…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.
@stevestreza-ksr stevestreza-ksr force-pushed the stevestreza/ppo/view-model-routes branch from 1753b04 to 43df552 Compare October 7, 2024 23:27
@stevestreza-ksr stevestreza-ksr merged commit 42e22af into main Oct 8, 2024
5 checks passed
@stevestreza-ksr stevestreza-ksr deleted the stevestreza/ppo/view-model-routes branch October 8, 2024 00:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants