-
Notifications
You must be signed in to change notification settings - Fork 80
feat: quick order upload integration #3158
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
Conversation
- Introduced `FileUploadCard` for file selection and upload functionality, including drag-and-drop support. - Added `FileUploadStatus` to display upload progress and error handling. - Updated index files to export new components and types. - Enhanced `SearchInputField` to include an attachment button that triggers the file upload card. - Added styles for both new components to ensure proper UI integration.
…d template generation
…parsing implementation
…feat/quick-order-integration
…feat/quick-order-integration
…into feat/quick-order-integration
…feat/quick-order-integration
…eat/quick-order-integration
|
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. |
REGRA.MD
Outdated
| @@ -0,0 +1,167 @@ | |||
| B2B Faststore - Quick Order by File | |||
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.
Remover
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.
Removido!
Untitled
Outdated
| @@ -0,0 +1,2 @@ | |||
| packages: | |||
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.
Acredito que isso tb deve ser removido
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.
Ajustado!
|
Planilha usada para integraçao: |
- Replaced native input elements with custom Input and Button components for consistency. - Simplified accepted file types in FileUploadCard to only '.csv'. - Added TODO comment for file size formatting in FileUploadStatus. - Adjusted SCSS variable formatting for improved readability.
- Updated `useFileUpload` to use `FileRejection` type for better type safety. - Introduced `UploadFileDropdown` component with improved CSV file handling using `useCSVParser` hook. - Simplified error handling and template generation for CSV uploads. - Added lazy loading for `UploadFileDropdown` in `SearchInput` component.
…into feat/quick-order-integration
…d.tsx Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
What's the purpose of this pull request?
This pull request improves the Quick Order drawer experience by fixing CSV file upload error handling, removing leftover debug code, and ensuring the attachment button behavior is fully driven by CMS configuration.
How it works?
The
FileUploadCardcomponent now reacts to thehasErrorprop from its parent via auseEffect.When CSV parsing fails, the upload state is automatically set to
error.Parsing errors are mapped to the
invalid-structureerror type, displaying the message:"Invalid structure. Check missing headers or columns and try again."
Selecting a new file automatically clears the previous error state.
The
SearchInputcomponent now uses theattachmentButtonconfiguration provided by CMS instead of hardcoded values.The attachment button respects the
enabledflag from the Navbar section configuration.Icon and aria-label values are passed dynamically from CMS (
attachmentButtonIconandattachmentButtonAriaLabel).Removed the hardcoded
showAttachmentButton={true}and replaced it with a CMS-driven prop.How to test it?
FileUploadStatuscomponent displays an error state"Invalid structure. Check missing headers or columns and try again."
Expected: The error state is cleared
Starters Deploy Preview
References
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
-[ x] PR description
@Mariana-Caetanoto review and update (Or submit a doc request)