TranquilMarmot / YarnLoom

Visual Studio Code extension for editing YarnSpinner files
MIT License
18 stars 2 forks source link

Viewing a graphical git diff for `.yarn` files should default to the built-in Text Editor, not the Yarn Loom editor #19

Open weaversam8 opened 2 years ago

weaversam8 commented 2 years ago

Describe the bug When you've made changes to a .yarn file and the file is kept in version control, VS Code's Git extension will highlight that those changes have been made. Clicking on a file with changes (or staged changes) allows you to view a side-by-side diff of those changes, which is a useful feature.

When this extension registered the Yarn Loom editor for .yarn files, it also accidentally registered that editor for these side by side diffs. The Yarn Loom editor doesn't offer any special features for doing these diffs (like highlighting changes) and is relatively clunky when two editor instances are positioned side by side. Therefore, these diffs should open in the regular text editor.

Expected behavior Side-by-side diffs of .yarn files should automatically open in VS Code's built-in Text Editor, not the Yarn Loom editor.

Actual behavior Side-by-side diffs of .yarn files are opened in the Yarn Loom editor.

Steps To Reproduce Steps to reproduce the behavior:

  1. Find or create a project where .yarn files are kept under version control in a Git repository.
  2. Launch VS code with the Yarn Loom extension and VS Code Git support enabled (it should be by default.)
  3. Open a .yarn file in the Yarn Loom editor and make some changes in the working directory.
  4. Save the file.
  5. Open the Git sidebar in VS Code.
  6. Click on the file, which should have an orange "M" designation next to it.
  7. The side-by-side diff of your file will open with two side-by-side instances of the Yarn Loom editor.

Screenshots

image

Environment

weaversam8 commented 2 years ago

Update, it appears that this might not be easily possible given the VS Code extensions API. See microsoft/vscode#97683.