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

Discount summary card parity #20

Merged
merged 3 commits into from
Jul 4, 2022
Merged

Discount summary card parity #20

merged 3 commits into from
Jul 4, 2022

Conversation

knames
Copy link
Contributor

@knames knames commented Jun 28, 2022

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

@knames knames marked this pull request as ready for review June 28, 2022 23:36
@knames knames requested a review from a team June 28, 2022 23:36
added translations and update to include end date === today

lint fixes

isostring instead of toString()
Copy link
Contributor

@lhoffbeck lhoffbeck left a comment

Choose a reason for hiding this comment

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

Code and tophat with yarn storybook looks good :)

Screen Shot 2022-06-29 at 9 10 21 AM

Copy link
Contributor

@carrotderek carrotderek left a comment

Choose a reason for hiding this comment

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

👍🏼

@knames
Copy link
Contributor Author

knames commented Jun 29, 2022

/shipit

@lone-star
Copy link
Contributor

👍
@knames it has to be merged manually

@knames knames merged commit f3bdf07 into main Jul 4, 2022
@knames knames deleted the ks-discount-summary-card branch July 4, 2022 23:20
@shopify-shipit shopify-shipit bot temporarily deployed to package August 29, 2022 18:12 Inactive
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.

None yet

4 participants