Skip to content
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

💲[Native Checkout] Add Shipping Availability Pill #787

Merged
merged 4 commits into from
Aug 8, 2019

Conversation

justinswart
Copy link
Contributor

@justinswart justinswart commented Aug 7, 2019

📲 What

Adds a pill to our RewardCardView describing the shipping availability of a reward, that is whether it's available anywhere in the world or only in the U.S.

🤔 Why

A continuation of the rewards carousel work and necessary information to surface to our international backers.

🛠 How

  • Made use of the string that is set on reward.shipping.summary and created a pill from that to add to the collection view.
  • Recorded new snapshots of the available and unavailable state.

👀 See

Before 🐛 After 🦋
image image

✅ Acceptance criteria

Note: This does not appear to be localized by the back-end.

  • Rewards that have shipping enabled should show this pill.
  • Rewards that don't have shipping enabled should not show this pill.

Copy link
Contributor

@ifbarrera ifbarrera left a comment

Choose a reason for hiding this comment

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

Just one small code-cleanup comment but lgtm!

@@ -194,7 +194,9 @@ private func rewardTitle(project: Project, reward: Reward) -> String {
private func pillStrings(project: Project, reward: Reward) -> [String] {
var pillStrings: [String] = []

if let endsAt = reward.endsAt, project.state == .live, endsAt > 0,
Copy link
Contributor

Choose a reason for hiding this comment

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

Do we we want to remove the check from the remaining logic too?

if let remaining = reward.remaining, reward.limit != nil, project.state == .live {

Copy link
Contributor Author

Choose a reason for hiding this comment

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

sure 👍

@justinswart justinswart merged commit 7f80c60 into master Aug 8, 2019
@justinswart justinswart deleted the reward-cell-shipping-pill branch August 8, 2019 22:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants