Skip to content

Commit fbfbc70

Browse files
[Outlook] (OWAView) Update snippet to include new value (OfficeDev#717)
* Update snippet * Apply suggestions from code review Co-authored-by: Elizabeth Samuel <elizs@microsoft.com> Co-authored-by: Elizabeth Samuel <elizs@microsoft.com>
1 parent 610e8f6 commit fbfbc70

File tree

2 files changed

+17
-11
lines changed

2 files changed

+17
-11
lines changed

samples/outlook/90-other-item-apis/get-diagnostic-information.yaml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -10,17 +10,20 @@ script:
1010
$("#get-diagnostics").click(getDiagnostics);
1111
1212
function getDiagnostics() {
13-
// This snippet gets a mailbox's diagnostic information, such as host application and version, and prints it to the console.
13+
// This function gets a mailbox's diagnostic information, such as Outlook client and version, and logs it to the console.
1414
const diagnostics = Office.context.mailbox.diagnostics;
15-
console.log(`Host application: ${diagnostics.hostName}`);
16-
console.log(`Host version: ${diagnostics.hostVersion}`);
15+
console.log(`Client application: ${diagnostics.hostName}`);
16+
console.log(`Client version: ${diagnostics.hostVersion}`);
1717
1818
switch (diagnostics.OWAView) {
1919
case undefined:
20-
console.log("Current view (Outlook on the web only): Not applicable. Host application is an Outlook desktop client.");
20+
console.log("Current view (Outlook on the web only): Not applicable. An Outlook desktop client is in use.");
21+
break;
22+
case Office.MailboxEnums.OWAView.OneColumnNarrow:
23+
console.log("Current view (Outlook on the web only): Viewed from an older generation mobile phone");
2124
break;
2225
case Office.MailboxEnums.OWAView.OneColumn:
23-
console.log("Current view (Outlook on the web only): Viewed from a mobile phone");
26+
console.log("Current view (Outlook on the web only): Viewed from a newer generation mobile phone");
2427
break;
2528
case Office.MailboxEnums.OWAView.TwoColumns:
2629
console.log("Current view (Outlook on the web only): Viewed from a tablet");

snippet-extractor-output/snippets.yaml

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -10605,22 +10605,25 @@
1060510605
// Link to full sample:
1060610606
https://raw.githubusercontent.com/OfficeDev/office-js-snippets/prod/samples/outlook/90-other-item-apis/get-diagnostic-information.yaml
1060710607

10608-
// This snippet gets a mailbox's diagnostic information, such as host
10609-
application and version, and prints it to the console.
10608+
// This snippet gets a mailbox's diagnostic information, such as Outlook
10609+
client and version, and logs it to the console.
1061010610

1061110611
const diagnostics = Office.context.mailbox.diagnostics;
1061210612

10613-
console.log(`Host application: ${diagnostics.hostName}`);
10613+
console.log(`Outlook client: ${diagnostics.hostName}`);
1061410614

10615-
console.log(`Host version: ${diagnostics.hostVersion}`);
10615+
console.log(`Client version: ${diagnostics.hostVersion}`);
1061610616

1061710617

1061810618
switch (diagnostics.OWAView) {
1061910619
case undefined:
10620-
console.log("Current view (Outlook on the web only): Not applicable. Host application is an Outlook desktop client.");
10620+
console.log("Current view (Outlook on the web only): Not applicable. An Outlook desktop client is in use.");
10621+
break;
10622+
case Office.MailboxEnums.OWAView.OneColumnNarrow:
10623+
console.log("Current view (Outlook on the web only): Viewed from an older generation mobile phone");
1062110624
break;
1062210625
case Office.MailboxEnums.OWAView.OneColumn:
10623-
console.log("Current view (Outlook on the web only): Viewed from a mobile phone");
10626+
console.log("Current view (Outlook on the web only): Viewed from a newer generation mobile phone");
1062410627
break;
1062510628
case Office.MailboxEnums.OWAView.TwoColumns:
1062610629
console.log("Current view (Outlook on the web only): Viewed from a tablet");

0 commit comments

Comments
 (0)