-
Notifications
You must be signed in to change notification settings - Fork 2k
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
Make arguments passed to events consistent #3938
Comments
We have internal, non-documented:
|
Reusing the |
our file-related events are a bit messy. some include a in a future major we should probably refactor all file related events to either
|
@mifi this could be improved in a minor version by adding the missing property (either |
yes, but it will still be messy because |
One way or another I think we would need a breaking change. But I'm starting to change my mind on the renaming of all events. It's incredibly challenging to get right for little user value. Yes the current names are confusing, but with good docs we get away with it and we would prevent breaking changes. That being said we should definitely make the arguments consistent and up-to-date (no stale |
@mifi for positional arguments, there is indeed no backward compatible solution. |
Initial checklist
Problem
Event names are sometimes confusing and seem inconsistent.
Solution
@uppy/core
Always send file(s) instead of ID(s)
Renaming we decided not to do.
files-added
tofile-batch-added
. Or at least a better name to differentiate withfile-added
betterupload
toupload-start
progress
toupload-progress
(total progress)upload-progress
tofile-progress
(individual progress)complete
toupload-complete
(success or error)upload-error
tofile-error
(one file upload error)error
toupload-error
(entire upload error)cancel-all
toupload-cancel
@uppy/transloadit
transloadit:assembly-created
) and sometimes not (transloadit:upload
). We should always or never prefix with assembly because we are always talking about the same thing.transloadit:result
andtransloadit:complete
. Potentially refactor to only have*:complete
uppy.on('error')
is extended with anassembly
property when the upload fails. This is a bit confusing, I suggest making suretransloadit:complete
also fires with it fails, with the assembly context, and keeperror
generic / consistent no matter the upload plugin.Related
These should also be taken into account:
file-editor:cancel
event is incorrectly implemented #4045Alternatives
upload-error
) which would be both deprecated and new at once.The text was updated successfully, but these errors were encountered: