-
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-1814] PLOT plan selector component #2195
base: main
Are you sure you want to change the base?
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.
Looking pretty good!
I added some Prelude and naming cleanup opportunities and also a question about whether we need to use a UITableView for this. I think we might be able to avoid some overhead from creating a new data source and table view cells by using a more basic UIStackView + UIView approach. You might have looked into this as an alternative already so lmk if you prefer the table view approach here.
I also think we might able to reduce some code by making a shared UIView for each payment plan option. They both have a selectable button and label that can be shared. Then we could dynamically show the PLOT details as needed. What do you think?
We should also probably add unit test coverage to PledgePaymentPlansViewModel
if possible.
Kickstarter-iOS/Features/PledgeOverTime/Controller/PledgePaymentPlansViewController.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Controller/PledgePaymentPlansViewController.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/Cells/PledgePaymentPlanInFullCell.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/Cells/PledgePaymentPlanInFullCell.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/Cells/PledgePaymentPlanInFullCell.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/Cells/PledgePaymentPlanPlotCell.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/Cells/PledgePaymentPlanInFullCell.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/Cells/PledgePaymentPlanPlotCell.swift
Outdated
Show resolved
Hide resolved
Kickstarter-iOS/Features/PledgeOverTime/Views/Cells/PledgePaymentPlanInFullCell.swift
Outdated
Show resolved
Hide resolved
…PaymentPlanCell` for both cell types
Generated by 🚫 Danger |
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.
Thanks for making those changes!
Just want to make sure that the "eligible but pledge amount is < $150" state is accounted for as well before merging. I don't see it in the gifs you added in the PR description
The plan is to tackle this validation in the ticket https://kickstarter.atlassian.net/browse/MBL-1816 |
📲 What
Create a new Payment Plan Selector component to allow users to select a payment plan option. The component will feature the options:
Pledge in full (default selection)
Pledge over time (just contains the initial state, it will be extended in MBL-1815)
🤔 Why
This feature is part of the Pledge Over Time (PLOT) initiative. It provides backers with more flexibility in how they contribute to projects. By implementing this, backers can choose whether to pay upfront or in multiple payments.
🛠 How
project.isPledgeOverTimeAllowed
flag from the API will determine whether the Pledge over time option is available for the project.flag pledge_over_time
will control the availability of this option at both the project level and for individual backers.👀 See
✅ Acceptance criteria