Skip to content
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

[Migration] migrate dev kit samples #867

Open
wants to merge 5 commits into
base: dev
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
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
21 changes: 21 additions & 0 deletions .config/CONTRIBUTING.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# Contributing
## Branch
Default branch is `dev`. You should set `dev` as the target branch of PRs. `dev` will be merged into `main` regularly after testing.

`main` branch is the release branch, which means all content in this branch will be directly consumed by the [Office Add-ins Development Kit](https://marketplace.visualstudio.com/items?itemName=msoffice.microsoft-office-add-in-debugger)'s sample gallery:
![alt text](assets/sample_gallery.png)

## Testing
TBD

## Add new sample
1. Add a new project folder under Samples directory.
1. Make sure it's runnable and well tested.
2. Add README.md and RUN_WITH_EXTENSION.md. You can use the README_TEMPLATE.md under root directory.
2. Add a new config to the [config file](samples-config-v1.json) with following format.
1. Fill in these values.
2. Make sure **id** has identical value with the folder name you just created
![alt text](assets/config_format.png)

### Config definition
![alt text](assets/config_definition.png)
Binary file added .config/assets/config_definition.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .config/assets/config_format.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added .config/assets/sample_gallery.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
175 changes: 175 additions & 0 deletions .config/samples-config-v1.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,175 @@
{
"filterOptions": {
"capabilities": [
"Word",
"Excel",
"PowerPoint"
],
"languages": [
"TS",
"JS"
],
"technologies": [
"Custom Function",
"SSO",
"Graph"
]
},
"samples": [
{
"id": "Excel-HelloWorld-TaskPane-JS",
"onboardDate": "2024-07-01",
"title": "Excel Hello World Task Pane Add-in",
"shortId": "Excel Hello World",
"shortDescription": "A simple Excel Task Pane Add-in using JavaScript.",
"fullDescription": "This sample demonstrates how to create a simple Excel Task Pane Add-in using JavaScript.",
"types": [
"Excel"
],
"tags": [
"JS",
"Hello World",
"Excel"
],
"thumbnailPath": "assets/thumbnail.png",
"gifPath": "assets/sampleDemo.gif",
"suggested": false
},
{
"id": "Word-HelloWorld-TaskPane-JS",
"onboardDate": "2024-07-01",
"title": "Word Hello World Task Pane Add-in",
"shortId": "Word Hello World",
"shortDescription": "A simple Word Task Pane Add-in using JavaScript.",
"fullDescription": "This sample demonstrates how to create a simple Word Task Pane Add-in using JavaScript.",
"types": [
"Word"
],
"tags": [
"JS",
"Hello World",
"Word"
],
"thumbnailPath": "assets/thumbnail.png",
"gifPath": "assets/sampleDemo.gif",
"suggested": false
},
{
"id": "Word-Add-in-AIGC",
"onboardDate": "2024-03-15",
"title": "Create a Word AIGC Add-in",
"shortId": "Word AIGC",
"shortDescription": "Inserting content generated by AI or predefined into document.",
"fullDescription": "This Add-in shows capabilities to insert content generated by AI or predefined into document and customize the style of document.",
"types": [
"Word"
],
"tags": [
"TS",
"AIGC",
"Word"
],
"thumbnailPath": "assets/thumbnail.png",
"gifPath": "assets/sampleDemo.gif",
"suggested": false
},
{
"id": "Word-Add-in-WritingAssistant",
"onboardDate": "2024-03-06",
"title": "Word Writing Assistant",
"shortId": "Word Writing Assistant",
"shortDescription": "A Word Add-in to assist writing with word document.",
"fullDescription": "This add-in demonstrates Word add-in capabilities to help users check errors, improve writing, and rephrase content.",
"types": [
"Word"
],
"tags": [
"TS",
"Writing Assistant",
"Word"
],
"thumbnailPath": "assets/thumbnail.png",
"gifPath": "assets/sampleDemo.gif",
"suggested": false
},
{
"id": "Excel-Add-in-ChartAPI-Analysis-Data",
"onboardDate": "2024-02-27",
"title": "Use the Excel Chart APIs to analyze data",
"shortId": "Chart API analyse data",
"shortDescription": "Using chart API to analyse data and showout using chart.",
"fullDescription": "The sample add-in demonstrates Excel add-in capablities to help users using chart API to analyse data.",
"types": [
"Excel"
],
"tags": [
"TS",
"Chart",
"Excel"
],
"thumbnailPath": "assets/thumbnail.png",
"gifPath": "assets/sampleDemo.gif",
"suggested": false
},
{
"id": "Excel-Add-in-Mail-Merge",
"onboardDate": "2024-02-27",
"title": "Create an Excel Mail Merge Add-in",
"shortId": "Excel Mail Merge",
"shortDescription": "Using the Microsoft Graph API to send emails in Excel.",
"fullDescription": "This sample demonstrates how to use the Microsoft Graph JavaScript SDK to send emails in Excel from Office Add-ins.",
"types": [
"Excel"
],
"tags": [
"JS",
"Mail Merge",
"Excel",
"SSO",
"Graph"
],
"thumbnailPath": "assets/thumbnail.png",
"gifPath": "assets/sampleDemo.gif",
"suggested": false
},
{
"id": "Excel-Add-in-Custom-Function-Using-WebWorker",
"onboardDate": "2024-02-28",
"title": "Custom Function Sample Using Web Worker",
"shortId": "CF using web worker",
"shortDescription": "Use web workers in custom functions to prevent blocking the UI of your Office Add-in.",
"fullDescription": "Shows how to use web workers in custom functions to prevent blocking the UI of your Office Add-in.",
"types": [
"Excel"
],
"tags": [
"Custom Function",
"JS",
"Excel",
"WebWorker"
],
"thumbnailPath": "assets/thumbnail.png",
"gifPath": "assets/sampleDemo.gif",
"suggested": false
},
{
"id": "Excel-Add-in-ShapeAPI-Dashboard",
"onboardDate": "2024-03-15",
"title": "Use Excel Shape API to Work as a Dashboard",
"shortId": "Shape API dashboard",
"shortDescription": "Using Shape related APIs to insert and format to work as a dashboard.",
"fullDescription": "The sample add-in demonstrates Excel add-in capablities to help users using shape API to work as a dashboard.",
"types": [
"Excel"
],
"tags": [
"TS",
"Shape",
"Excel"
],
"thumbnailPath": "assets/thumbnail.png",
"gifPath": "assets/sampleDemo.gif",
"suggested": false
}
]
}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
.vscode/
*.DS_Store
8 changes: 8 additions & 0 deletions Samples/Excel-Add-in-ChartAPI-Analysis-Data/.eslintrc.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"plugins": [
"office-addins"
],
"extends": [
"plugin:office-addins/recommended"
]
}
18 changes: 18 additions & 0 deletions Samples/Excel-Add-in-ChartAPI-Analysis-Data/.gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
node_modules
/dist

# local env files
.env.local
.env.*.local

# Log files
npm-debug.log*

# Editor directories and files
.idea
*.suo
*.ntvs*
*.njsproj
*.sln
*.sw*
package-lock.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
// See http://go.microsoft.com/fwlink/?LinkId=827846 to learn about workspace recommendations.
// Extension identifier format: ${publisher}.${name}. Example: vscode.csharp

// List of extensions which should be recommended for users of this workspace.
"recommendations": [
"ms-edgedevtools.vscode-edge-devtools",
"dbaeumer.vscode-eslint",
"esbenp.prettier-vscode"
],
// List of extensions recommended by VS Code that should not be recommended for users of this workspace.
"unwantedRecommendations": []
}
18 changes: 18 additions & 0 deletions Samples/Excel-Add-in-ChartAPI-Analysis-Data/.vscode/launch.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"name": "Excel Desktop (Edge Chromium)",
"type": "msedge",
"request": "attach",
"port": 9229,
"timeout": 600000,
"webRoot": "${workspaceRoot}",
"preLaunchTask": "Debug: Excel Desktop",
"postDebugTask": "Stop Debug"
},
]
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
{
"eslint.validate": [
"javascript",
"javascriptreact",
"typescript"
]
}

Loading