Skip to content

Decide how to handle workspace deletion #1837

Closed
@presleyp

Description

@presleyp

As a user, I want to be able to delete a workspace from the UI, and see whether deletion succeeded or failed.


Outcome: we'll stick with 1b for now, and I'll write a ticket to implement 2 later.


Currently, the frontend is prepared to display a deleted workspace like any other workspace, with a status of "Deleted" and no available actions. However, the backend gives an error, not a workspace in the "deleted" state, when the frontend requests a deleted workspace to display on the workspace page. So we need to decide whether a deleted workspace should be fetchable, and what should happen when a user deletes a workspace on the Workspace Page. Here are the options I can think of and their downsides (which are a mix of UX concerns and just calling out additional work they would require):

  1. If deleted workspaces are not fetchable
    a. When I click Delete and then confirm, I stay on the Workspace page. If deletion fails, I see an error message briefly pop up and then I continue to see my workspace. If deletion succeeds, either
    i. I see a Workspace Deleted view with a link to the Workspaces page (downside: new design), or
    ii. I am redirected to the Workspaces page (downside: a bit abrupt), or
    iii. I see a Workspace Deleted view warning me that I'm about to be redirected, and then I'm redirected (downside: new design, doesn't feel elegant to me)
    b. When I click Delete and then confirm, I am redirected to the Workspaces page. If deletion fails, that workspace in my list gets the Error status. If deletion succeeds, that workspace disappears from my list. (downside: the Workspaces page does not currently poll workspace statuses, so I will only know this if I refresh after a little bit, or, we need to add polling)
  2. If deleted workspaces are fetchable, when I click Delete and then confirm, I see my workspace get the Deleting status, and then its status changes to either Error or Deleted. It's up to me to navigate elsewhere. (downside: if deleted workspaces stick around, they can clutter up the Workspaces page. If that's not addressed by some garbage collection, then we should add a filter to that page.)

Metadata

Metadata

Labels

apiArea: HTTP APIneeds decisionNeeds a higher-level decision to be unblocked.siteArea: frontend dashboard

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions