Skip to content
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

Suggestion: "New Swing in New Window" #97

Open
OliverJAsh opened this issue Jul 14, 2024 · 2 comments
Open

Suggestion: "New Swing in New Window" #97

OliverJAsh opened this issue Jul 14, 2024 · 2 comments

Comments

@OliverJAsh
Copy link

Firstly, thank you for creating and sharing this awesome project. ❤️

The "New Swing…" command creates the swing inside the current editor window. This takes me by surprise every time. (I frequently use CodeSwing to create reduced test cases when I'm in the middle of working on something, so I don't want it to rearrange my current window.)

A few ideas to address this:

  • Modify the command to open a new window.
  • Create a new command that opens a new window ahead of creating the swing.
  • Add a setting.

What do you think?

@lostintangent
Copy link
Owner

lostintangent commented Jul 14, 2024

Hey! Yeah I could add a new command, and that might be the simplest solution? Since it wouldn't change the existing behavior.

If I added a "New Swing in New Window" command, would that work for you?

Here's how I'm thinking this command would work:

  1. It creates a new temporary directory for the swing
  2. It prompts you with the existing "new swing" flow, which allows selecting a template. And when selected, the swing is stored into the temp directory
  3. It then opens the temp directory in VS Code

@OliverJAsh
Copy link
Author

That would be perfect!

lostintangent added a commit that referenced this issue Jul 26, 2024
Related to #97

Add a new command "New Swing in New Window" to create a new swing in a new VS Code window.

* **package.json**
  - Add a new command `codeswing.newSwingInNewWindow` with the title "New Swing in New Window".

* **src/creation/index.ts**
  - Implement the `newSwingInNewWindow` function to create a new temporary directory for the swing.
  - Prompt the user with the existing "new swing" flow.
  - Open the new swing in a new VS Code window.
  - Register the new command to call the `newSwingInNewWindow` function.

---

For more details, open the [Copilot Workspace session](https://copilot-workspace.githubnext.com/lostintangent/codeswing/issues/97?shareId=XXXX-XXXX-XXXX-XXXX).
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 a pull request may close this issue.

2 participants