diff --git a/CHANGELOG.md b/CHANGELOG.md index 7a4e13a04..916dade6f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -3,6 +3,15 @@ _Breaking changes indicated with *_ We will use this space to highlight major and/or breaking changes to Malloy. +## v0.2.x + +### VS Code helper view windows relocated + +To improve discoverability and reduce extra clicking around in VS Code, we've relocated the Help, Connections, and Schema View Windows into the Explorer View. They will only appear when a `.malloy` file is opened. + +Screen Shot 2022-08-08 at 11 32 26 AM + + ## v0.0.10 ### The apply operator is now ? and not : diff --git a/packages/malloy-vscode/package.json b/packages/malloy-vscode/package.json index 31ee339db..954a46646 100644 --- a/packages/malloy-vscode/package.json +++ b/packages/malloy-vscode/package.json @@ -3,7 +3,7 @@ "publisher": "malloydata", "displayName": "Malloy", "description": "Malloy is an experimental language for describing data relationships and transformations", - "version": "0.0.10", + "version": "0.2.0", "engines": { "vscode": "^1.63.0" }, @@ -51,15 +51,6 @@ "url": "https://github.com/looker-open-source/malloy" }, "contributes": { - "viewsContainers": { - "activitybar": [ - { - "id": "malloy", - "title": "Malloy", - "icon": "img/logo.png" - } - ] - }, "commands": [ { "command": "malloy.showLicenses", @@ -175,19 +166,22 @@ } ], "views": { - "malloy": [ + "explorer": [ { "id": "malloyHelp", - "name": "Help", - "type": "webview" + "name": "Malloy Help", + "type": "webview", + "when": "malloy.webviewPanelFocused == true || resourceFilename =~ /\\.malloy$/" }, { "id": "malloySchema", - "name": "Schema" + "name": "Malloy Schema", + "when": "malloy.webviewPanelFocused == true || resourceFilename =~ /\\.malloy$/" }, { "id": "malloyConnections", - "name": "Connections" + "name": "Malloy Connections", + "when": "malloy.webviewPanelFocused == true || resourceFilename =~ /\\.malloy$/" } ] }, diff --git a/packages/malloy-vscode/src/extension/commands/run_query_utils.ts b/packages/malloy-vscode/src/extension/commands/run_query_utils.ts index 8da42016c..c03105008 100644 --- a/packages/malloy-vscode/src/extension/commands/run_query_utils.ts +++ b/packages/malloy-vscode/src/extension/commands/run_query_utils.ts @@ -184,6 +184,17 @@ export function runMalloyQuery( { viewColumn: vscode.ViewColumn.Beside, preserveFocus: true }, { enableScripts: true, retainContextWhenHidden: true } ); + + panel.onDidChangeViewState( + (e: vscode.WebviewPanelOnDidChangeViewStateEvent) => { + vscode.commands.executeCommand( + "setContext", + "malloy.webviewPanelFocused", + e.webviewPanel.active + ); + } + ); + current = { panel, messages: new WebviewMessageManager(panel),