-
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-2063] Delete PledgeViewController & PledgeViewControllerTests #2272
Conversation
@@ -538,7 +538,6 @@ final class ManagePledgeViewController: UIViewController, MessageBannerViewContr | |||
// MARK: - Functions | |||
|
|||
private func goToRewards(_ project: Project) { | |||
/// Render rewards carousel that has the shipping location dropdown |
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.
Removing this comment. It's no longer needed now that the no-shipping flow is the standard.
@@ -638,7 +638,6 @@ public final class ProjectPageViewController: UIViewController, MessageBannerVie | |||
} | |||
|
|||
private func goToRewards(project: Project, refTag: RefTag?) { | |||
/// Render rewards carousel that has the shipping location dropdown |
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.
Removing this comment. It's no longer needed now that the no-shipping flow is the standard.
.../Features/RewardAddOnSelection/Controller/RewardAddOnSelectionNoShippingViewController.swift
Outdated
Show resolved
Hide resolved
// TODO: This class will be removed as part of our legacy checkout cleanup | ||
|
||
self.navigationController?.pushViewController(vc, animated: true) | ||
// let vc = PledgeViewController.instantiate() | ||
// vc.delegate = self.pledgeViewDelegate | ||
// vc.configure(with: data) | ||
// | ||
// self.navigationController?.pushViewController(vc, animated: true) |
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.
Simply commenting out this use of PledgeViewController for now since this class, RewardAddOnSelectionViewController, is a legacy class and will be deleted.
// TODO: This class will be removed as part of our legacy checkout cleanup | ||
|
||
self.navigationController?.pushViewController(pledgeViewController, animated: true) | ||
// let pledgeViewController = PledgeViewController.instantiate() | ||
// pledgeViewController.delegate = self.pledgeViewDelegate | ||
// pledgeViewController.configure(with: data) | ||
// | ||
// self.navigationController?.pushViewController(pledgeViewController, animated: true) |
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.
Same here. RewardsCollectionViewController, is a legacy class and will be deleted. Simply commenting this code out for now.
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.
These new lines are taken directly from PledgeViewModel. These types are still used in the checkout flow we had originally decided no to duplicate them and make NoShipping specific types.
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.
LGTM, one clarifying question about a delegate.
Generated by 🚫 Danger |
1f59cea
to
a916b4f
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!
public let context: PledgeViewContext | ||
|
||
// Convenience initializer to allow `bonusSupport` to default to `nil`. | ||
// TODO(MBL-1670): Delete this when cleaning up the noShippingAtCheckout feature. |
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.
Nit: Can we delete these convenience initializers yet?
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.
A few classes are using them, and I think it'll be cleaner to remove these initializers as I remove them. But yeah, they'll get removed along with everything else!
📲 What
Also deletes PledgeViewController Snapshots
🤔 Why
Now that the "No Shipping" flow has been made the standard, we can start removing the legacy checkout classes.
Doing this class by class for easier reviews and simpler commits.
🛠 How
👀 See
No visible changes
✅ Acceptance criteria
TODO
Removing these classes next: