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

@uppy/provider-views: show how many files are added #4388

Closed
wants to merge 15 commits into from

Conversation

mifi
Copy link
Contributor

@mifi mifi commented Mar 29, 2023

while loading
this lets the user know that we are doing something, and that the process has not crashed or gotten stuck

Screenshot 2023-03-29 at 22 11 22

see discussion in #4384

mifi added 14 commits March 28, 2023 23:15
don't call addFolder from listAllFiles
because that would call addFile before all folders were loaded

also remove unused selectedFolders state
so they know that something is happening
This reverts commit 4060019.
while loading
this lets the user know that we are doing something, and that the process has not crashed or gotten stuck
see #4384
Base automatically changed from fix-addfiles-race-condition to main April 4, 2023 03:13
@Murderlon
Copy link
Member

If you add more margin in between the items I'm okay with this 👍

Did you test on mobile?

@aduh95 aduh95 changed the title show how many files are added @uppy/provider-views: show how many files are added Apr 4, 2023
mifi added a commit that referenced this pull request Apr 4, 2023
@mifi
Copy link
Contributor Author

mifi commented Apr 4, 2023

Ok added new margin and recreated this PR in #4399 so closing this.

did not test on mobile, but i tested with a smaller width and i don't see what would be different on mobile?

@mifi mifi closed this Apr 4, 2023
mifi added a commit that referenced this pull request Apr 15, 2023
* show how many files are added when loading

remake of #4388

* add french (cherry pick)

* add todo
mifi added a commit that referenced this pull request Apr 15, 2023
* show how many files are added when loading

remake of #4388

* add french (cherry pick)

* implement concurrent file listing
mifi added a commit that referenced this pull request Apr 15, 2023
* show how many files are added when loading

remake of #4388

* add french (cherry pick)

* implement concurrent file listing

* refactor / fix lint

* refactor/reduce duplication

* pull out totals validation

don't do it for every file added, as it's very slow
instead do the check at the end when all files are added.
this allows us to easily work with 10k+ files
fixes #4389

* Update packages/@uppy/core/src/Uppy.js

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>

* make restricter.validate validate everything

instead make more specific methods for sub-validation
also rename validateTotals to validateAggregateRestrictions

* improve errors and user feedback

- handle errors centrally so that we can limit the amount of toasts (informers) sent to the users (prevent flooding hundreds/thousands of them)
- introduce FileRestrictionError which is a restriction error for a specific file
- introduce isUserFacing field for RestrictionError

* fix performance issue reintroduced

* improvements

- show "%{count} additional restrictions were not fulfilled" for any restriction errors more than 4
- refactor/rename methods
- improve ghost logic/comments

* improve performance when uploading

- introduce new event "upload-start"  that can contain multiple files
- make a new patchFilesState method to allow updating more files
- unify "upload-start" logic in all plugins (send it before files start uploading)
- defer slicing buffer until we need the data
- refactor to reuse code

* fix e2e build issue

* try to upgrade cypress

maybe it fixes the error

* Revert "fix e2e build issue"

This reverts commit ff3e580.

* upgrade parcel

* move mutation logic to end

* remove FileRestrictionError

merge it with RestrictionError

* fix silly bug

looks like the e2e tests are doing its job 👏

---------

Co-authored-by: Antoine du Hamel <duhamelantoine1995@gmail.com>
@mifi mifi deleted the user-feedback-adding-recursive-folders branch September 6, 2023 21:42
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.

3 participants