Skip to content

[Outlook] (sensitivity label) Add the unified manifest to the sample #995

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

Draft
wants to merge 9 commits into
base: main
Choose a base branch
from

Conversation

samantharamon
Copy link
Contributor

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

What's in this Pull Request?

  • Adds the unified manifest to the sample.
  • Fixes how the Highly Confidential sensitivity label is checked and set if it has child labels.
  • Moves the recipient and sensitivity label validations to more appropriate event handlers.

@samantharamon samantharamon marked this pull request as ready for review July 14, 2025 22:25
Copy link
Contributor

@Copilot 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 adds support for the unified manifest for Microsoft 365 to the Outlook sensitivity label sample, moves event handler logic into a dedicated runtime file, and updates build/configuration and documentation to reflect those changes.

  • Introduce a unified manifest (manifest.json, m365agents.yml) and update manifest.xml/manifest-localhost.xml to reference launchevent.html/launchevent.js and include the attachments event.
  • Move all event handler logic from commands.js into launchevent.js and remove the legacy commands.js file.
  • Update build pipeline (webpack.config.js) and sample documentation (README.md) with unified manifest instructions and adjust styling in taskpane.

Reviewed Changes

Copilot reviewed 12 out of 15 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
Samples/outlook-verify-sensitivity-label/webpack.config.js Fix development HTTPS setup and ensure unified manifest files are copied and transformed correctly
Samples/outlook-verify-sensitivity-label/src/taskpane/taskpane.html Added inline background color style
Samples/outlook-verify-sensitivity-label/src/launchevent/launchevent.js Centralized event handlers and fixed label-ID lookup when child labels exist
Samples/outlook-verify-sensitivity-label/src/launchevent/launchevent.html Updated script include to load launchevent.js
Samples/outlook-verify-sensitivity-label/src/commands/commands.js Removed legacy commands file
Samples/outlook-verify-sensitivity-label/package.json Updated package metadata, scripts, and dependencies
Samples/outlook-verify-sensitivity-label/manifest.xml Switched to launchevent pages, added attachments event
Samples/outlook-verify-sensitivity-label/manifest.json Added new unified manifest for Microsoft 365 with autoscale events
Samples/outlook-verify-sensitivity-label/manifest-localhost.xml Updated local manifest to reference launchevent and include attachments event
Samples/outlook-verify-sensitivity-label/m365agents.yml Added Microsoft 365 Agents Toolkit provisioning/deployment config
Samples/outlook-verify-sensitivity-label/README.md Expanded instructions for unified manifest and updated run scenarios
Samples/outlook-verify-sensitivity-label/.gitignore Added ignore patterns for build, env, and artifacts
Comments suppressed due to low confidence (2)

Samples/outlook-verify-sensitivity-label/src/launchevent/launchevent.js:456

  • The @returns JSDoc type is incorrect: getLabel returns a label object, not a number. Update the type to reflect the actual return value.
 * @returns {number} The sensitivity label requested. 

Samples/outlook-verify-sensitivity-label/src/taskpane/taskpane.html:24

  • [nitpick] Inline styling reduces maintainability; move the background-color definition into taskpane.css instead of using a style attribute.
<body class="ms-font-m ms-welcome ms-Fabric" style="background-color: white;">

},
server: {
type: "https",
options: env.WEBPACK_BUILD || options.https !== undefined ? options.https : await getHttpsOptions(),
Copy link
Preview

Copilot AI Jul 14, 2025

Choose a reason for hiding this comment

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

Operator precedence causes the ternary expression to be evaluated on the result of the logical OR. Consider adding parentheses around the ternary or splitting the condition to ensure the intended HTTPS options are selected.

Suggested change
options: env.WEBPACK_BUILD || options.https !== undefined ? options.https : await getHttpsOptions(),
options: env.WEBPACK_BUILD || (options.https !== undefined ? options.https : await getHttpsOptions()),

Copilot uses AI. Check for mistakes.

Copy link
Collaborator

@ElizabethSamuel-MSFT ElizabethSamuel-MSFT left a comment

Choose a reason for hiding this comment

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

Consider having subfolders for json vs add-in only. The root folder can default to .json content. package.json should have separate instructions for xml vs json manifest. Consider including package-lock so customers will have a last known good package state.

Ricky may have some more comments about how it's organized.

Also, I'm not seeing any change to assets/sample.json (e.g., change updateDateTime, products)

@samantharamon samantharamon marked this pull request as draft July 16, 2025 21:45
@samantharamon
Copy link
Contributor Author

Consider having subfolders for json vs add-in only. The root folder can default to .json content. package.json should have separate instructions for xml vs json manifest. Consider including package-lock so customers will have a last known good package state.

Ricky may have some more comments about how it's organized.

Also, I'm not seeing any change to assets/sample.json (e.g., change updateDateTime, products)

Thanks for the feedback, @ElizabethSamuel-MSFT. I'll look into creating subfolders for the manifests.

@Rick-Kirkham Please hold off on reviewing this PR for now until I reorganize the sample structure.

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.

3 participants