uppy/packages/@uppy
Nico Jones 3ebe9a91be
Hide Progressbar if no upload in progress (#2252)
* Fixing an error that would prevent the ProgressBar from hiding

Fixing an error that would prevent the ProgressBar from hiding, displaying a `0` in the HTML element .uppy-ProgressBar-inner whenever no files were being uploaded. This fix sets the .uppy-ProgressBar element a class, so the user can decide when to hide it (or what to do)

* Update index.js

improved comment

* removed custom class

* Fixing an error that would prevent the ProgressBar from hiding

`state.totalProgress` is not `100`. It's `0` instead   
----------

To reproduce the error:  
```
.use(ProgressBar, {
  target: '._progress_bar_',
  fixed: false,
  hideAfterFinish: true
})
```

This will set a `div` inside the `_progress_bar_` element, and this element will be visible, showing `0` to the user.

The problem is that, currently, the bar only hides when `progress === 100`, but that is never true, as `progress` resets to `0` once the upload has been completed.
That means, it is __always__ visible, and only hidden for a brief period after an upload completes (when the `progress === 100`, briefly).

This fix allows the bar to be hidden also when the progress is `0` (after and before uploads)
2020-05-07 16:37:39 +02:00
..
aws-s3 Add cuid dependency to @uppy/aws-s3 (#2236) 2020-05-02 10:55:26 +02:00
aws-s3-multipart Release 2020-04-30 12:52:46 +01:00
companion Release 2020-05-01 08:19:45 +01:00
companion-client Release 2020-04-30 12:52:46 +01:00
core Dark mode design improvements (#2232) 2020-05-05 18:02:24 +02:00
dashboard Dark mode design improvements (#2232) 2020-05-05 18:02:24 +02:00
drag-drop Release 2020-04-30 12:52:46 +01:00
dropbox Release 2020-04-30 12:52:46 +01:00
facebook Release 2020-04-30 12:52:46 +01:00
file-input Release 2020-04-30 12:52:46 +01:00
form Release 2020-04-30 12:52:46 +01:00
golden-retriever Release 2020-04-30 12:52:46 +01:00
google-drive Release 2020-04-30 12:52:46 +01:00
informer Release 2020-04-30 12:52:46 +01:00
instagram Release 2020-04-30 12:52:46 +01:00
locales Release 2020-04-30 12:52:46 +01:00
onedrive Release 2020-04-30 12:52:46 +01:00
progress-bar Hide Progressbar if no upload in progress (#2252) 2020-05-07 16:37:39 +02:00
provider-views Dark mode design improvements (#2232) 2020-05-05 18:02:24 +02:00
react Release 2020-04-30 12:52:46 +01:00
react-native Release 2019-10-09 21:00:46 +02:00
redux-dev-tools Release 2020-02-14 23:17:48 +01:00
robodog Release 2020-04-30 12:52:46 +01:00
screen-capture Dark mode design improvements (#2232) 2020-05-05 18:02:24 +02:00
status-bar Dark mode design improvements (#2232) 2020-05-05 18:02:24 +02:00
store-default Release 2020-02-14 23:17:48 +01:00
store-redux Release 2020-02-14 23:17:48 +01:00
thumbnail-generator thumbnail-generator: generate 80% quality jpegs (#2246) 2020-05-05 18:07:58 +02:00
transloadit transloadit: add typings for Companion URL constants (#2244) 2020-05-04 14:03:09 +02:00
tus tus: use hasProperty util to make this if condition more readable 2020-05-06 13:06:15 +02:00
url Release 2020-04-30 12:52:46 +01:00
utils Release 2020-04-30 12:52:46 +01:00
webcam Dark mode design improvements (#2232) 2020-05-05 18:02:24 +02:00
xhr-upload Release 2020-04-30 12:52:46 +01:00