-
Notifications
You must be signed in to change notification settings - Fork 937
feat: add minimal frontend for creating workspaces from specific template versions #9475
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
Conversation
This is only available to template admins, right? A normal user cannot access "change version" so they shouldn't be able to create from a version. |
I haven't really looked into the permissions side of this at all yet. I forgot this week was a bit short, so I only had today to try to get something working. |
What happens if parameters are required for the workspace? |
I didn't actually test it yet, but from looking at the code "auto build" should fail and redirect to the normal workspace creation form |
Gotcha. And in that case, it won't persist the version it wants to use, right? |
It will! The parameter isn't exposed in the UI, but the state machine will remember it! Redirect is probably the wrong word to use. When you click "Create a workspace" it opens the workspace creation form in "auto" mode. If the workspace doesn't need parameters, it will just create a workspace with a random name and send you straight into it. If it needs parameters it will display the form and let you fill it out, and then send you to the new workspace. Either route will use the version you just created. |
Ahh gotcha! I think we should probably show a `lil component that, even if not changeable, shows that we are respecting that version from the state machine. If it's not in the machine (and its using the default), we just hide that component in the form. I think its good visual feedback that the user is on the right track and Coder didn't bug out. |
good point! that sounds like a nice improvement. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
Minor thing: Should we display the version name instead of the ID? I think most of the users will not care about or recognize the ID. |
long term yes, but the only information the page has available to it right now is the id. once we actually load version information and have the names available, we should display those instead. |
131d63c
to
75a3eb0
Compare
this is ready to merge, but this test failure is unrelated to my changes and the tests seem to be failing pretty consistently :\ |
Closes #9415
Closes #7157
This is super barebones, but I wanted to have some form of this working end-to-end before heading out for the long weekend, so here it is for people to look at!
version
search param to the "new workspace" page, which allows specifying the ID of a particular template versionThis change does not yet expose a "version selector" of any kind to the user. We probably want to add that still, and it shouldn't be to hard, but this is a useful upgrade as is and I think building this out further incrementally will work just as well.