-
Notifications
You must be signed in to change notification settings - Fork 168
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
Fix drag and drop upload when a file is selected #7036
Conversation
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.
Can't test properly with broken oCIS, trying with oc10 now. Do have some questions already
@@ -181,7 +181,9 @@ export default defineComponent({ | |||
}, | |||
|
|||
showActions() { |
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.
I was most likely involved in settings this up, but having a v-if on the wrapping div in a component seems like an antipattern versus having the parent component define whether the child should get rendered at all (I may miss the whole upload logic being handled here, maybe that needs to happen individually?)
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.
I know 😞 Hence my note in the initial post, this is the "Easy-but-not-so-nice"-solution. Moving the upload logic is probably nicer but also way more complicated. But if we all decide to go this way, I'll rework this PR.
@@ -4,6 +4,7 @@ | |||
:has-bulk-actions="true" | |||
:breadcrumbs="breadcrumbs" | |||
:breadcrumbs-context-actions-items="[currentFolder]" | |||
:show-actions-on-selection="true" |
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.
How haven't we realized this wasn't the case before? 🤔
@@ -4,6 +4,7 @@ | |||
:has-bulk-actions="true" | |||
:breadcrumbs="breadcrumbs" | |||
:breadcrumbs-context-actions-items="[currentFolder]" | |||
:show-actions-on-selection="true" |
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.
How haven't we realized this wasn't the case before? 🤔
@@ -181,7 +181,9 @@ export default defineComponent({ | |||
}, | |||
|
|||
showActions() { |
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.
I was most likely involved in settings this up, but having a v-if on the wrapping div in a component seems like an antipattern versus having the parent component define whether the child should get rendered at all (I may miss the whole upload logic being handled here, maybe that needs to happen individually?)
d1ddf37
to
44bb716
Compare
Kudos, SonarCloud Quality Gate passed! |
As discussed in chat: I'm merging this with the "easy solution" for now. See #7062 for the follow-up. |
Description
We've fixed a bug where uploading via drag and drop wouldn't work if one or more files were selected. This happened because the
CreateAndUpload
component was destroyed on a file selection.This is the "easy" solution to the problem. Another, more complex solution would be to move all that upload logic from the
CreateAndUpload
component to somewhere else (useUploadHelpers
composable e.g.) and initialize the Dropzone in file list directly. That would require quite some work though.Related Issue
Types of changes