Skip to content
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

[DragAndDropFileUploader]: "click to upload" not working #4899

Closed
abbeyhrt opened this issue Dec 17, 2019 · 14 comments · Fixed by #4936
Closed

[DragAndDropFileUploader]: "click to upload" not working #4899

abbeyhrt opened this issue Dec 17, 2019 · 14 comments · Fixed by #4936

Comments

@abbeyhrt
Copy link
Contributor

The drag and drop file uploader isn't fully functional in the react storybook. If you go here, you can drag and drop files to upload but the "click to upload" function doesn't seem to be working.

@Georgegriff
Copy link

glad someone else had this problem not just me, for now we'll just roll back our carbon upgrade, any idea what version this regressed in?

@Georgegriff
Copy link

Found it, aa46d5d#diff-ce0edbf1b641b96f453e0a6b6277bb31 Variable declared above the drop if statement, so when not dragging and dropping it fails

@asudoh
Copy link
Contributor

asudoh commented Dec 23, 2019

Great catch @Georgegriff!

@zbeedatm
Copy link

zbeedatm commented Jan 5, 2020

Hi,
Can you please give more insight about how to proceed?
I tried:

  1. Rolling back to previous release but problem still exist
  2. Taking the fix (from: https://github.com/carbon-design-system/carbon/pull/4936/files) and applying it manually on the FileUploaderDropContainer.js under my installed node_moules but it didn't help too!

@asudoh
Copy link
Contributor

asudoh commented Jan 6, 2020

@zbeedatm Strange that neither of the approach you described didn't work for you. I imagine your issue can be different from this issue. Would you want to re-create the reduced case, probably incorporating 1. above?

@zbeedatm
Copy link

zbeedatm commented Jan 6, 2020

Sure.
As I mentioned in #4933:

I had this sandbox that the browse functionality working on it:
https://codesandbox.io/s/fragrant-morning-267l5

I forked the same sandbox, but the browse functionality isn't working despite it still working on same version without upgrade:
https://codesandbox.io/s/heuristic-field-w2y75

A new one with the upgrade to 10.9.0:
https://codesandbox.io/s/zealous-dew-thll9

@asudoh
Copy link
Contributor

asudoh commented Jan 6, 2020

At a glance of https://codesandbox.io/s/fragrant-morning-267l5 - What I see are tiles instead of file uploader. Thus I hoped a reduced case is prepared again, or probably an explanation is provided how to get to a file uploader there.

@zbeedatm
Copy link

zbeedatm commented Jan 6, 2020

Oh sorry, just press on the Import Project button
Can we continue our discussion on Slack? I sent you a message there...

@asudoh
Copy link
Contributor

asudoh commented Jan 6, 2020

Thanks. As you know we have a channel for Carbon - Feel free to add more info there!

@asudoh
Copy link
Contributor

asudoh commented Jan 6, 2020

Given https://codesandbox.io/s/fragrant-morning-267l5 has "carbon-components-react": "^7.7.4", I see it got a broken version. Changing ^ to ~ there seems to fix the problem.

@zbeedatm
Copy link

zbeedatm commented Jan 6, 2020

OK that's fixed it (I still don't know what is the different between "^" and "~" btw, but I'll read about it : )

Are you going to give a new release with a fix for this issue soon or had to wait for next release in a month? If it's not going to be during this weak, we will release our product with 7.7.4 instead of 10.9.0

@asudoh
Copy link
Contributor

asudoh commented Jan 6, 2020

Unless you need a particular feature or fix from newer version of Carbon, I think it'll make sense to stay with an older version, especially if newer version breaks a thing.

@zbeedatm
Copy link

zbeedatm commented Jan 6, 2020

One more question, as I mentioned I tried taking the fix of this issue and inserting it manually to my local version of the FileDropContainer.js into node_modules folder, but when loading the application this fix didn't take effect!

Should this hack work? In general I know that it's not a good practice, but I just want to know that the option exists on the table.

Basically, from 10.9.0 I need the feature #4516

@asudoh
Copy link
Contributor

asudoh commented Jan 6, 2020

Probably your code is overridden by NPM/Yarn install? I'd suggest maintaining a copy of Carbon code in your source tree instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants