Skip to content

Commit 76119e4

Browse files
authored
A new experimental database panel (#1682)
* Add new config setting * Add a new database panel behind experimental config
1 parent b641007 commit 76119e4

File tree

2 files changed

+16
-0
lines changed

2 files changed

+16
-0
lines changed

extensions/ql-vscode/package.json

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -37,6 +37,7 @@
3737
"onLanguage:ql",
3838
"onLanguage:ql-summary",
3939
"onView:codeQLDatabases",
40+
"onView:codeQLDatabasesExperimental",
4041
"onView:codeQLQueryHistory",
4142
"onView:codeQLAstViewer",
4243
"onView:codeQLEvalLogViewer",
@@ -1208,6 +1209,11 @@
12081209
"id": "codeQLDatabases",
12091210
"name": "Databases"
12101211
},
1212+
{
1213+
"id": "codeQLDatabasesExperimental",
1214+
"name": "Databases",
1215+
"when": "config.codeQL.canary && config.codeQL.newQueryRunExperience"
1216+
},
12111217
{
12121218
"id": "codeQLQueryHistory",
12131219
"name": "Query History"

extensions/ql-vscode/src/config.ts

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -438,6 +438,16 @@ export function isVariantAnalysisLiveResultsEnabled(): boolean {
438438
return !!LIVE_RESULTS.getValue<boolean>();
439439
}
440440

441+
/**
442+
* A flag indicating whether to use the new query run experience which involves
443+
* using a new database panel.
444+
*/
445+
const NEW_QUERY_RUN_EXPERIENCE = new Setting('newQueryRunExperience', ROOT_SETTING);
446+
447+
export function isNewQueryRunExperienceEnabled(): boolean {
448+
return !!NEW_QUERY_RUN_EXPERIENCE.getValue<boolean>();
449+
}
450+
441451
// Settings for mocking the GitHub API.
442452
const MOCK_GH_API_SERVER = new Setting('mockGitHubApiServer', ROOT_SETTING);
443453

0 commit comments

Comments
 (0)