Skip to content

Commit c26e2c4

Browse files
committed
Restricts markdown feedback actions to custom scheme
Updates menu conditions so feedback actions for markdown previews only appear when the editor uses the dedicated custom resource scheme, preventing display in standard markdown previews. Adjusts menu order for better navigation grouping and consistency. Aligns command visibility with intended context to avoid confusion and clutter in the editor UI.
1 parent 6ed938b commit c26e2c4

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

contributions.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -149,7 +149,7 @@
149149
"menus": {
150150
"editor/title": [
151151
{
152-
"when": "gitlens:markdown:feedback:available && activeCustomEditorId == vscode.markdown.preview.editor",
152+
"when": "resourceScheme == gitlens-markdown && gitlens:markdown:feedback:available && activeCustomEditorId == vscode.markdown.preview.editor",
153153
"group": "navigation",
154154
"order": 2
155155
}
@@ -162,7 +162,7 @@
162162
"menus": {
163163
"editor/title": [
164164
{
165-
"when": "gitlens:markdown:feedback:available && activeCustomEditorId == vscode.markdown.preview.editor",
165+
"when": "resourceScheme == gitlens-markdown && gitlens:markdown:feedback:available && activeCustomEditorId == vscode.markdown.preview.editor",
166166
"group": "navigation",
167167
"order": 1
168168
}
@@ -3710,7 +3710,7 @@
37103710
{
37113711
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
37123712
"group": "navigation",
3713-
"order": 0
3713+
"order": 3
37143714
}
37153715
],
37163716
"editor/title/context": [

package.json

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -14062,16 +14062,6 @@
1406214062
"when": "activeWebviewPanelId == gitlens.timeline && resourceScheme == webview-panel && config.gitlens.visualHistory.allowMultiple",
1406314063
"group": "navigation@-97"
1406414064
},
14065-
{
14066-
"command": "gitlens.ai.feedback.positive",
14067-
"when": "gitlens:markdown:feedback:available && activeCustomEditorId == vscode.markdown.preview.editor",
14068-
"group": "navigation@1"
14069-
},
14070-
{
14071-
"command": "gitlens.ai.feedback.negative",
14072-
"when": "gitlens:markdown:feedback:available && activeCustomEditorId == vscode.markdown.preview.editor",
14073-
"group": "navigation@2"
14074-
},
1407514065
{
1407614066
"command": "gitlens.clearFileAnnotations",
1407714067
"when": "resource in gitlens:tabs:blameable && (gitlens:window:annotated == computed || (resource in gitlens:tabs:annotated && resource not in gitlens:tabs:annotated:computing)) && config.gitlens.menus.editorGroup.blame",
@@ -14141,10 +14131,20 @@
1414114131
"when": "resourceScheme =~ /^(gitlens|pr)$/ && gitlens:enabled && isInDiffEditor",
1414214132
"group": "navigation@-97"
1414314133
},
14134+
{
14135+
"command": "gitlens.ai.feedback.positive",
14136+
"when": "resourceScheme == gitlens-markdown && gitlens:markdown:feedback:available && activeCustomEditorId == vscode.markdown.preview.editor",
14137+
"group": "navigation@1"
14138+
},
14139+
{
14140+
"command": "gitlens.ai.feedback.negative",
14141+
"when": "resourceScheme == gitlens-markdown && gitlens:markdown:feedback:available && activeCustomEditorId == vscode.markdown.preview.editor",
14142+
"group": "navigation@2"
14143+
},
1414414144
{
1414514145
"command": "gitlens.regenerateMarkdownDocument",
1414614146
"when": "resourceScheme == gitlens-markdown && activeCustomEditorId == vscode.markdown.preview.editor",
14147-
"group": "navigation@0"
14147+
"group": "navigation@3"
1414814148
},
1414914149
{
1415014150
"command": "gitlens.openPatch",

0 commit comments

Comments
 (0)