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

Allow importing without creating workspace first #19

Open
pofider opened this issue Mar 19, 2019 · 1 comment
Open

Allow importing without creating workspace first #19

pofider opened this issue Mar 19, 2019 · 1 comment

Comments

@pofider
Copy link
Contributor

pofider commented Mar 19, 2019

It is quite annoying to always create a blank workspace and then import. It could maybe automatic somehow.

@bjrmatos
Copy link
Collaborator

this is complicated right now

on server side we have two ways:

  • we can probably be able to create the workspace here in the import listener, just for the first entity
  • or we can just intercept the /api/import early and create the workspace and then delegate to the normal /api/import behavior

the problem in both cases will be to propagate the workspace created to the client, right now there is no way, we can not also redirect directly to the new workspace because the import result can contain metadata/errors that the client is expected to handle and if we just redirect such data is lost.

the best way to handle this will be on client side (studio), we will need some kind of async hook/listener that is invoked before we call the Import button that executes the /api/import request, there we will just create the workspace with normal Studio.playground.save(), update the studio url and just continue with normal code execution flow of the import.

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

No branches or pull requests

2 participants