Skip to content

Commit be60b12

Browse files
committed
New commands added for quicker access to the docs
1 parent 757313e commit be60b12

File tree

6 files changed

+52
-4
lines changed

6 files changed

+52
-4
lines changed

CHANGELOG.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,11 @@
22

33
All notable changes to the "vscode-msgraph-essentials" extension will be documented in this file.
44

5+
## [0.0.5]
6+
7+
- Command added to open the Microsoft Graph API documenation
8+
- Command added to open the Graph Explorer website
9+
510
## [0.0.4]
611

712
- Added HTML web component autocompletion support for attributes

README.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,13 @@ The **HTML attributes** suggestions will automatically appear when using any of
4242

4343
![](./assets/html-attributes.png)
4444

45+
## Commands
46+
47+
Currently the extension has the following commands you can use:
48+
49+
- **MS Graph: Open API documentation site** (`msgraph.essentials.openDocs`)
50+
- **MS Graph: Open Graph Explorer site** (`msgraph.essentials.openGraphExplorer`)
51+
4552
## Snippets
4653

4754
### React

README_TMPL.md

Lines changed: 15 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,9 +18,11 @@
1818

1919
The Microsoft Graph Essentials extension helps you developing with the Microsoft Graph Toolkit & API.
2020

21-
## Autocompletion for CSS variabls
21+
## Autocompletion for CSS variables and HTML attributes
2222

23-
The extension gives you autocompletion for all the CSS variables which are used to customize the styling of the MGT web components.
23+
The extension gives you autocompletion for all the CSS variables and HTML web component attributes.
24+
25+
The **CSS variables** are used to customize the styling of the MGT web components.
2426

2527
Example:
2628

@@ -36,6 +38,17 @@ Using is as simple as starting to type `--`, and the extension will show you all
3638

3739
![](./assets/css-variables.png)
3840

41+
The **HTML attributes** suggestions will automatically appear when using any of the `mgt` components in HTML files.
42+
43+
![](./assets/html-attributes.png)
44+
45+
## Commands
46+
47+
Currently the extension has the following commands you can use:
48+
49+
- **MS Graph: Open API documentation site** (`msgraph.essentials.openDocs`)
50+
- **MS Graph: Open Graph Explorer site** (`msgraph.essentials.openGraphExplorer`)
51+
3952
## Snippets
4053

4154
### React

package.json

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,10 +23,22 @@
2323
"eliostruyf.vscode-msgraph-autocomplete"
2424
],
2525
"activationEvents": [
26-
"*"
26+
"*",
27+
"onCommand:msgraph.essentials.openDocs",
28+
"onCommand:msgraph.essentials.openGraphExplorer"
2729
],
2830
"main": "./out/extension.js",
2931
"contributes": {
32+
"commands": [
33+
{
34+
"command": "msgraph.essentials.openDocs",
35+
"title": "MS Graph: Open API documentation site"
36+
},
37+
{
38+
"command": "msgraph.essentials.openGraphExplorer",
39+
"title": "MS Graph: Open Graph Explorer site"
40+
}
41+
],
3042
"snippets": [
3143
{
3244
"language": "typescriptreact",

src/autocomplete/css/css.variables.json

Lines changed: 1 addition & 1 deletion
Large diffs are not rendered by default.

src/extension.ts

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,17 @@ import { CssVariableProvider } from './providers/CssVariableProvider';
33
import { HtmlVariableProvider } from './providers/HtmlVariableProvider';
44

55
export function activate(context: vscode.ExtensionContext) {
6+
7+
const openDocs = vscode.commands.registerCommand('msgraph.essentials.openDocs', async () => {
8+
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('https://docs.microsoft.com/en-us/graph/api/overview?view=graph-rest-1.0'));
9+
});
10+
context.subscriptions.push(openDocs);
11+
12+
const openGraphExplorer = vscode.commands.registerCommand('msgraph.essentials.openGraphExplorer', async () => {
13+
vscode.commands.executeCommand('vscode.open', vscode.Uri.parse('https://developer.microsoft.com/en-us/graph/graph-explorer'));
14+
});
15+
context.subscriptions.push(openGraphExplorer);
16+
617
const cssProvider = vscode.languages.registerCompletionItemProvider([
718
{ language: 'css' },
819
{ language: 'less' },

0 commit comments

Comments
 (0)