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

[MBL-1680] Shipping Info Missing From Rewards Summary #2144

Merged
merged 5 commits into from
Sep 5, 2024

Conversation

scottkicks
Copy link
Contributor

@scottkicks scottkicks commented Sep 3, 2024

… if the shipping total is 0

📲 What

For some projects (at least one late pledge project on the confirm details screen), shipping information is missing from the pledge summary table. The total is still correct (includes the shipping).

🤔 Why

For projects that have shipping and have been active already, and since the pledge total includes this amount, we need to show shipping info in the summary tables.

🛠 How

When creating the rewards summary table we have a condition that, If the flag is off, we hide shipping info.

We should update this condition to only hide shipping for projects that don’t have shipping data or if shipping is 0 as it will be for new projects that are created during this estimated shipping rollout.

👀 See

Project the bug was found in (now shows shipping) New projects with the flag on (continues to hide shipping)
Simulator Screen Recording - iPhone 15 Pro 17 5 - 2024-09-03 at 12 43 38 Simulator Screen Recording - iPhone 15 Pro 17 5 - 2024-09-03 at 12 47 04

✅ Acceptance criteria

  • Shipping shows for projects that have project shipping data
  • Shipping is hidden for projects that don’t have shipping data or if shipping is 0 as it will be for new projects that are created during this estimated shipping rollout

@scottkicks scottkicks marked this pull request as ready for review September 3, 2024 20:42
Copy link
Contributor

@ifosli ifosli left a comment

Choose a reason for hiding this comment

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

Just a little style thing that'd be nice to fix but otherwise looks good!

if featureNoShippingAtCheckout() == false {
// MARK: Shipping
if let shipping = data.shipping {
if shipping.total > 0 {
Copy link
Contributor

Choose a reason for hiding this comment

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

nit: This is a little nicer to read if you do if let shipping = data.shipping, shipping.total > 0 { instead of nesting two ifs.

@scottkicks scottkicks merged commit 15ffdd8 into main Sep 5, 2024
5 checks passed
@scottkicks scottkicks deleted the scott/mbl-1680/shipping-info-missing branch September 5, 2024 16:30
ifosli pushed a commit that referenced this pull request Sep 5, 2024
* only hide shipping from summary table if there is no shipping data or if the shipping total is 0

* simplify conditional
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants