Skip to content

Commit 7f3f338

Browse files
authored
Merge pull request github#2350 from github/nora/remove-query-history-title-bar-actions
Remove query history title actions
2 parents 043adbf + 82c8068 commit 7f3f338

File tree

4 files changed

+2
-54
lines changed

4 files changed

+2
-54
lines changed

extensions/ql-vscode/CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Added ability to filter repositories for a variant analysis to only those that have results [#2343](https://github.com/github/vscode-codeql/pull/2343)
66
- Add new configuration option to allow downloading databases from http, non-secure servers. [#2332](https://github.com/github/vscode-codeql/pull/2332)
7+
- Remove title actions from the query history panel that depended on history items being selected. [#2350](https://github.com/github/vscode-codeql/pull/2350)
78

89
## 1.8.2 - 12 April 2023
910

extensions/ql-vscode/package.json

Lines changed: 0 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -633,11 +633,6 @@
633633
"command": "codeQL.checkForUpdatesToCLI",
634634
"title": "CodeQL: Check for CLI Updates"
635635
},
636-
{
637-
"command": "codeQLQueryHistory.openQueryTitleMenu",
638-
"title": "View Query",
639-
"icon": "$(edit)"
640-
},
641636
{
642637
"command": "codeQLQueryHistory.openQueryContextMenu",
643638
"title": "View Query",
@@ -648,11 +643,6 @@
648643
"title": "Open Query Results",
649644
"icon": "$(preview)"
650645
},
651-
{
652-
"command": "codeQLQueryHistory.removeHistoryItemTitleMenu",
653-
"title": "Delete",
654-
"icon": "$(trash)"
655-
},
656646
{
657647
"command": "codeQLQueryHistory.removeHistoryItemContextMenu",
658648
"title": "Delete",
@@ -853,21 +843,6 @@
853843
"when": "view == codeQLDatabases",
854844
"group": "navigation"
855845
},
856-
{
857-
"command": "codeQLQueryHistory.openQueryTitleMenu",
858-
"when": "view == codeQLQueryHistory",
859-
"group": "navigation"
860-
},
861-
{
862-
"command": "codeQLQueryHistory.itemClicked",
863-
"when": "view == codeQLQueryHistory",
864-
"group": "navigation"
865-
},
866-
{
867-
"command": "codeQLQueryHistory.removeHistoryItemTitleMenu",
868-
"when": "view == codeQLQueryHistory",
869-
"group": "navigation"
870-
},
871846
{
872847
"command": "codeQLQueryHistory.sortByName",
873848
"when": "view == codeQLQueryHistory",
@@ -1310,18 +1285,10 @@
13101285
"command": "codeQLDatabases.upgradeDatabase",
13111286
"when": "false"
13121287
},
1313-
{
1314-
"command": "codeQLQueryHistory.openQueryTitleMenu",
1315-
"when": "false"
1316-
},
13171288
{
13181289
"command": "codeQLQueryHistory.openQueryContextMenu",
13191290
"when": "false"
13201291
},
1321-
{
1322-
"command": "codeQLQueryHistory.removeHistoryItemTitleMenu",
1323-
"when": "false"
1324-
},
13251292
{
13261293
"command": "codeQLQueryHistory.removeHistoryItemContextMenu",
13271294
"when": "false"

extensions/ql-vscode/src/common/commands.ts

Lines changed: 1 addition & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -13,21 +13,6 @@ import type {
1313
} from "../variant-analysis/shared/variant-analysis";
1414
import type { QLDebugConfiguration } from "../debugger/debug-configuration";
1515

16-
// A command function matching the signature that VS Code calls when
17-
// a command is invoked from the title bar of a TreeView with
18-
// canSelectMany set to true.
19-
//
20-
// It is possible to get any combination of singleItem and multiSelect
21-
// to be undefined. This is because it is possible to click a title bar
22-
// option without interacting with any individual items first, or even
23-
// when there are no items present at all.
24-
// If both singleItem and multiSelect are defined, then singleItem will
25-
// be contained within multiSelect.
26-
export type TreeViewTitleMultiSelectionCommandFunction<Item> = (
27-
singleItem: Item | undefined,
28-
multiSelect: Item[] | undefined,
29-
) => Promise<void>;
30-
3116
// A command function matching the signature that VS Code calls when
3217
// a command is invoked from a context menu on a TreeView with
3318
// canSelectMany set to true.
@@ -176,9 +161,7 @@ export type QueryHistoryCommands = {
176161
"codeQLQueryHistory.sortByCount": () => Promise<void>;
177162

178163
// Commands in the context menu or in the hover menu
179-
"codeQLQueryHistory.openQueryTitleMenu": TreeViewTitleMultiSelectionCommandFunction<QueryHistoryInfo>;
180164
"codeQLQueryHistory.openQueryContextMenu": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
181-
"codeQLQueryHistory.removeHistoryItemTitleMenu": TreeViewTitleMultiSelectionCommandFunction<QueryHistoryInfo>;
182165
"codeQLQueryHistory.removeHistoryItemContextMenu": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
183166
"codeQLQueryHistory.removeHistoryItemContextInline": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
184167
"codeQLQueryHistory.renameItem": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
@@ -195,7 +178,7 @@ export type QueryHistoryCommands = {
195178
"codeQLQueryHistory.viewCsvAlerts": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
196179
"codeQLQueryHistory.viewSarifAlerts": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
197180
"codeQLQueryHistory.viewDil": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
198-
"codeQLQueryHistory.itemClicked": TreeViewTitleMultiSelectionCommandFunction<QueryHistoryInfo>;
181+
"codeQLQueryHistory.itemClicked": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
199182
"codeQLQueryHistory.openOnGithub": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
200183
"codeQLQueryHistory.copyRepoList": TreeViewContextMultiSelectionCommandFunction<QueryHistoryInfo>;
201184

extensions/ql-vscode/src/query-history/query-history-manager.ts

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -235,11 +235,8 @@ export class QueryHistoryManager extends DisposableObject {
235235
"codeQLQueryHistory.sortByDate": this.handleSortByDate.bind(this),
236236
"codeQLQueryHistory.sortByCount": this.handleSortByCount.bind(this),
237237

238-
"codeQLQueryHistory.openQueryTitleMenu": this.handleOpenQuery.bind(this),
239238
"codeQLQueryHistory.openQueryContextMenu":
240239
this.handleOpenQuery.bind(this),
241-
"codeQLQueryHistory.removeHistoryItemTitleMenu":
242-
this.handleRemoveHistoryItem.bind(this),
243240
"codeQLQueryHistory.removeHistoryItemContextMenu":
244241
this.handleRemoveHistoryItem.bind(this),
245242
"codeQLQueryHistory.removeHistoryItemContextInline":

0 commit comments

Comments
 (0)