-
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 control implementations #2547
base: feat/quick-order
Are you sure you want to change the base?
feat: search product control implementations #2547
Conversation
…tex/faststore into feat/search-product-item-control
The latest updates on your projects. Learn more about Vercel for Git ↗︎
|
packages/core/src/components/search/SearchProductItem/SearchProductItem.tsx
Outdated
Show resolved
Hide resolved
Achei um comportamento esquisito nos meus testes, estou usando esse preview para eles. Quando faço uma pesquisa na home o nome dos produtos retornados na pesquisa não são os mesmos que temos na loja, exemplo: Além disso nas PDPs o |
Fiz os ajustes, da um confere nesse preview: https://starter-jlb8rn4wd-vtex.vercel.app/ |
@ramondorosario-ct testing the latest preview release you sent I noticed this Screen.Recording.2025-01-29.at.17.10.00.mov |
isVariantOf: { name }, | ||
unitMultiplier, |
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.
There are unavailable attributes from this fragment, causing the Property does not exist on type 'ProductSummary_ProductFragment'
error.
All the attributes being used here should be added in the ProductSummary_product
fragment and generate the GraphQL typings again:
- Add the missing attributes to the
ProductSummary_product
fragment; - Run
yarn generate:codegen
on the@faststore/core
package
)} | ||
</> | ||
) | ||
}, [quickOrder?.enabled]) |
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.
Typescript will complain about the quickOrder
variable not being used inside the useCallback
scope. Maybe by creating a function outside of the SearchProductItemContent
scope can solve this, because the conditions at lines 60 and 62 will already prevent the unexpected re-renderings.
}, [statusAddToCart]) | ||
|
||
const showSKUMatrixControl = availability && hasVariants | ||
const isMobile = window.innerWidth <= 768 |
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.
Here we can use this value from useScreenResize
hook instead.
What's the purpose of this pull request?
This PR is about the implementation of the
Quick Order
feature. Two other PRs were created, one related to the new SearchProductItemControl component and another handling all the typing.In this PR, the new component, typing, and some logic related to the overall implementation of the feature are brought together. A small adjustment was also made to the useBuyButton hook to prevent the
SliderOver
from opening when an item is added to the cart.Attention This PR has dependencies on PRs: #2543 and #2546.
ps: Once PR #2543 is merged, the number of changes in this PR will decrease.
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.