Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

[MBL-2063] Delete PledgeViewController & PledgeViewModel #2271

Closed
wants to merge 2 commits into from

Conversation

scottkicks
Copy link
Contributor

@scottkicks scottkicks commented Feb 4, 2025

📲 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

  • Deletes PledgeViewController, PledgeViewControllerTests, and Snapshots
  • Deletes PledgeViewModel and PledgeViewModelTests
  • Moves any object definitions into NoShipping files where needed.

👀 See

No visible changes

✅ Acceptance criteria

  • Crowdfund and Late Pledge checkout is untouched and functions as expected
  • Tests pass

@scottkicks scottkicks self-assigned this Feb 4, 2025
@@ -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
Copy link
Contributor Author

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.

@@ -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
Copy link
Contributor Author

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.

@@ -23,7 +23,7 @@ final class RewardAddOnSelectionNoShippingViewController: UIViewController {
|> \.delegate .~ self
}()

public weak var pledgeViewDelegate: PledgeViewControllerDelegate?
public weak var pledgeViewDelegate: NoShippingPledgeViewControllerDelegate?
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

After I remove all of the legacy classes, I'll rename everything to remove the "NoShipping" preface.

Comment on lines +222 to +229
private func goToPledge(data _: PledgeViewData) {
// 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)
Copy link
Contributor Author

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.

Comment on lines +289 to +295
// 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)
Copy link
Contributor Author

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.

@nativeksr
Copy link
Collaborator

1 Warning
⚠️ Big PR

Generated by 🚫 Danger

@scottkicks
Copy link
Contributor Author

closing so I can cleanup the commit history a bit

@scottkicks scottkicks closed this Feb 4, 2025
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants