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

Hide query editor action buttons when in diff editor #18608

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

caohai
Copy link
Member

@caohai caohai commented Jan 29, 2025

This PR fixes #18559
Currently we show query editor action buttons in the diff editor which is not relevant. This bumps the diff-related actions into .... This PR adds an isInDiffEditor check during the action button contribution to hide them when the editor is in diff view. This change works for diff views originated from both git diff and the manual Select for Compare operation.

Before:
image

After:
Screenshot 2025-01-29 at 12 12 13

VSCode doc for isInDiffEditor flag:
https://code.visualstudio.com/api/references/when-clause-contexts#:~:text=editorLangId%20%3D%3D%20typescript%22.-,isInDiffEditor,-The%20active%20editor

Copy link

PR Changes

Category Main Branch PR Branch Difference
Code Coverage 50.38% 50.53% $${\color{lightgreen} .15\% }$$
VSIX Size 12136 KB 12160 KB $${\color{lightgreen} 24 KB \space (0\%) }$$
Webview Bundle Size 3180 KB 3180 KB $${\color{lightgreen} 0 KB \space (0\%) }$$

Copy link
Member

@kburtram kburtram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@caohai caohai merged commit 9f8e081 into main Jan 29, 2025
6 checks passed
@caohai caohai deleted the hacao/hide-editor-title-buttons-in-diff branch January 29, 2025 21:20
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 this pull request may close these issues.

Don't show Editor Actions in Diff Editor
5 participants