Skip to content

Commit 232dbd5

Browse files
authored
Fix panel visibility and bump to 0.8.3 (#181)
1 parent a7ab611 commit 232dbd5

File tree

4 files changed

+14
-8
lines changed

4 files changed

+14
-8
lines changed

apps/vscode-extension/package.json

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"displayName": "Pretty TypeScript Errors",
44
"publisher": "YoavBls",
55
"description": "Make TypeScript errors prettier and more human-readable in VSCode",
6-
"version": "0.8.2",
6+
"version": "0.8.3",
77
"icon": "assets/icon.png",
88
"repository": {
99
"type": "git",
@@ -61,12 +61,10 @@
6161
"views": {
6262
"prettyTsErrors": [
6363
{
64-
"id": "prettyTsErrors.markdownPreview",
64+
"id": "prettyTsErrors.sidePanel",
6565
"icon": "./assets/ribbon.svg",
6666
"name": "Side Panel",
67-
"when": "prettyTsErrors.sidebarEnabled",
68-
"type": "webview",
69-
"visibility": "hidden"
67+
"type": "webview"
7068
}
7169
]
7270
},

apps/vscode-extension/src/commands/pinError.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,11 @@ export function registerPinError(context: ExtensionContext) {
1919
const viewProvider = getViewProvider();
2020
await viewProvider?.pinDiagnostic(range);
2121

22-
await commands.executeCommand("prettyTsErrors.markdownPreview.focus");
22+
try {
23+
await commands.executeCommand(
24+
"workbench.view.extension.prettyTsErrors"
25+
);
26+
} catch {}
2327
})
2428
)
2529
);

apps/vscode-extension/src/commands/showErrorInSidebar.ts

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,11 @@ export function registerShowErrorInSidebar(context: ExtensionContext) {
1717
}
1818
}
1919

20-
await commands.executeCommand("prettyTsErrors.markdownPreview.focus");
20+
try {
21+
await commands.executeCommand(
22+
"workbench.view.extension.prettyTsErrors"
23+
);
24+
} catch {}
2125
})
2226
)
2327
);

apps/vscode-extension/src/provider/webviewViewProvider.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ export function registerWebviewViewProvider(context: ExtensionContext) {
6060
);
6161
context.subscriptions.push(
6262
vscode.window.registerWebviewViewProvider(
63-
"prettyTsErrors.markdownPreview",
63+
"prettyTsErrors.sidePanel",
6464
viewProviderInstance
6565
),
6666
vscode.languages.onDidChangeDiagnostics(() => updateHasErrorsContext()),

0 commit comments

Comments
 (0)