Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/main' into graph
Browse files Browse the repository at this point in the history
  • Loading branch information
wandyezj committed Sep 17, 2024
2 parents c4ab813 + 3b9f99f commit 12d1e63
Show file tree
Hide file tree
Showing 82 changed files with 3,232 additions and 367 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -70,11 +70,11 @@ jobs:
path: dist/

## end to end tests
- name: Install Playwright Browsers
- name: Playwright Install
if: inputs.test
run: npm run playwright-install

- name: Run Playwright tests
- name: Playwright Test
if: inputs.test
run: npm run playwright-test
env:
Expand Down
9 changes: 8 additions & 1 deletion .vscode/cspell.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,20 +7,27 @@
// words - list of words to be always considered correct
// prettier-ignore
"words": [
"Addin",
"appsforoffice",
"aspnetcdn",
"CODEOWNERS",
"deepskyblue",
"endregion",
"eqeqeq",
"firstpartyapps",
"fluentui",
"HIDETASKPANE",
"Inkscape",
"linebreak",
"markdownlint",
"minifier",
"oaspapps",
"prettierrc",
"Runtimes",
"SETCOLOR",
"SHOWTASKPANE",
"Sideload",
"Sideloading",
"sideloading",
"taskpane",
"Taskpanes",
"telemetryservice",
Expand Down
3 changes: 1 addition & 2 deletions .vscode/extensions.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"ms-playwright.playwright",
"bierner.github-markdown-preview",
"streetsidesoftware.code-spell-checker",
"vscode-icons-team.vscode-icons",
"redhat.vscode-xml"
"vscode-icons-team.vscode-icons"
]
}
7 changes: 5 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,12 @@

![Logo](./assets/icon-80.png)

