Skip to content

Commit 91fbed1

Browse files
committed
Remove click handler from status bar and add schema switch command to command palette
1 parent 465fa39 commit 91fbed1

3 files changed

Lines changed: 7 additions & 10 deletions

File tree

packages/apollo-vscode/package.json

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,11 @@
7676
"meta.embedded.block.graphql": "graphql"
7777
}
7878
}
79-
]
79+
],
80+
"commands": [{
81+
"command": "apollographql/selectSchemaTag",
82+
"title": "Select Schema Tag",
83+
"category": "Apollo"
84+
}]
8085
}
8186
}

packages/apollo-vscode/src/extension.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -92,11 +92,10 @@ export function activate(context: ExtensionContext) {
9292
);
9393

9494
schemaTags = [...quickPickItems, ...schemaTags];
95-
statusBar.enableClickHandler(true);
9695
}
9796
);
9897

99-
commands.registerCommand("launchSchemaTagPicker", async () => {
98+
commands.registerCommand("apollographql/selectSchemaTag", async () => {
10099
const selection = await window.showQuickPick(schemaTags);
101100
if (selection) {
102101
client.sendNotification("apollographql/tagSelected", selection);

packages/apollo-vscode/src/statusBar.ts

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,13 +20,6 @@ export default class ApolloStatusBar {
2020
this.statusBarItem.show();
2121
}
2222

23-
public enableClickHandler(isEnabled: boolean) {
24-
this.statusBarItem.tooltip = isEnabled ? "Select schema tag" : undefined;
25-
this.statusBarItem.command = isEnabled
26-
? "launchSchemaTagPicker"
27-
: undefined;
28-
}
29-
3023
public dispose() {
3124
this.statusBarItem.dispose();
3225
}

0 commit comments

Comments
 (0)