Skip to content

[Excel] (hello world) Add unified manifest#979

Merged
alison-mk merged 21 commits intomainfrom
alison-mk-unified-manifest-hello-world
Apr 7, 2026
Merged

[Excel] (hello world) Add unified manifest#979
alison-mk merged 21 commits intomainfrom
alison-mk-unified-manifest-hello-world

Conversation

@alison-mk
Copy link
Copy Markdown
Contributor

@alison-mk alison-mk commented Jun 4, 2025

Q A
Bug fix? no
New feature? no
New sample? no
Related issues? none

What's in this Pull Request?

Converts to the unified manifest for Microsoft 365.

@Rick-Kirkham Rick-Kirkham added the Do Not Merge This PR has additional work or review required before it is ready to merge. label Jun 11, 2025
@alison-mk alison-mk marked this pull request as ready for review February 6, 2026 03:19
@alison-mk alison-mk requested a review from Copilot March 31, 2026 21:51
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR converts the Excel Hello World sample from XML manifests to the unified manifest for Microsoft 365 (JSON) and adds the supporting webpack + npm tooling to build/sideload it.

Changes:

  • Replaces manifest.xml / manifest-localhost.xml with a unified manifest.json (v1.25).
  • Adds webpack build configuration to generate a production-ready dist/manifest.json and copy assets.
  • Updates the README to reflect new prerequisites and run instructions; adds sample-local .gitignore and a new package.json.

Reviewed changes

Copilot reviewed 7 out of 8 changed files in this pull request and generated 4 comments.

Show a summary per file
File Description
Samples/hello-world/excel-hello-world/webpack.config.js Adds webpack build/dev-server config and manifest URL rewriting for prod builds.
Samples/hello-world/excel-hello-world/README.md Updates documentation for unified manifest usage and new run flows.
Samples/hello-world/excel-hello-world/package.json Introduces scripts and dependencies for building, debugging, and validating the unified manifest.
Samples/hello-world/excel-hello-world/manifest.json Adds the unified manifest (v1.25) describing the add-in commands/runtime.
Samples/hello-world/excel-hello-world/.gitignore Adds local ignores for node/TeamsFx/build artifacts.
Samples/hello-world/excel-hello-world/manifest.xml Removes legacy XML manifest (GitHub-hosted variant).
Samples/hello-world/excel-hello-world/manifest-localhost.xml Removes legacy XML manifest (localhost variant).

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment on lines +65 to +72
from: "manifest*.json",
to: "[name]" + "[ext]",
transform(content) {
if (dev) {
return content;
} else {
return content.toString().replace(new RegExp(urlDev, "g"), urlProd);
}
Copy link

Copilot AI Mar 31, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The production manifest URL replacement only replaces the exact urlDev string (https://localhost:3000/). In manifest.json, validDomains uses https://localhost:3000 (no trailing slash), so the dev host will remain in dist/manifest.json after a production build. This can cause the prod manifest to reference officedev.github.io URLs while still only allowing localhost in validDomains. Update the transform to also replace the no-trailing-slash form (or replace just the origin/host in a URL-aware way) so validDomains and all URLs are updated consistently.

Copilot uses AI. Check for mistakes.
@alison-mk alison-mk removed the Do Not Merge This PR has additional work or review required before it is ready to merge. label Apr 2, 2026
@alison-mk alison-mk requested a review from Rick-Kirkham April 2, 2026 22:10
Choose the **Hello world** button on the **Home** tab to display the task pane of the add-in. Choose the **Say hello** button to insert "Hello world!" in cell A1.
When you're finished working with the add-in, close Excel, and then in the window where you ran the three npm commands, run `npm run stop:prod`.

## Run the sample on Excel on Windows or Mac
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this section. The package.json and unified manifest are configured to automatically sideload on desktop anyway. This sample doesn't give the option of testing on the web.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Rick-Kirkham Thank you for the review! I adjusted the PR to retain the XML manifest options, so that the sample is still cross-platform (unified manifest is only supported on Windows). Could you review again?

- [Sideload Office Add-ins on Mac for testing](https://learn.microsoft.com/office/dev/add-ins/testing/sideload-an-office-add-in-on-mac)
- [Sideload Office Add-ins on iPad for testing](https://learn.microsoft.com/office/dev/add-ins/testing/sideload-an-office-add-in-on-ipad)

## Configure a localhost web server and run the sample from localhost
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Delete this section. There's only one unified manifest and it uses local host, not the github hosting, so users are taking this "option" already.

## Applies to

- Excel on Windows, Mac, and in a browser.
- Excel on Windows, Mac, and the web.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I thought we were keeping the .xml manifest because unified manifest doesn't currently support Mac?

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this sample remains without XML, then you may need to remove Mac from the support list for now

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you! I adjusted the PR to retain the XML manifest.

@alison-mk alison-mk requested a review from Rick-Kirkham April 7, 2026 01:15
Copy link
Copy Markdown
Contributor

@Rick-Kirkham Rick-Kirkham left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approving with an exception that will reduce the steps for the developer.

Co-authored-by: Rick Kirkham <Rick-Kirkham@users.noreply.github.com>
@alison-mk alison-mk merged commit 9b4476f into main Apr 7, 2026
1 check passed
@alison-mk alison-mk deleted the alison-mk-unified-manifest-hello-world branch April 7, 2026 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants