codeswing icon indicating copy to clipboard operation
codeswing copied to clipboard

Confusing UX when in an existing project

Open karlhorky opened this issue 4 years ago • 2 comments

If a user creates a new swing in an existing project, it is a bit visually confusing as to what is going on:

  1. The Explorer panel for the existing project is still open on the left
  2. If the user created the swing in a different folder, there is no reference to the current swing file (eg. index.jsx) in the Explorer panel

Maybe it would make sense to open a new window with the location of the created swing?

Some other strange-feeling behaviors:

  1. You can close the Swing file without the preview tab closing. There could be a UI state where you have the old preview tab still around, but unrelated files in the existing project open.
  2. If you close the preview tab, it closes all other files (also unrelated ones)
  3. If you start a new Swing in an existing project with some files open, it will try to close those files (and lead to confusing, seemingly unrelated warnings such as Are you sure that you want to close <unrelated buffer tab X>?

Maybe these would also be addressed by opening swings in their own windows.

karlhorky avatar Feb 26 '21 14:02 karlhorky

Thanks for the feedback! My main motivation for this current behavior is that I wanted a way to create temporary swings to try an idea, but without switching contexts. So for example, if I'm working on a web app codebase and I want to quickly try something with the React API, I could do that, without opening a new window.

That said, I agree that the current experience is optimized for that kind of "scratch pad" workflow. Out of curiosity: for your use case, would you be interested in creating the swings within the currently opened workspace?

I'll also give some thought to how to easily allow opening the swing is a new window as well. Stay tuned!

lostintangent avatar Feb 27 '21 17:02 lostintangent

for your use case, would you be interested in creating the swings within the currently opened workspace?

Hm... in most cases probably not, but I suppose there may be some use cases that I haven't considered yet...

if I'm working on a web app codebase and I want to quickly try something with the React API, I could do that, without opening a new window

Interestingly enough, this is also my context a lot of the time, but my preference would be different in that I want to be able to clearly differentiate between what is a swing and what is the existing project (different windows would do this for me easily).

I'll also give some thought to how to easily allow opening the swing is a new window as well. Stay tuned!

Nice, thanks!

karlhorky avatar Feb 27 '21 17:02 karlhorky