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

SemanticDiff ignores enablePreview #61

Open
Boxap opened this issue Jun 4, 2024 · 1 comment
Open

SemanticDiff ignores enablePreview #61

Boxap opened this issue Jun 4, 2024 · 1 comment
Labels
bug Something isn't working vscode The issue is related to our VS Code extension

Comments

@Boxap
Copy link

Boxap commented Jun 4, 2024

Describe the Bug
The only possibility to compare two branches (for example changes in Merge Request) is to consequently open file by file and check diffs per file (from what I could find).
So in this process when selecting multiple files one by one, when using the default diff created tab is reused (preview used, workbench.editor.enablePreview setting is "true"), which means that for any amount of open diffs only one tab is created. (20 diffs clicked -> only one tab opened in the window in the end)

However SemanticDiff extension creates a permanent tab for every diff (20 diffs clicked -> 20 tabs opened in the window in the end)

To Reproduce
Steps to reproduce the behavior (GitLens example):

  1. Set workbench.editor.enablePreview to true
  2. In "Search & Compare" section in GitLens Inspect tab compare 2 branches
  3. Click n changed files

Expected Behavior
Only 1 original diff tab and 1 SemanticDiff tab should be opened

Actual Behavior
1 original diff and n SemanticDiff tabs are opened

SemanticDiff Version
0.8.10

VS Code Information

Version: 1.89.1 (Universal)
Commit: dc96b837cf6bb4af9cd736aa3af08cf8279f7685
Date: 2024-05-07T05:14:24.611Z
Electron: 28.2.8
ElectronBuildId: 27744544
Chromium: 120.0.6099.291
Node.js: 18.18.2
V8: 12.0.267.19-electron.0
OS: Darwin arm64 23.5.0
@Boxap Boxap added bug Something isn't working vscode The issue is related to our VS Code extension labels Jun 4, 2024
@mmueller2012
Copy link
Contributor

Thank you for your detailed bug report.

Unfortunately, we cannot implement a preview mode for SemanticDiff tabs due to limitations of the VS Code extension API.

In an ideal world, SemanticDiff would simply integrate its diff visualization into the regular editor. This is not possible, however, as it provides very limited ways to modify the rendering for extensions. Instead, we have to resort to using webview panels and implement all the text rendering ourselves. Webview panels offer the most flexibility, but they are also not very well integrated into VS Code and many features are not available. One of them is creating preview tabs. There is a feature request open since 2020 to allow creating preview tabs, but there doesn't seem to be much progress.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working vscode The issue is related to our VS Code extension
Projects
None yet
Development

No branches or pull requests

2 participants