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: search product item control #2543

Open
wants to merge 15 commits into
base: main
Choose a base branch
from

Conversation

ramondorosario-ct
Copy link
Collaborator

What's the purpose of this pull request?

This PR is about the creation of a new component for SearchProduct: SearchProductItemControl. Its goal is to display the QuantitySelector and IconButton, while also fitting into the existing structure of SearchProductItem.

The SearchProductItemControl will be part of the implementation of the new "Quick Order" feature, which aims to allow users to place orders quickly and efficiently.

How it works?

The SearchProductItemControl will be used within the SearchProductItemContent. A validation will check whether the QuickOrder feature is enabled or not. If enabled, the SearchProductItemControl will be rendered, maintaining the previous structure with the addition of the controls: QuantitySelector, CartButton, and/or SKUMatrix.

The SearchProductItemControl will receive several props. Among them is skuMatrixControl, which will be responsible for rendering the SKUMatrix.

Printscreens

image

image

ps: the "Select multiple" button is just a regular button used for visualization purposes. Once the SKUMatrix is passed, the SKUMatrix trigger will be displayed.

@ramondorosario-ct ramondorosario-ct requested a review from a team as a code owner November 6, 2024 15:47
@ramondorosario-ct ramondorosario-ct requested review from eduardoformiga and pedromtec and removed request for a team November 6, 2024 15:47
Copy link

vercel bot commented Nov 6, 2024

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

Name Status Preview Comments Updated (UTC)
faststore-site ✅ Ready (Inspect) Visit Preview 💬 Add feedback Nov 22, 2024 1:45pm

Copy link

codesandbox-ci bot commented Nov 6, 2024

This pull request is automatically built and testable in CodeSandbox.

To see build info of the built libraries, click here or the icon next to each commit SHA.

…tex/faststore into feat/search-product-item-control
@HiagoMoreiraCubos HiagoMoreiraCubos self-assigned this Nov 18, 2024
@hellofanny hellofanny added enhancement New feature or request contributing Pull request submitted by the community labels Nov 19, 2024
@hellofanny
Copy link
Contributor

question: Should the product item be clickable in the list? (keeping the previous behaviour, click and go to the product page)

) {
const [statusAddToCart, setStatusAddToCart] =
useState<StatusButtonAddToCartType>('default')
function stopPropagationClick(e: MouseEvent) {
Copy link
Contributor

Choose a reason for hiding this comment

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

question: Should the product item be clickable in the list? (keeping the previous behaviour, click and go to the product page)

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

The previous behavior is being maintained; this method is only being used for cart control. As a result, we have a button inside a link, and when the button is clicked, event propagation occurs (which is why this function was implemented).

Co-authored-by: Fanny Chien <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
contributing Pull request submitted by the community enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants