Skip to content

Conversation

@giurigaud
Copy link

@giurigaud giurigaud commented Dec 2, 2025

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.

image (3)

How to test it?

•	The user uploads the file in the Quick Order interface.
•	After the upload is completed, the Search button becomes enabled.
•	The user clicks the Search button to start processing.
•	The system begins processing the file data.
•	The Dropdown enters a loading state.
•	Even while loading, the Dropdown can be closed without interrupting the processing.
•	Once processing is finished, the system automatically opens the Quick Order Drawer.

Starters Deploy Preview

References

Figma

Checklist

You may erase this after checking them all 😉

PR Title and Commit Messages

  • PR title and commit messages follow the Conventional Commits specification
    • Available prefixes: feat, fix, chore, docs, style, refactor, ci and test

PR Description

  • Added a label according to the PR goal - breaking change, bug, contributing, performance, documentation..

Dependencies

  • Committed the pnpm-lock.yaml file when there were changes to the packages

Documentation

  • PR description
  • For documentation changes, ping @Mariana-Caetano to review and update (Or submit a doc request)

@giurigaud giurigaud requested a review from a team as a code owner December 2, 2025 21:25
@giurigaud giurigaud requested review from lariciamota and lemagnetic and removed request for a team December 2, 2025 21:25
@giurigaud giurigaud changed the title Be 72 BE-72 Dec 2, 2025
@giurigaud giurigaud changed the title BE-72 feat: BE-72 Dec 2, 2025
@codesandbox-ci
Copy link

codesandbox-ci bot commented Dec 3, 2025

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.

Copy link

@raabelo raabelo left a 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.

@ArthurTriis1
Copy link
Contributor

Pode mudar o nome do PR para que a funcionalidade desenvolvida seja referenciada?

}

const QuickOrderDrawerFooter = ({ formatter }: QuickOrderDrawerFooterProps) => {
const [loading, _setLoading] = useState(false)
Copy link
Contributor

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

Copy link
Collaborator

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)
Copy link
Contributor

Choose a reason for hiding this comment

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

Aqui também

Copy link
Collaborator

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.

@ArthurTriis1
Copy link
Contributor

No storybook esse componente só parece ter o tamanho total quando a tela fica em tamanho mobile, pode averiguar?

Copy link
Contributor

@ArthurTriis1 ArthurTriis1 left a 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

@giurigaud giurigaud changed the title feat: BE-72 feat: Criaçao do Quick Order Drawer Dec 10, 2025
[data-fs-badge-wrapper] {
background-color: var(--fs-qod-badge-success-bkg-color);

/* border-color: var(--fs-badge-success-border-color); */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/* 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); */
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
/* border-color: var(--fs-badge-success-border-color); */

}

const QuickOrderDrawer = ({
testId = 'fs-qod',
Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change
testId = 'fs-qod',
testId = 'fs-quick-order-drawer',

Comment on lines +44 to +45
size="partial"
direction="rightSide"
Copy link
Contributor

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

Suggested change
size="partial"
direction="rightSide"
size={size}
direction={direction}

const { itemsCount, totalPrice } = useQuickOrderDrawer()

return (
<div data-fs-qod-footer>
Copy link
Contributor

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>
Copy link
Contributor

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

Copy link
Contributor

Choose a reason for hiding this comment

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

Suggested change

if (onAddToCartCallback) {
onAddToCartCallback(productsToAdd, totalPrice, itemsCount)
} else {
console.log('Adding to cart:', {
Copy link
Contributor

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

Copy link
Contributor

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
Copy link
Contributor

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?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

8 participants