[Order Details] Display multiple shipping lines in order details #12823
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.
Closes: #12582
⚠️ Based on #12822 ⚠️
Why
This adds support (behind a feature flag) for showing multiple shipping lines in order details.
Previously, we only supported showing the first shipping line on an order. Now, we show a Shipping section with all the shipping lines on an order.
How
HostingConfigurationTableViewCell<Content: View>
view that wraps a SwiftUI view in aUITableViewCell
. This uses aUIHostingConfiguration
instead ofUIHostingController
; it can be used whenHostingTableViewCell<Content: View>
can't be used because the parent view isn't available in the current context.OrderDetailsDataSource
, and configures each row based on the corresponding shipping line on the order.OrderDetailsResultsControllers
to include a shipping methods ResultsController, to fetch the list of shipping methods for the store. This allows us to get the name of the shipping method corresponding to each shipping line on the order.OrderDetailsViewModel
to register the new cell and sync the shipping methods for the store (in case they haven't been synced before).Testing instructions
With the feature flag disabled:
With the feature flag enabled:
Bonus:
Screenshots
RELEASE-NOTES.txt
if necessary.