feat(frontend): support drag-and-drop upload with reusable file dropzone#609
feat(frontend): support drag-and-drop upload with reusable file dropzone#609yiboyasss wants to merge 4 commits into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a reusable FileDropzone component to consolidate and simplify file drag-and-drop functionality across the application, replacing duplicate drag-and-drop event handling in both the home page and the main chat input component. The review feedback highlights layout issues caused by the new wrapper div in FileDropzone stretching unexpectedly. To resolve this, the reviewer suggests adding support for a className prop on the FileDropzone component and applying appropriate width constraints (max-w-[780px] w-full and w-full) where it is integrated.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request refactors the file drag-and-drop functionality by introducing a reusable FileDropzone component and integrating it into both the home page and the chat input component, which simplifies state management and removes duplicate event-handling code. The review feedback highlights two important improvements for the new FileDropzone component: first, always call preventDefault() and stopPropagation() on drop events even when the component is disabled to prevent accidental browser navigation; second, add a useEffect hook to reset the dragging state if the component becomes disabled during an active drag operation.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
|
/gemini review |
There was a problem hiding this comment.
Code Review
This pull request introduces a reusable FileDropzone component to encapsulate drag-and-drop file upload logic, replacing duplicate custom implementations in the Home and ChatInput pages. Feedback on the new component suggests wrapping the resetDragState function in React.useCallback to prevent dependency issues in useEffect, and ensuring that drag-and-drop events are not intercepted when the dropzone is disabled.
Important
The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.
No description provided.