Add File Annotations submenu to the editor gutter context menu#5437
Open
GREFITH wants to merge 1 commit into
Open
Add File Annotations submenu to the editor gutter context menu#5437GREFITH wants to merge 1 commit into
GREFITH wants to merge 1 commit into
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Adds the existing File Annotations submenu to VS Code’s editor gutter (line number) context menu, gated by a new gitlens.menus.editorGutter.blame setting, aligning the gutter experience with the editor text-area context menu.
Changes:
- Adds
gitlens/editor/annotationssubmenu toeditor/lineNumber/context, controlled byconfig.gitlens.menus.editorGutter.blame. - Extends
MenuConfig.editorGutterto include the newblameboolean and sets its default totrue. - Exposes the new toggle in the Settings webview under General → Menus → Editor Gutter Context Menu.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/webviews/apps/settings/categories/general.ts | Adds a Settings UI checkbox for menus.editorGutter.blame. |
| src/config.ts | Extends MenuConfig.editorGutter to include the blame toggle. |
| package.json | Updates configuration schema/defaults and contributes the submenu to editor/lineNumber/context. |
| contributions.json | Adds the submenu placement for gitlens/editor/annotations into editor/lineNumber/context (source for generated contributions). |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Closes gitkraken#2682. Reuses the existing File Annotations submenu (blame, heatmap, changes toggles, and clear) in the editor's line number (gutter) context menu, gated by a new gitlens.menus.editorGutter.blame setting (default on), matching the existing compare/remote/share gutter menu settings.
b497949 to
ea8d991
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Closes #2682.
Adds the existing File Annotations submenu (Toggle File Blame, Toggle File Heatmap, Toggle File Changes, Clear File Annotations) to the editor's line number (gutter) context menu, matching the experience already available via the editor text-area context menu and IDEs like IntelliJ IDEA.
gitlens/editor/annotationssubmenu rather than duplicating commandsgitlens.menus.editorGutter.blamesetting (defaulttrue), following the same pattern as the existingeditorGutter.compare/editorGutter.remote/editorGutter.sharesettingsTest plan
pnpm run check(type-aware lint + typecheck) passespnpm run build(extension host + webviews + unit tests) compiles successfully