Skip to content

Conversation

@Tharaae
Copy link
Contributor

@Tharaae Tharaae commented Dec 11, 2025

What/Why?

Add ready-to-ship quantity, backordered quantity, full/partial out-of-stock messages to cart line items on cart page.

Testing

Screenshots
Screenshot 2025-12-29 at 12 12 41 pm

Migration

While rebasing, there might be some conflicts if there is some custom styling on cart page. Those conflicts may occur in the following files:

  • core/vibes/soul/sections/cart/client.tsx

@Tharaae Tharaae requested a review from a team as a code owner December 11, 2025 08:48
@changeset-bot
Copy link

changeset-bot bot commented Dec 11, 2025

🦋 Changeset detected

Latest commit: fa85981

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 Minor

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

@vercel
Copy link

vercel bot commented Dec 11, 2025

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Review Updated (UTC)
catalyst Ready Ready Preview, Comment Dec 30, 2025 11:41pm
catalyst-b2b Ready Ready Preview, Comment Dec 30, 2025 11:41pm
catalyst-canary Ready Ready Preview, Comment Dec 30, 2025 11:41pm
1 Skipped Deployment
Project Deployment Review Updated (UTC)
catalyst-uplift-vertex Ignored Ignored Dec 30, 2025 11:41pm

@Tharaae
Copy link
Contributor Author

Tharaae commented Dec 11, 2025

The failing type check is temporary because this storefront PR did not hit production yet.


const formattedLineItems = lineItems.map((item) => {
if (item.__typename === 'CartGiftCertificate') {
const formattedLineItems = await Promise.all(

Choose a reason for hiding this comment

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

This is quite a large method, maybe we can refactor this into smaller utils that are easier to follow and read.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Actually, the Promise.all() is not needed anymore as we now get all the data we want from the line item data.

@Tharaae
Copy link
Contributor Author

Tharaae commented Dec 17, 2025

Already reviewed by UI/design team, and their comments are applied.

Copy link
Contributor

@matthewvolk matthewvolk left a comment

Choose a reason for hiding this comment

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

Quick comment and a question 👍

Comment on lines 610 to 621
<Plus
className={clsx(
'text-[var(--cart-counter-icon,hsl(var(--contrast-300)))] transition-colors duration-300',
)}
size={18}
strokeWidth={1.5}
/>
Copy link
Contributor

Choose a reason for hiding this comment

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

Is it intentional for the "Plus" button to be missing the hover: style changes like the "Minus" button has?

Copy link
Contributor Author

@Tharaae Tharaae Dec 29, 2025

Choose a reason for hiding this comment

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

Actually no ... it was a change to be reversed but was not fully done. I changed it back.

Copy link
Contributor

Choose a reason for hiding this comment

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

The only question I have left here is related to the screenshot from your PR desc:
Screenshot 2025-12-17 at 1 33 03 PM

If I have 4 in my cart, but only 3 are available in the store (where 1 is ready to ship, and 2 will be on backorder), what happens to the 4th item unaccounted for in the backorder messaging? Is the intent that clicking "Proceed to checkout" will return an error?

Copy link
Contributor Author

@Tharaae Tharaae Dec 29, 2025

Choose a reason for hiding this comment

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

Is the intent that clicking "Proceed to checkout" will return an error?

Yes. This is highlighting the error for the shopper to fix before "proceed to checkout". If they didn't fix the quantities, they will get the error of they attempt to checkout. I also changed the counter border color in case of quantity error to highlight the error (as in the updated screenshot in the PR description).

Copy link
Collaborator

@migueloller migueloller left a comment

Choose a reason for hiding this comment

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

I have two minor comments. Thanks!

Comment on lines +230 to +232
defaultOutOfStockMessage
showOutOfStockMessage
showBackorderMessage
Copy link
Collaborator

Choose a reason for hiding this comment

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

Out of curiosity, are these messages translated?

Choose a reason for hiding this comment

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

Yes, the admin setup is still in progress. As part of the final definition of done, the messages will be translated in the inventory service via the unified translations API.

/>
</button>
</div>
{!!lineItem.inventoryMessages?.outOfStockMessage && (
Copy link
Collaborator

Choose a reason for hiding this comment

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

Instead of coercing to a boolean with !! can we do != null? That would be more consistent with the rest of the codebase.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Done

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.

6 participants