-
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-1755] Pledge Summary Table Total Amount Text #2163
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.
Added a couple comments; I'm confused by why the "no reward" bool is separate from the rest of the config data and I'm missing a snapshot test for crowdfunding checkout. Would you please fix/explain?
Also, since this string is longer, would you mind double-checking what the UI looks like for large font sizes or maybe in german? UI doesn't need to be perfect but it should be usable.
@@ -10,7 +10,7 @@ public typealias PledgeSummaryViewData = ( | |||
) |
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.
Can we add the pledgeHasNoReward
bool here instead of passing it in separately?
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.
Kind of outside the scope of this pr, but do we still need separate post campaign and crowdfunding versions of this table?
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.
I'm refactoring this table in my current ticket. This should make it easier for these classes to use one version of this table.
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 snapshots look great! Will you also add snapshot tests for the no rewards case for crowdfunding (assuming we don't have one already; if we do, will you look into what's going on and fix it)?
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 minor comments but overall good to go 👍
.map { project, confirmationLabelHidden, total in (project, total, confirmationLabelHidden) } | ||
.map { projectAndConfirmationLabelHidden, pledgeTotal, rewards in | ||
let (project, confirmationLabelHidden) = projectAndConfirmationLabelHidden | ||
let pledgeHasNoReward = rewards.count == 1 && rewards.first?.isNoReward == 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.
Nit: Could use pledgeHasNoRewards(rewards:)
here
.map { project, confirmationLabelHidden, total in (project, total, confirmationLabelHidden) } | ||
.map { projectAndConfirmationLabelHidden, pledgeTotal, rewards in | ||
let (project, confirmationLabelHidden) = projectAndConfirmationLabelHidden | ||
let pledgeHasNoReward = rewards.count == 1 && rewards.first?.isNoReward == 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 nit: Could use pledgeHasNoRewards(rewards:)
here
@@ -211,7 +211,7 @@ private func items( | |||
|
|||
// MARK: Bonus | |||
|
|||
if let bonus = bonusAmount, bonus > 0 { | |||
if let bonus = bonusAmount, bonus > 0, rewardItems.isEmpty == false { |
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.
Sanity checking this shouldn't be doing that same isNoReward
check here
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.
either or would work here actually.
Need to get this merged in and Ingerid is OOO
📲 What
We also should be showing “Pledge without a reward” when a user pledges without a reward, instead of “Bonus support” and the total “Pledge amount”
🛠 How
This section of the pledge summary is managed by
NoShippingPledgeRewardsSummaryTotalViewController
for crowdfunding checkout andPostCampaignPledgeRewardsSummaryTotalViewController
for late pledge checkout.We need these classes to know if the backer is pledging without a reward so they can display either “Pledge without a reward” or “Pledge amount” so, I'm passing the
baseReward
, which has a handyisNoReward
helper, from the view model through to these classes.The designs also show that, when pledging without a reward, the bonus support and reward table view rows should be hidden.
👀 See
Designs for reference
✅ Acceptance criteria