MBL-2971: Adjust logic for determining shipping range string#2481
Merged
MBL-2971: Adjust logic for determining shipping range string#2481
Conversation
|
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2481 +/- ##
============================================
+ Coverage 64.38% 64.42% +0.04%
- Complexity 2427 2432 +5
============================================
Files 385 385
Lines 29190 29195 +5
Branches 4227 4230 +3
============================================
+ Hits 18794 18809 +15
+ Misses 8131 8103 -28
- Partials 2265 2283 +18 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
ecd53f9 to
87e748c
Compare
Arkariang
approved these changes
Mar 5, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📲 What
Specifically, in the rewards carousel, for Rewards that ship worldwide, ensure that the estimated shipping range displayed is based on the selected shipping rule.
🤔 Why
The estimated shipping range string for a collection of Rewards (as this also applies for Add-Ons) is determined by
RewardViewUtils.getEstimatedShippingCostString(). For the rewards carousel, this function is called for each Reward.Currently, for Rewards that ship worldwide, the estimated shipping range is determined purely by the first shipping rule in the
Reward.shippingRuleslist, regardless of any selected shipping rule. (In this workflow,shippingRulesis populated by theReward.simpleShippingRulesExpandedfield from theFetchProjectRewardsQueryquery, the order of which is affected by the shipping rules specified on the Project.)🛠 How
To preserve the existing behavior where needed, update
getEstimatedShippingCostString()to accept a boolean 'flag'forceSelectedShippingRulethat allows worldwide Rewards to be matched against the selected shipping rule.When enabled, the behavior of this function is more aligned with the counterpart functions on iOS (see
estimatedShippingConversionText, which callsestimatedMinMax()).👀 See
📋 QA
Story 📖
[MBL-2971] [Investigate] US-based backer seeing AU/NZ shipping ranges - Jira