Skip to content

Conversation

@NeoIsRecursive
Copy link
Collaborator

Drag and drop uploads doesn't work as they should, this PR adds some styles to it aswell (how good it works i do not know)

@NeoIsRecursive NeoIsRecursive requested a review from Copilot May 28, 2025 12:47
Copy link
Contributor

Copilot AI left a 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 fixes issues with drag-and-drop uploads by updating the Upload component’s structure and integrating a new drop zone element while also adding supporting styles and event handlers.

  • Modified Upload.vue to separate the browse and dropzone elements and added drag event listeners
  • Updated Backup.vue to include an element with the id "statamic-backup" that serves as the drop container

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
client/src/components/Upload.vue Updated drag-and-drop logic and DOM element assignments
client/src/components/Backup.vue Added an id to the container to serve as the dropzone

@NeoIsRecursive NeoIsRecursive requested a review from Copilot May 28, 2025 12:53
Copy link
Contributor

Copilot AI left a 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 aims to restore and style drag-and-drop uploads by adding a persistent dropzone wrapper, a drag notification overlay, and wiring up drag/drop events.

  • Moved the dropzone wrapper out of the original v-if so it’s always present for event binding.
  • Introduced a .drag-notification overlay that appears while dragging files.
  • Added dragenter/leave/drop event listeners and updated Resumable.js assignments to target the new wrapper.

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 4 comments.

File Description
client/src/components/Upload.vue Restructured dropzone wrapper, added drag-notification markup/styles, event listeners, and Resumable.js assign/unassign logic.
client/src/components/Backup.vue Wrapped content in a div with id="statamic-backup" for the drop target.
Comments suppressed due to low confidence (1)

client/src/components/Backup.vue:2

  • [nitpick] Using a generic id can lead to conflicts if multiple backup components are rendered. Consider a more specific or dynamic identifier or rely on $refs to scope the drop target.
<div class="relative" id="statamic-backup">

@NeoIsRecursive NeoIsRecursive marked this pull request as ready for review May 28, 2025 12:57
@NeoIsRecursive NeoIsRecursive deleted the fix/drag-and-drop-uploads branch August 27, 2025 09:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants