-
Notifications
You must be signed in to change notification settings - Fork 63
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
base: main
Are you sure you want to change the base?
feat: search product item control #2543
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
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
question: Should the product item be clickable in the list? (keeping the previous behaviour, click and go to the product page) |
packages/components/src/molecules/SearchProducts/SearchProductItemControl.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/molecules/SearchProducts/SearchProductItemControl.tsx
Show resolved
Hide resolved
packages/components/src/molecules/SearchProducts/SearchProductItemControl.tsx
Outdated
Show resolved
Hide resolved
packages/ui/src/components/molecules/SearchProducts/styles.scss
Outdated
Show resolved
Hide resolved
packages/ui/src/components/molecules/SearchProducts/styles.scss
Outdated
Show resolved
Hide resolved
packages/ui/src/components/molecules/SearchProducts/styles.scss
Outdated
Show resolved
Hide resolved
packages/ui/src/components/molecules/SearchProducts/styles.scss
Outdated
Show resolved
Hide resolved
packages/ui/src/components/molecules/SearchProducts/styles.scss
Outdated
Show resolved
Hide resolved
packages/components/src/molecules/SearchProducts/SearchProductItemControl.tsx
Outdated
Show resolved
Hide resolved
) { | ||
const [statusAddToCart, setStatusAddToCart] = | ||
useState<StatusButtonAddToCartType>('default') | ||
function stopPropagationClick(e: MouseEvent) { |
There was a problem hiding this comment.
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)
There was a problem hiding this comment.
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).
packages/components/src/molecules/SearchProducts/SearchProductItemControl.tsx
Outdated
Show resolved
Hide resolved
packages/components/src/molecules/SearchProducts/SearchProductItemControl.tsx
Show resolved
Hide resolved
Co-authored-by: Fanny Chien <[email protected]>
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/orSKUMatrix
.The SearchProductItemControl will receive several props. Among them is
skuMatrixControl
, which will be responsible for rendering theSKUMatrix
.Printscreens
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.