-
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
core: Remove .run(). #793
core: Remove .run(). #793
Conversation
6156b67
to
cf382a0
Compare
cf382a0
to
37768e1
Compare
I like this 👍been meaning to remove But I remember @tim-kos mentioned something that “it’s nice to be able to set things up, prepare everything, and then run at a particular moment when needed”. I think we don’t really do that, and if you really want things to run at a particular point, you could just place your An alternative solution would be to make Uppy less functional before |
Moving plugin.install() to run() would be nice … however right now the React components install() and uninstall() plugins lazily so I'm not sure how that would work :/ I agree having (FWIW some other |
But currently we install them right away when they are used: Line 832 in 3769385
Didn’t find install calls in React components here: https://github.com/transloadit/uppy/tree/master/src/react, did you mean something else?
Yeah, also noticed that, so I think that’s fine. |
Yes sorry 🙈 I meant that the React components One cool thing about installing inside |
I see a few PROs and CONs for removing .run: PROs P.2 Less possible things to forget for the end user, which then would only create support tickets. CONs C.2 Complete freedom to set things up inside without having to consider Without knowing super much about the inner workings of Uppy at this time, I have the feeling, that What would speak against treating them as such? .use() sets up things, and nothing really visible happens before .run() is called. Also maybe we could make it super explicit in the docs and on a screen before posting a GitHub issue that people should check if .run() was called. |
This is the current behaviour but it's quite confusing for users; often times
I guess this would help. I would then prefer to also move the |
Not really, I think, because buttons and uploading works now without run, but progress is not shown.
Yeah, then nothing loads and its much more apparent. I’d be fine with both cases, personally I see that in Express and PostCSS, as Renee mentioned, But since Tim (and I think Kevin @kvz) vote to keep it, and if we think using plugins in random order is a nice thing to have (is it? probably nice, but things work fine now?) then yes, we should make |
FWIW I'm not in favor of keeping |
We’ve agreed to try it like this, and then revert if we miss |
This removes the need for calling
.run()
manually.Will wait for Artur to be back before going ahead with this tho ✌️