Get the [Build Add-In](https://appsource.microsoft.com/en-us/product/office/WA200006798).
Get the Build Add-In from Microsoft AppSource:

Get the [Build for Outlook Add-In](https://appsource.microsoft.com/en-us/product/office/WA200006932).
- Get for [Word, Excel, and PowerPoint](https://appsource.microsoft.com/en-us/product/office/WA200006798).
- Get for [Outlook](https://appsource.microsoft.com/en-us/product/office/WA200006932).

Alternatively, [sideload the manifests](https://github.com/wandyezj/build-add-in/blob/main/docs/sideload.md).

[Tutorial](https://github.com/wandyezj/build-add-in/blob/main/docs/tutorial.md)

Expand Down
3 changes: 3 additions & 0 deletions assets/fluent-svg/ic_fluent_script_16_regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
3 changes: 3 additions & 0 deletions assets/fluent-svg/ic_fluent_script_32_regular.svg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
8 changes: 8 additions & 0 deletions assets/generate.cmd
Original file line number Diff line number Diff line change
Expand Up @@ -42,6 +42,9 @@ for %%n in (edit play settings) do (
:: help
call :make_icon question icon-help

:: actions
call :make_icon script icon-actions


goto :eof

Expand All @@ -59,6 +62,11 @@ for %%s in (16 32 80) do (
if !svg_size! GEQ 48 set svg_size=48

set source_svg="%THISDIR%/fluent-svg/ic_fluent_!svg_name!_!svg_size!_regular.svg"
if not exist !source_svg! (
set svg_size=32
set source_svg="%THISDIR%/fluent-svg/ic_fluent_!svg_name!_!svg_size!_regular.svg"
)

set destination_png="%THISDIR%/!png_name!-!png_size!.png"

echo !png_name! !png_size!
Expand Down
Binary file added assets/icon-actions-16.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 assets/icon-actions-32.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 assets/icon-actions-80.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
10 changes: 10 additions & 0 deletions config/webpack.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,7 @@ module.exports = async (env, options) => {
edit: "./src/edit.tsx",
run: "./src/run.ts",
help: "./src/help.tsx",
actions: "./src/actions.ts",
settings: "./src/settings.tsx",
blocks: "./src/blocks.tsx",
test: "./src/test.ts",
Expand Down Expand Up @@ -115,6 +116,11 @@ module.exports = async (env, options) => {
filename: "help.html",
chunks: ["help"],
}),
new HtmlWebpackPlugin({
template: "src/actions.html",
filename: "actions.html",
chunks: ["actions"],
}),
new HtmlWebpackPlugin({
template: "src/settings.html",
filename: "settings.html",
Expand Down Expand Up @@ -151,6 +157,10 @@ module.exports = async (env, options) => {
to: "robots.txt",
},
{ from: "assets/*.png", to: "" },
{
from: "./src/shortcuts.json",
to: "shortcuts.json",
},
{
from: "statements/*.md",
to: "statements/[name].html",
Expand Down
10 changes: 10 additions & 0 deletions docs/features/actions.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
# Actions

Associate a trigger with an action.

- Trigger
- office.js event
- shortcut
- Action
- executable JavaScript

6 changes: 6 additions & 0 deletions docs/features/content-security-policy.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
# Content Security Policy

The policy applied

- script-src `ajax.aspnetcdn.com`
- required for outlook, loaded by office.js
21 changes: 21 additions & 0 deletions docs/features/github-gist-storage.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
# GitHub Gist Storage

Create a source for GitHub gists.

## Display on UI

- [ ] Add GitHub storage location.
- [] GitHub Icon
- [ ] Use Gist id as the id.
- [ ] Manual Save (so there are not multiple revisions)
- Database entry for local copy, and version based on (only for edited)
- When saved verify there hasn't been a revision (use created at and updated at)
- if based off latest revision -> update
- if newer revision -> dialog overwrite or create new gist.
- provide option to public or private save
- [ ] Differentiate between private and public gists
- [ ] Only enable if a valid PAT is present
- How to check if valid?
- if any of the calls fail, say check the pat? (especially as PATs expire)
- Offer to open URL: https://github.com/settings/personal-access-tokens and directions to Regenerate Token.
- [ ] Document how to use as a feature
3 changes: 3 additions & 0 deletions docs/notes/ideas.md
Original file line number Diff line number Diff line change
Expand Up @@ -120,6 +120,9 @@ Technical
- [Keyboard Shortcuts](https://learn.microsoft.com/en-us/office/dev/add-ins/design/keyboard-shortcuts)
- [Keyboard Shortcuts Sample](https://github.com/OfficeDev/Office-Add-in-samples/tree/main/Samples/excel-keyboard-shortcuts)

- Shortcuts are Only Supported in Excel?
- Shared Runtime is only Excel and PowerPoint?

- Run hotkey functions in an iframe. This is challenging since need a way to forward office.js calls. So will probably simply execute in context, try to make sure global state is not disrupted.

Instead of iframe can embed in text before evaluation and hide some things that shouldn't be accessed via shadowing.
Expand Down
2 changes: 1 addition & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Other manifest files are generated from the base files using:

> npm run manifest
Once you have updates the manifests, test them via [sideloading](./sideloading.md).
Once you have updates the manifests, test them via [sideloading](./sideload.md).


## Test
Expand Down
55 changes: 55 additions & 0 deletions docs/sideload.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
# Sideload

[Sideload Add-Ins for testing][sideload-docs]

For outlook web use:
https://outlook.live.com/mail/0/inclientstore

## Production

Download the production manifest:

- Get for [Word, Excel, and PowerPoint](https://store.office.com/app/download?assetid=WA200006798&cmu=en-US).
- Get for [Outlook](https://store.office.com/app/download?assetid=WA200006932&cmu=en-US).

If you are using a managed account, there is an IT setting that can disable loading from the store and a setting that can disable sideloading. If you can't access the store you might still be able to sideload.


## Setup manifest share

As administrator run:
> .\scripts\create-manifest-share.cmd
## Copy over manifests

This copies over the latest manifests to the manifest share.

> npm run share
## Load the local manifest

Basic manifests are located in the [manifests folder](../manifests/)

Follow: [Sideload Add-Ins for testing][sideload-docs]

Load

- `local.xml` for Word, Excel, PowerPoint.
- `local.outlook.xml` for Outlook.

Click the `[Local]` Ribbon Tab to view the local version.

### Sideloading Outlook Web

[Install Teams Toolkit cli](https://www.npmjs.com/package/@microsoft/teamsapp-cli)

> npm install -g @microsoft/teamsapp-cli
[Install the Manifest](https://learn.microsoft.com/en-us/microsoftteams/platform/toolkit/teams-toolkit-cli?pivots=version-three#teamsapp-install)

> teamsapp install --xml-path manifest.xml
Where `manifest.xml` is the path to the manifest.


[sideload-docs]: https://learn.microsoft.com/en-us/office/dev/add-ins/testing/sideload-office-add-ins-for-testing
17 changes: 0 additions & 17 deletions docs/sideloading.md

This file was deleted.

Loading

0 comments on commit 12d1e63

Please sign in to comment.