feat: add drag-and-drop document upload to Files page#7928
Conversation
|
@yazeed1425 you need to fix the DCO issue: |
|
@yazeed1425 could you also provide a screenshot or a short screen recording? |
9fb5255 to
8fde0d9
Compare
Adds drag-and-drop as an additional input method for the existing upload flow on the LibreSign Files page. Dropped files are routed through the same validation, envelope, and upload logic as the existing "Upload" button by extracting a shared RequestPicker.handleFilesSelected() entry point, so there are no separate rules for drag-and-drop vs. click-to-upload. - FilesList.vue gains dragenter/dragover/dragleave/drop handlers on the page content area, with a visual drop-target overlay, gated on the existing canRequestSign permission. - RequestPicker.vue's max-file-uploads and envelope-name-dialog logic is reused as-is; a new guard shows an error when multiple files are dropped while envelopes are disabled (previously unreachable via the single-select file picker, but reachable via drag-and-drop). Closes LibreSign#7926 Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com> Signed-off-by: Yazeed <mnmm623@gmail.com>
8fde0d9 to
2373c02
Compare
|
i fixed the DCO issue and provieded screenshot |
|
@yazeed1425 I was able to reproduce it locally and it worked fine, but it seems to have style issues in your environment. Could you share which browser you’re using, or how you set up your developer environment? |
|
Codecov Report❌ Patch coverage is
... and 171 files with indirect coverage changes 🚀 New features to boost your workflow:
|
|
The screenshots I attached were taken from a temporary local test harness I built to preview the drag-and-drop behavior without a full Nextcloud setup. While testing, I added some cosmetic-only CSS tweaks to that harness (bigger button, custom hover/click colors) just to make it easier to interact with |
Signed-off-by: Vitor Mattos <vitor@php.rio>
|
/backport to stable34 |
|
/backport to stable33 |
|
/backport to stable32 |
|
Thanks for the review and for merging this! Glad to contribute. |
|
Thanks again for your contribution! We are preparing more good first issues and would be happy to have you contribute again. What kind of tasks or technologies would you be interested in working with? Also, how did you find this issue, and how was your experience setting up and testing LibreSign? |
|
Thank you! I really enjoyed working on this PR. I'm currently focusing on Frontend development using React and TypeScript, so I'd love to take on tasks related to UI features or user experience improvements. I found this issue while searching for open-source opportunities on GitHub. Setting up LibreSign and testing it was a smooth experience overall. Looking forward to the new issues! |



Resolves: #7926
📝 Summary
Adds drag-and-drop as an additional input method for the existing upload flow on the LibreSign Files page. Dropped files are routed through the same validation, envelope, and upload logic as the existing "Upload" button by extracting a shared
RequestPicker.handleFilesSelected()entry point, so there are no separate rules for drag-and-drop vs. click-to-upload.FilesList.vuegains dragenter/dragover/dragleave/drop handlers on the page content area, with a visual drop-target overlay, gated on the existingcanRequestSignpermission.RequestPicker.vue's max-file-uploads and envelope-name-dialog logic is reused as-is; a new guard shows an error when multiple files are dropped while envelopes are disabled (previously unreachable via the single-select file picker, but reachable via drag-and-drop).🧪 How to test
Automated coverage:
src/tests/components/Request/RequestPicker.spec.tsandsrc/tests/views/FilesList/FilesList.spec.ts(both envelope-enabled and envelope-disabled scenarios).Note for reviewers: this was verified visually against the real Vue component tree using a temporary local harness with a mocked backend, in addition to the automated test suite. It has not yet been exercised against a live Nextcloud instance — please do a real end-to-end pass before merging.
🎨 UI / Front‑end changes
Added drag-and-drop upload support to the Files page, reusing the existing upload button's validation/envelope/upload logic.
Screenshots before/after (add images or links)
Tested in multiple browsers (Chrome, Firefox, Safari) – optional but appreciated
Components, Unit (with vitest) and/or e2e (with Playwright) tests added - Required
Accessibility verified (contrast, keyboard navigation, screen reader friendly) – if applicable
(Existing keyboard flows are untouched; the drop overlay is
aria-hidden+pointer-events: noneso it can't trap focus or interfere with tab order — but no actual screen-reader pass was done.)Design review approved – optional, link to feedback if available
Documentation updated (if applicable) – docs repository
✅ Checklist
🤖 AI (if applicable)