Thanks to visit codestin.com
Credit goes to github.com

Skip to content

feat: UI for canceling workspace builds #1735

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

Merged
merged 10 commits into from
May 25, 2022
Merged

feat: UI for canceling workspace builds #1735

merged 10 commits into from
May 25, 2022

Conversation

presleyp
Copy link
Contributor

Closes #233

  • Adds "Cancel action" button while a workspace job is in progress
  • Changes workspace status to "Canceling action" during cancelation and "Canceled action" when it's complete
  • Removes "Retry" button. Instead, canceled and failed jobs provide both "Start" and "Stop"
  • Updates storybook for outdated workspace to make sure that when all buttons are showing - Start, Stop, and Update - they still fit.

I'm putting this up as a draft for design review. If y'all like it, I'll finish removing the Retry code.

@BrunoQuaresma
Copy link
Collaborator

@presleyp
Copy link
Contributor Author

I think so, because if I try to start, and it fails, the workspace is in an unknown state and stopping or deleting may be helpful.

  • I think we could make the Deleting... state orange as you made for canceling.

Good idea! @kylecarbs mind if I leave this for you to do in the deleting ticket?

@BrunoQuaresma
Copy link
Collaborator

@presleyp since we don't have larger labels anymore like "Connecting workspace" I think we could reduce the WorkspaceAction width a bit. What do you think?

@presleyp presleyp marked this pull request as ready for review May 25, 2022 16:15
@presleyp presleyp requested a review from a team as a code owner May 25, 2022 16:15
@presleyp
Copy link
Contributor Author

@BrunoQuaresma ready for final review

@Kira-Pilot
Copy link
Member

@presleyp I canceled a workspace a couple times and now I see I have the option to both start and stop it. Is this expected?

Screen Shot 2022-05-25 at 4 59 56 PM

Screen Shot 2022-05-25 at 4 59 49 PM

@presleyp
Copy link
Contributor Author

@presleyp I canceled a workspace a couple times and now I see I have the option to both start and stop it. Is this expected?

@Kira-Pilot yes, canceling an action leaves the workspace in an unknown state, so if it was started and you clicked stop and then cancel, it's not still started, it's in limbo. So from there you can get it back in a known state by starting or stopping. We'll definitely need to display some info about this, I think there's a ticket for figuring out how to explain stuff to the user.

@Kira-Pilot
Copy link
Member

@presleyp got it; i think you explained that to Bruno above but I didn't see it. yeah, instead of explaining it to them, I wonder if we actually hide one of the 'choices' and just make a choice for them. Choice in this scenario feels confusing to me. Something to tackle later!

@presleyp presleyp merged commit 841d9f2 into main May 25, 2022
@presleyp presleyp deleted the cancel/presleyp/233 branch May 25, 2022 21:58
kylecarbs pushed a commit that referenced this pull request Jun 10, 2022
* Start hooking up cancel

* Update xservice

* Render cancel

Changes behavior of other buttons too

* Make outdated workspace story show max buttons

* Remove retry code

* Remove loading button state

* Fix type, extend tests

* Update story
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.

Frontend Workspace Lifecycle - Cancel Build
3 participants