Skip to content

Fix/workflow #8

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 7 commits into from
Jun 14, 2019
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
load current
  • Loading branch information
ShMcK committed Jun 14, 2019
commit 7804d04977ea1d4ccd96cfe48f4a5e089153d2eb
3 changes: 1 addition & 2 deletions src/editor/ReactWebView.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ class ReactWebView {
console.log('webview loaded')
}

public async createOrShow(column: number): Promise<void> {
public createOrShow(column: number): void {
// If we already have a panel, show it.
// Otherwise, create a new panel.
if (this.panel && this.panel.webview) {
Expand All @@ -40,7 +40,6 @@ class ReactWebView {
} else {
console.log('make new panel')
this.panel = this.createWebviewPanel(column)

}
}

Expand Down
3 changes: 3 additions & 0 deletions src/editor/commands/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,9 @@ export const createCommands = ({ context, machine, storage, git, position }: Cre
// open React webview
[COMMANDS.OPEN_WEBVIEW]: (column: number = vscode.ViewColumn.One) => {
webview.createOrShow(column);
setTimeout(() => {
machine.send('WEBVIEW_INITIALIZED')
}, 2000)
},
// launch a new tutorial
// NOTE: may be better to move into action as logic is primarily non-vscode
Expand Down
1 change: 1 addition & 0 deletions typings/index.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,7 @@ export interface MachineStateSchema {
states: {
Initialize: {}
Summary: {}
LoadCurrent: {}
LoadNext: {}
Level: {}
Stage: {
Expand Down