✨ Introduce product-in-conversation Variant for Inline Product Display#109
Open
cristiantela wants to merge 4 commits into
Open
✨ Introduce product-in-conversation Variant for Inline Product Display#109cristiantela wants to merge 4 commits into
product-in-conversation Variant for Inline Product Display#109cristiantela wants to merge 4 commits into
Conversation
Introduces a new variant that renders products inside the chat conversation with a grid layout, placing the counter controls below the content area. Co-authored-by: Cursor <cursoragent@cursor.com>
Co-authored-by: Cursor <cursoragent@cursor.com>
Applies the className prop to the FSButton path consistently with the section path, removing the hardcoded class from both render branches. Co-authored-by: Cursor <cursoragent@cursor.com>
paulobernardoaf
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Description
Type of Change
Motivation and Context
Products shown directly inside the chat conversation needed a distinct layout from the catalog view — a grid layout that places the image alongside the title/price and moves the add-to-cart control below the content area, making it easier to interact with in a narrow conversation thread.
Additionally, the regular price was being rendered after the sale price, which reversed the expected visual hierarchy (original → discounted).
Summary of Changes
Feature —
product-in-conversationvariant (InlineProduct,ProductCatalog,ShowItems)product-in-conversationvariant toInlineProductthat uses a CSS grid layout: the image spans two rows on the left, the title/price occupy the top-right cell, and the counter/add-to-cart button occupies the bottom-right cell.ProductCatalogItemaccepts a new optionalinConversationboolean prop that switches betweenproductandproduct-in-conversationvariants.ShowItemspassesinConversationtoProductCatalogItemwhen rendering a single product in a conversation message.Fix — price display order (
PriceDisplay)Refactoring — layout config and
classNamepropagation (InlineProduct,CounterControls)PRODUCT_LAYOUTconstant to eliminate the duplication between theproductandproduct-in-conversationvariant configs.className: 'weni-inline-product__counter-controls'intocounterPropsfor product variants (consistent with howcartalready handles it), and removed the class that was hardcoded directly insideCounterControls.classNameprop to theFSButtonrender path inCounterControls— previously it was silently ignored when the component rendered as a button instead of a stepper.Demonstration