-
-
Notifications
You must be signed in to change notification settings - Fork 148
Show warning for folder uploads + clarify docs #2022
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: main
Are you sure you want to change the base?
Show warning for folder uploads + clarify docs #2022
Conversation
918a270 to
6a93b00
Compare
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.
Pull request overview
This PR improves the user experience around folder uploads by adding a client-side warning when folders are dropped into the upload area and documenting that folders are not supported.
- Added folder detection in the drag-and-drop handler with a warning notification
- Updated documentation to explicitly state that folders/directories cannot be uploaded
- Applied code formatting improvements (arrow functions, consistent quotes)
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
scancodeio/static/add-inputs.js |
Detects dropped folders using the File System API and displays a warning message; includes code formatting improvements |
docs/inputs.rst |
Adds a note explaining that folders are not supported and users should upload archives instead |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> Signed-off-by: Muhammad Abdullah Shahid <108458621+abdollahShahid@users.noreply.github.com>
4f057c9 to
1433bff
Compare
|
All commits are signed-off (DCO ✅). Waiting for workflow approvals / CI to complete. Thanks! |
Summary:
This PR clarifies that uploading folders/directories is not supported and improves UX by showing a warning when a user drops a folder into the upload area.
Changes:
docs/inputs.rstexplaining that directories are not supported and archives should be uploaded instead.add-inputs.jsand display a warning message suggesting uploading a.zipor.tar.gz.Why:
Dragging and dropping a folder currently appears to hang or does nothing, which is confusing. This provides immediate feedback and points users to the supported approach.
How tested:
Fixes #573