-
Notifications
You must be signed in to change notification settings - Fork 80
feat: Criaçao do Quick Order Drawer #3140
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
base: feat/quick-order-by-file-feature-branch
Are you sure you want to change the base?
feat: Criaçao do Quick Order Drawer #3140
Conversation
|
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. |
raabelo
left a comment
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.
Consider improving the PR description to make the code review easier and to support the documentation of the implemented components/code.
|
Pode mudar o nome do PR para que a funcionalidade desenvolvida seja referenciada? |
| } | ||
|
|
||
| const QuickOrderDrawerFooter = ({ formatter }: QuickOrderDrawerFooterProps) => { | ||
| const [loading, _setLoading] = useState(false) |
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.
Esse estado parece nunca estar mudando
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.
Eles nao estao mudando ainda pois não há integração. Acredito que a Giu/Renato tenham deixado pronto para quando houver a integraçao.
| columns, | ||
| formatter, | ||
| }: QuickOrderDrawerProductsProps) => { | ||
| const [loading, _setLoading] = useState(false) |
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.
Aqui também
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.
Eles nao estao mudando ainda pois não há integração. Acredito que a Giu/Renato tenham deixado pronto para quando houver a integraçao.
|
No storybook esse componente só parece ter o tamanho total quando a tela fica em tamanho mobile, pode averiguar? |
ArthurTriis1
left a comment
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.
Deixei alguns pontos ao longo do PR
| [data-fs-badge-wrapper] { | ||
| background-color: var(--fs-qod-badge-success-bkg-color); | ||
|
|
||
| /* border-color: var(--fs-badge-success-border-color); */ |
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.
| /* border-color: var(--fs-badge-success-border-color); */ |
| [data-fs-badge-wrapper] { | ||
| background-color: var(--fs-qod-badge-warning-bkg-color); | ||
|
|
||
| /* border-color: var(--fs-badge-success-border-color); */ |
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.
| /* border-color: var(--fs-badge-success-border-color); */ |
| } | ||
|
|
||
| const QuickOrderDrawer = ({ | ||
| testId = 'fs-qod', |
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.
| testId = 'fs-qod', | |
| testId = 'fs-quick-order-drawer', |
| size="partial" | ||
| direction="rightSide" |
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.
sugestão: receber como props size/direction tb, pode ter esses valores como default, mas pode ser interessante permitir a customização simples desses valores através do CMS
| size="partial" | |
| direction="rightSide" | |
| size={size} | |
| direction={direction} |
| const { itemsCount, totalPrice } = useQuickOrderDrawer() | ||
|
|
||
| return ( | ||
| <div data-fs-qod-footer> |
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.
Mudar os data attr que têm qod para quick-order-drawer mesmo (nesse e nos outros arquivos)
| return ( | ||
| <div data-fs-qod-footer> | ||
| <div data-fs-qod-footer-price-container> | ||
| <span>{itemsCount} items</span> |
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.
Adicionar as mensagens hard coded para receber como props para poder serem configuradas via CMS. Nesse arquivo tem essa, a do aria-label e do add to cart, por exemplo.
|
|
||
| export interface VariationProductColumn { | ||
| name: string | ||
|
|
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.
| if (onAddToCartCallback) { | ||
| onAddToCartCallback(productsToAdd, totalPrice, itemsCount) | ||
| } else { | ||
| console.log('Adding to cart:', { |
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.
Não entendi esse console.log
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.
Tb n! Removi kk
| > | ||
| <TableCell data-fs-qod-cell="product" align="left"> | ||
| <div data-fs-qod-table-cell-img-container> | ||
| <img |
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.
Algum motivo para não usar nosso componente Image?
What's the purpose of this pull request?
This PR refers to the creation of the Quick Order Drawer, a new component developed for the Quick Order By File functionality.
The main advantage of the Quick Order functionality is the ability to add products directly to the cart from the search, which significantly reduces the number of clicks and browsing time.
How it works?
Creating the Quick Order Drawer layout according to Figma.
How to test it?
Starters Deploy Preview
References
Figma
Checklist
You may erase this after checking them all 😉
PR Title and Commit Messages
feat,fix,chore,docs,style,refactor,ciandtestPR Description
breaking change,bug,contributing,performance,documentation..Dependencies
pnpm-lock.yamlfile when there were changes to the packagesDocumentation
@Mariana-Caetanoto review and update (Or submit a doc request)