From c9b46be79f032b3feeb9dfc2063b7e0e450af816 Mon Sep 17 00:00:00 2001 From: shmck Date: Mon, 15 Jul 2019 20:32:59 -0700 Subject: [PATCH 1/2] fix font-src loading issue --- src/editor/ReactWebView.ts | 37 ++++++++++++++++++++----------------- 1 file changed, 20 insertions(+), 17 deletions(-) diff --git a/src/editor/ReactWebView.ts b/src/editor/ReactWebView.ts index 91f0d58f..b656f6ed 100644 --- a/src/editor/ReactWebView.ts +++ b/src/editor/ReactWebView.ts @@ -47,13 +47,16 @@ class ReactWebView { } // prevents new panels from going ontop of coderoad panel - vscode.window.onDidChangeActiveTextEditor(param => { - if (!param || param.viewColumn !== vscode.ViewColumn.Two) { + vscode.window.onDidChangeActiveTextEditor((textEditor) => { + console.log('onDidChangeActiveTextEditor') + console.log(textEditor) + if (!textEditor || textEditor.viewColumn !== vscode.ViewColumn.Two) { updateWindows() } }) // // prevents moving coderoad panel on top of left panel - vscode.window.onDidChangeVisibleTextEditors(param => { + vscode.window.onDidChangeVisibleTextEditors((textEditor) => { + console.log('onDidChangeVisibleTextEditors') updateWindows() }) @@ -144,29 +147,29 @@ class ReactWebView { const [n1, n2, n3] = [1, 2, 3].map(this.getNonce) return ` - + - - - + + + React App - + - - - - + + })}/'> -
Loading...
- - - +
Loading...
+ + + ` } From 8f16421d44b2de87f8c5b3e7773a8d5e4ceffd0c Mon Sep 17 00:00:00 2001 From: shmck Date: Mon, 15 Jul 2019 21:04:05 -0700 Subject: [PATCH 2/2] allow webview to go to background --- src/editor/ReactWebView.ts | 1 - web-app/src/App.tsx | 2 -- 2 files changed, 3 deletions(-) diff --git a/src/editor/ReactWebView.ts b/src/editor/ReactWebView.ts index b656f6ed..30a65c37 100644 --- a/src/editor/ReactWebView.ts +++ b/src/editor/ReactWebView.ts @@ -43,7 +43,6 @@ class ReactWebView { orientation: 0, groups: [{ groups: [{}], size: 0.6 }, { groups: [{}], size: 0.4 }], }) - this.panel.reveal(vscode.ViewColumn.Two) } // prevents new panels from going ontop of coderoad panel diff --git a/web-app/src/App.tsx b/web-app/src/App.tsx index 2eae39bd..f6df1ad4 100644 --- a/web-app/src/App.tsx +++ b/web-app/src/App.tsx @@ -17,8 +17,6 @@ const App = () => { // update state based on response from editor const handleEvent = (event: ReceivedEvent): void => { const message = event.data - console.log('RECEIVED') - console.log(message) // messages from core if (message.type === 'SET_STATE') { setState(message.payload.state)