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-17 at 5 22 28 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: ea74a65

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-b2b Ready Ready Preview, Comment Dec 17, 2025 6:31am
catalyst-canary Ready Ready Preview, Comment Dec 17, 2025 6:31am
2 Skipped Deployments
Project Deployment Review Updated (UTC)
catalyst Ignored Ignored Dec 17, 2025 6:31am
catalyst-uplift-vertex Ignored Ignored Dec 17, 2025 6:31am

@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 +616
<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

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
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.

</button>
</div>
{!!lineItem.inventoryMessages?.outOfStockMessage && (
<span className="text-xs/4 font-light text-red-500">
Copy link
Contributor

Choose a reason for hiding this comment

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

@Tharaae There needs to be a little more space between the number counter and text that may appear below it. Could you please also increase the line-height/leading of the backorder messages too?

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