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

Loading bar does not disappear after uploading file. #1220

Closed
trych opened this issue Nov 26, 2019 · 11 comments · Fixed by #1630
Closed

Loading bar does not disappear after uploading file. #1220

trych opened this issue Nov 26, 2019 · 11 comments · Fixed by #1630

Comments

@trych
Copy link

trych commented Nov 26, 2019

Nature of issue?

  • Found a bug

Details about the bug:

  • Web browser and version: Current Chrome and Firefox
  • Operating System: current macOS
  • Steps to reproduce this bug:

After successfully uploading a file (and having it appear in the sidebar), the loading bar of this upload stays in place instead of disappearing. So I see this and have no feedback, if the upload was successful or is still in progress:

20191126-135915_Screenshot_Finder

@catarak
Copy link
Member

catarak commented Dec 5, 2019

thanks for making this issue! i believe this only happens for certain file types, which are plaintext files (.js, .css, .txt, .csv, etc) that are uploaded directly to the web editor rather than to aws.

@ashu8912
Copy link
Contributor

#375 #375 (comment)

@adrijshikhar
Copy link

@catarak i would like to work on this issue, can you please assign it to me?

@MohdImran001
Copy link
Contributor

Hii @catarak, I would like to work on this issue.

@catarak
Copy link
Member

catarak commented Oct 8, 2020

@MohdImran001 go ahead!

@MohdImran001
Copy link
Contributor

Hii @catarak, I would also like to change the color of the progress bar to Amaranth (#ed225d) to match the current theme.

@MohdImran001
Copy link
Contributor

Hii @catarak, I have fixed this issue. Please review my PR #1630

catarak added a commit to MohdImran001/p5.js-web-editor that referenced this issue Oct 13, 2020
@MohdImran001
Copy link
Contributor

Hii @catarak, this line of code in the uploader.js file is not working and the progress bar is still visible after a successful upload. I tried changing its width to 0 and display property to 'none but nothing works.

file.previewElement.querySelector('.dz-upload').style.width = '100%';

After experimenting a little bit I found out that this works perfectly in a function passed in the success parameter of dropzone configuration. Please refer to the code below. This works perfectly for all file types.

In createDropzone() method, in FileUploader.js.

success: (file, response) => {
        file.previewElement.classList.remove('dz-error');
        file.previewElement.classList.add('dz-success');
        file.previewElement.querySelector('.dz-progress').style.display = 'none';
}

@catarak
Copy link
Member

catarak commented Oct 14, 2020

I think the title of this issue is confusing. I decided to make it match the the way that other file types are uploaded, rather than remove the progress bar. Here they are side by side:
Screen Shot 2020-10-14 at 2 50 18 PM

catarak added a commit to MohdImran001/p5.js-web-editor that referenced this issue Oct 14, 2020
catarak added a commit that referenced this issue Oct 14, 2020
FIXED :- #1220 Loading bar does not disappear after uploading file.
@trych
Copy link
Author

trych commented Oct 14, 2020

In what way is the title confusing?

I decided to make it match the the way that other file types are uploaded, rather than remove the progress bar. Here they are side by side:

Do I understand this right that the fix is to have the upload progress bars not disappear at all anymore? In what way is this helpful and how do I know when my upload is finished?

@catarak
Copy link
Member

catarak commented Oct 14, 2020

Do I understand this right that the fix is to have the upload progress bars not disappear at all anymore?

Ahhh sorry that this is confusing! There's an animation that shows the progress bar filling up. Before this fix, the progress bar would just remain unfilled for text files.

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.

5 participants