Automattic/studio

Deleting site leaves local files

Closed this issue · 6 comments

Quick summary

When deleting a site in Studio 1.4, the local files are not being deleted.

Steps to reproduce

  1. Delete site
  2. Check local filesystem

What you expected to happen

The complete directory is being deleted.

What actually happened

Nothing

Impact

All

Available workarounds?

No but the app is still usable

Platform

Windows

Logs or notes

Studio 1.4 on Windows 10

@wojtekn @sejas Given the common misunderstanding here, what do you think about having the checkbox default to checked?

del test 1

Sorry, actually I did not recognize the checkbox.
So you´re on the right way, Daniel, but what I´d think from UI perspective, an option for an action should be placed before the action, at least no somewhere at the poolside...

Given the common misunderstanding here, what do you think about having the checkbox default to checked?

@danielbachhuber If users mistakenly miss the option, I would prefer that their files stay on the filesystem and are not deleted. Losing the files without noticing seems to be a worse outcome.

So you´re on the right way, Daniel, but what I´d think from UI perspective, an option for an action should be placed before the action, at least no somewhere at the poolside...

It seems to be native Windows UI, and not really a Studio or Electron thing.

@wojtekn I think the expectation when I "Delete site" is that the site is deleted. What do Local and DevKinsta do?

@danielbachhuber Local asks the user if they want to move files to trash and preselects the option for the user. They also don't use native system dialog and implement a custom dialog:

Screenshot 2024-07-04 at 13 25 14

DevKinsta doesn't ask about that at all and removes the files. They use custom dialog too:

Screenshot 2024-07-04 at 15 11 59

It seems that Studio is on the lowest part of the YOLO-ness scale here. I think we can select the checkbox by default. After all, the site is being moved to the thrash, so users can still revert the process if they change their minds.

@wojtekn Thanks for looking into it! I agree; I think checking the box by default is a reasonable implementation.