loft-sh / devpod

Codespaces but open-source, client-only and unopinionated: Works with any IDE and lets you use any cloud, kubernetes or just localhost docker.
https://devpod.sh
Mozilla Public License 2.0
8.44k stars 311 forks source link

feat: add reset option (cli/ui) #963

Closed 89luca89 closed 3 months ago

89luca89 commented 3 months ago

Add a CLI --reset flag, this will rebuild+wipe git repo and clone fresh sources. --recreate flag will only re-build the container workspace, keeping sources in place.

image image

Add GUI button to reset:

image

And make it clear uncommitted data will be lost:

image

Resolves ENG-2954 Fix #950

89luca89 commented 3 months ago

Also @pascalbreuninger I've added this "recycle" icon for the reset, let me know if this is ok I couldn't think of anything better :shrug:

pascalbreuninger commented 3 months ago

@89luca89 what do you think of

image
<svg xmlns="http://www.w3.org/2000/svg" fill="none" viewBox="0 0 24 24" strokeWidth={1.5} stroke="currentColor" className="w-6 h-6">
  <path strokeLinecap="round" strokeLinejoin="round" d="M21 16.811c0 .864-.933 1.406-1.683.977l-7.108-4.061a1.125 1.125 0 0 1 0-1.954l7.108-4.061A1.125 1.125 0 0 1 21 8.689v8.122ZM11.25 16.811c0 .864-.933 1.406-1.683.977l-7.108-4.061a1.125 1.125 0 0 1 0-1.954l7.108-4.061a1.125 1.125 0 0 1 1.683.977v8.122Z" />
</svg>

as the icon? It's from the same icon set we use all over the UI

89luca89 commented 3 months ago

Oh like a rewind, cool for me, also what do you think of a simple "undo" icon? (like the jump-back arrow in some editors) just asking I'm not that good at design :sweat_smile:

pascalbreuninger commented 3 months ago

Oh like a rewind, cool for me, also what do you think of a simple "undo" icon? (like the jump-back arrow in some editors) just asking I'm not that good at design 😅

also okay, but please make sure you're taking it from https://heroicons.com/ to keep it consistent with existing icons