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

refactore(core): checkout summary #711

Merged
merged 4 commits into from
Mar 28, 2024
Merged

refactore(core): checkout summary #711

merged 4 commits into from
Mar 28, 2024

Conversation

jorgemoya
Copy link
Contributor

@jorgemoya jorgemoya commented Mar 26, 2024

What/Why?

Refactor checkout summary to:

  1. Get price summary from checkout field (including subtotal + grand total).
  2. Pre-fill shipping address data if available.
  3. Remove cookie usage.

How

  • Get checkout summary from checkout field in GQL (getCheckout query).
  • Invalidate checkout when necessary.
  • No longer using cookies to store values.
  • Moved files to _components in /cart (unfortunately git didn't match the moves).
  • Removed unnecessary data from mutations.
  • Updating the product quantity still removes the current consignment.
Kapture.2024-03-26.at.16.57.02.mp4

Testing

Locally.

@jorgemoya jorgemoya requested a review from a team as a code owner March 26, 2024 21:58
Copy link

changeset-bot bot commented Mar 26, 2024

🦋 Changeset detected

Latest commit: 9055cbb

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 Mar 26, 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 Mar 28, 2024 8:06pm
4 Ignored Deployments
Name Status Preview Comments Updated (UTC)
catalyst-1millionproducts-store ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2024 8:06pm
catalyst-au ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2024 8:06pm
catalyst-storybook ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2024 8:06pm
catalyst-uk ⬜️ Ignored (Inspect) Visit Preview Mar 28, 2024 8:06pm

Copy link
Contributor

⚡️🏠 Lighthouse report

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

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

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

Comment on lines 16 to 17
const checkout = await getCheckout(cartId);
const shippingCountries = await getShippingCountries();
Copy link
Member

Choose a reason for hiding this comment

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

🍹 Promise.all

@jorgemoya jorgemoya added this pull request to the merge queue Mar 28, 2024
Merged via the queue into main with commit 0ec2269 Mar 28, 2024
11 checks passed
@jorgemoya jorgemoya deleted the refactor-shipping branch March 28, 2024 20:29
This was referenced Mar 28, 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.

3 participants