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

feat(core): add tax total in checkout summary #731

Merged
merged 2 commits into from
Apr 4, 2024
Merged

feat(core): add tax total in checkout summary #731

merged 2 commits into from
Apr 4, 2024

Conversation

jorgemoya
Copy link
Contributor

What/Why?

Add total tax from checkout.

Screenshot 2024-04-04 at 10 25 20 AM

Testing

Locally.

@jorgemoya jorgemoya requested a review from a team as a code owner April 4, 2024 15:25
Copy link

changeset-bot bot commented Apr 4, 2024

🦋 Changeset detected

Latest commit: cecbc66

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@bigcommerce/catalyst-core Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Apr 4, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
catalyst-latest ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 3:38pm
catalyst-testbed ✅ Ready (Inspect) Visit Preview 💬 Add feedback Apr 4, 2024 3:38pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
catalyst-1millionproducts-store ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 3:38pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 3:38pm
catalyst-storybook ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 3:38pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Apr 4, 2024 3:38pm

@@ -47,6 +47,11 @@ export const CheckoutSummary = async ({ cartId, locale }: { cartId: string; loca
<span>-{currencyFormatter.format(checkout.cart?.discountedAmount.value || 0)}</span>
</div>

<div className="flex justify-between border-t border-t-gray-200 py-4">
<span className="font-semibold">{t('tax')}</span>
<span>{currencyFormatter.format(checkout.taxTotal?.value || 0)}</span>
Copy link
Contributor

Choose a reason for hiding this comment

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

🍹 Curious why taxTotal can be missing here. The fallback of 0 seems reasonable but if it represents a concept of tax not existing at all I wonder if it's more appropriate to not show the tax field at all. (not a blocker at all for merging though imho)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That is reasonable, I can update and represent this.

Copy link
Contributor

github-actions bot commented Apr 4, 2024

⚡️🏠 Lighthouse report

Lighthouse ran against https://catalyst-latest-8eypupyf0-bigcommerce-platform.vercel.app

🖥️ Desktop

We ran Lighthouse against the changes on a desktop and produced this report. Here's the summary:

Category Score
🟢 Performance 99
🟢 Accessibility 100
🟠 Best practices 78
🟢 SEO 90

📱 Mobile

We ran Lighthouse against the changes on a mobile and produced this report. Here's the summary:

Category Score
🟢 Performance 92
🟢 Accessibility 100
🟠 Best practices 78
🟢 SEO 92

@jorgemoya jorgemoya added this pull request to the merge queue Apr 4, 2024
Merged via the queue into main with commit 41ebe00 Apr 4, 2024
15 checks passed
@jorgemoya jorgemoya deleted the add-tax branch April 4, 2024 15:42
@github-actions github-actions bot mentioned this pull request Apr 4, 2024
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.

2 participants