MBL-2927: Remove 'Either' initialization option from ProjectPageViewController#2701
Closed
amy-at-kickstarter wants to merge 2 commits intomainfrom
Closed
MBL-2927: Remove 'Either' initialization option from ProjectPageViewController#2701amy-at-kickstarter wants to merge 2 commits intomainfrom
amy-at-kickstarter wants to merge 2 commits intomainfrom
Conversation
| let projectParam = Either<Project, any ProjectPageParam>(left: project) | ||
| let vc = ProjectPageViewController.configuredWith( | ||
| projectOrParam: projectParam, | ||
| param: project.projectPageParam, |
Contributor
Author
There was a problem hiding this comment.
A convenience method for turning a project into a ProjectPageParam.
stevestreza-ksr
approved these changes
Jan 21, 2026
|
|
||
| vc.viewModel.inputs.configureWith( | ||
| projectOrParam: projectOrParam, | ||
| // TODO: MBL-2927 We're cleaning up the Either path in the view model. |
Contributor
There was a problem hiding this comment.
Sanity checking this todo is still needed or if work needs to be done here
Contributor
Author
There was a problem hiding this comment.
👍 Yup, still needs to be done. I figured I would clean this up in two separate phases, just to keep the PR from being overwhelming.
…ontroller The view controller will now require any ProjectPageParam.
59a8d16 to
ed7040e
Compare
Collaborator
SwiftLint found issuesWarnings
Generated by 🚫 Danger |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📲 What
Remove
Eitherinitialization option fromProjectPageViewController. The view controller will now requireany ProjectPageParam.🤔 Why
There were two pathways to creating a
ProjectPageViewController- using aProjector using aProjectPageParam. However, theProjectPageParamcan also contain aninitialProject, which is used for previewing data.These two pathways add significant complexity to the loading code in
ProjectPageViewControllerand are ultimately redundant. By removing thisEithercall, we can start to clean up these two separate paths.Ultimately, the goal is to make it much simpler to creating a project page with a loading preview, anywhere in the app, using one simplified loading path.