-
Notifications
You must be signed in to change notification settings - Fork 8.2k
refactor: Simplify file upload components and bump to v1.7.2 #11151
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
…rs when truncating file names
…better readability and maintainability - Remove redundant comments and imports. - Normalize path handling to ensure compatibility across platforms.
…icatedImageProps interface to encapsulate it within the module
|
Important Review skippedAuto reviews are disabled on base/target branches other than the default branch. Please check the settings in the CodeRabbit UI or the You can disable this status message by setting the ✨ Finishing touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
Codecov Report❌ Patch coverage is ❌ Your project status has failed because the head coverage (39.97%) is below the target coverage (60.00%). You can increase the head coverage or adjust the target coverage. Additional details and impacted files@@ Coverage Diff @@
## release-1.7.1 #11151 +/- ##
=================================================
+ Coverage 33.22% 33.27% +0.05%
=================================================
Files 1370 1368 -2
Lines 64073 64096 +23
Branches 9418 9424 +6
=================================================
+ Hits 21287 21329 +42
+ Misses 41735 41714 -21
- Partials 1051 1053 +2
Flags with carried forward coverage won't be shown. Click here to find out more.
🚀 New features to boost your workflow:
|
This pull request contains a version bump and dependency updates for both the backend and frontend, as well as significant refactoring and cleanup of file upload and file input components in the frontend. The changes improve modularity, enable easier customization, and fix path handling for file storage. Below are the most important changes, grouped by theme.
Frontend Refactoring and Customization:
customUsePostUploadFilehook, replacing direct imports ofusePostUploadFileinInputFileComponentandIOFileInputfor improved customization and separation of concerns. (src/frontend/src/components/core/parameterRenderComponent/components/inputFileComponent/index.tsx,src/frontend/src/modals/IOModal/components/IOFieldView/components/file-input.tsx,src/frontend/src/customization/hooks/use-custom-upload-file-v1.ts, [1] [2] [3] [4]custom-input-file,custom-chat-input,custom-file-card,custom-file-input,custom-use-file-handler) to simplify the codebase and reduce maintenance overhead. (src/frontend/src/customization/components/custom-input-file.tsx,src/frontend/src/customization/components/custom-chat-input.tsx,src/frontend/src/customization/components/custom-file-card.tsx,src/frontend/src/customization/components/custom-file-input.tsx,src/frontend/src/customization/hooks/use-custom-use-file-handler.ts, [1] [2] [3] [4] [5]ParameterRenderComponentto use the standardInputFileComponentdirectly instead of a custom wrapper, aligning with the new refactoring. [1] [2]CustomAuthenticatedImagecomponent for customizable authenticated image rendering.Backend Improvements:
parse_file_pathmethod inLocalStorageto usepathlib.Pathfor robust, cross-platform file path handling, making file storage more reliable and Windows-compatible. [1] [2]Dependency and Version Updates:
langflowto 1.7.2,langflow-baseto 0.7.2) and updated dependencies (langflow-base,lfx) to their latest compatible versions. [1] [2] [3] [4] [5] [6]package-lock.jsonby removing some unused dependencies, reflecting the frontend refactoring. [1] [2]Other Notable Changes:
.cursor/DEVELOPMENT_RULE.mdfile outlining detailed development guidelines, best practices, and code quality standards for the project.IOFileInputby retrieving images as blobs via the API, ensuring proper authentication and error handling.These changes collectively improve maintainability, modularity, and reliability of file handling and customization throughout the codebase.