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.
Update SummaryCard to maintain parity with Web's version, please see HERE for a the original PR
Resolves https://github.com/Shopify/core-issues/issues/40714
Original ticket
https://github.com/Shopify/core-issues/issues/4198
I tried to use
yalc
to swap out Discount/...SummaryCard
but there's some type issues that I don't think are worth resolving until we switch from using the web counterparts to using the actual DiscountAppComponent library, so there's no Tophat link, but the tests are passing and look at the string, so we're gucci there IMO.Copied from the other PR (and removed the irrelevant stuff (not able to tophat these changes))
What problem is this PR solving?
Fixes https://github.com/Shopify/core-issues/issues/4198
The discount details summary card should now use "today" for the end date of a discount if the discount ends today.
Until Extensible Discounts are enabled, this logic will only be active if the current shop has the
new_discounts_ui
beta flag enabled.Removed tophat bits, see original PR in web for details, but not relevant.
What is the impact of this PR?
On Merchants
Makes the case where view a discount's details when its end date is today on a discount more consistent with how we show durations in other places in Shopify.
On Shopify
Negligible impact -- only a very minor cosmetic change to discount details.
Before you deploy