Skip to content

Commit c367e3e

Browse files
committed
Updating docs for 1.16 release
1 parent 9d81173 commit c367e3e

File tree

4 files changed

+36
-30
lines changed

4 files changed

+36
-30
lines changed

docs/spfx/office/overview.md

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,6 @@ ms.localizationpriority: high
66
---
77
# Extend Outlook and Office with the SharePoint Framework
88

9-
[!INCLUDE [spfx-release-beta](../../../includes/snippets/spfx-release-beta.md)]
10-
119
The SharePoint Framework (SPFx) v1.16 release added support for the [Microsoft Teams JavaScript client SDK v2](/javascript/api/overview/msteams-client). The Microsoft Teams JavaScript client SDK v2 introduced the ability to enable [Teams apps to run in Outlook at Office, in addition to Microsoft Teams](/microsoftteams/platform/m365-apps/overview).
1210

1311
With this improvement in SPFx v1.16, developers can now use the SPFx to create apps for Outlook and Office using the [existing support for creating apps for Microsoft Teams](/sharepoint/dev/spfx/build-for-teams-overview).

docs/spfx/release-1.16.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,9 @@ Node.js v12 & v14 are no longer supported. SPFx v1.16 requires Node.js v16.
161161
> [!NOTE]
162162
> Node.js v18 support is scheduled for the first half of the 2023 calendar year.
163163
164-
## Preview features
164+
## Preview Features and Capabilities
165+
166+
Following features are still in preview status as part of the 1.16 release and should not be used in production. We are looking into releasing them officially as part of the upcoming 1.17 release.
165167

166168
### Web part Top Actions
167169

@@ -195,7 +197,7 @@ export interface ITopActions {
195197
196198
See more details on the code level guidance from the following article
197199

198-
* [link](https://www.fi)
200+
* [Adding support for Top Actions](web-parts/guidance/getting-started-with-top-actions.md))
199201

200202

201203
## Deprecations

docs/spfx/web-parts/guidance/getting-started-with-top-actions.md

Lines changed: 26 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,18 @@
11
---
22
title: Adding support for Top Actions
33
description: Top Actions is a SharePoint Framework feature that allows web part developers to add commands to a web part's toolbar
4-
ms.date: 11/14/2022
4+
ms.date: 11/15/2022
5+
ms.localizationpriority: high
56
---
67

78
# Adding support for Top Actions
89

10+
[!INCLUDE [spfx-release-beta](../../../../includes/snippets/spfx-release-beta.md)]
11+
912
Today, users need to be aware of the web part property panels to find out the additional options each web part provides. This is a common piece of feedback where users want actions surfacing in context of where they are without having to rely on opening something to get to those options. Therefore, we are now allowing to surface most common configurations from a web part's property panel directly on to the web part's toolbar. These common configurations are referred to as the web part's Top Actions.
1013

1114
> [!IMPORTANT]
12-
> This feature is still preview status as part of the 1.16 release and should not be used in production. We are looking into releasing them officially as part of the upcoming 1.17 release.
13-
14-
> At the time of writing this article, Top Actions only supports rendering a drop down and button command.
15-
15+
> This feature is still preview status as part of the 1.16 release and should not be used in production. We are looking into releasing them officially as part of the upcoming 1.17 release.At the time of writing this article, Top Actions only supports rendering a drop-down and button command.
1616
1717
![Top Actions Example](../../../images/webpart-top-actions.png)
1818

@@ -21,11 +21,12 @@ Today, users need to be aware of the web part property panels to find out the ad
2121
> [!TIP]
2222
> These instructions assume you know [how to create a hello world web part](../get-started/build-a-hello-world-web-part.md).
2323
24-
### 1. Define your Top Action configurations
24+
### Define your Top Action configurations
2525

2626
In the example below we are defining the callback function that will be used to pull the configurations for our Top Action commands.
2727

28-
> Note: `getTopActionsConfiguration` must be defined as public on your web part's class.
28+
> [!NOTE]
29+
> `getTopActionsConfiguration` must be defined as public on your web part's class.
2930
3031
```typescript
3132
import { ITopActions } from '@microsoft/sp-top-actions';
@@ -38,7 +39,7 @@ public getTopActionsConfiguration(): ITopActions | undefined {
3839
}
3940
```
4041

41-
### 3. Define your toolbar's user interface
42+
### Define your toolbar's user interface
4243

4344
The `topActions` array is an ordered list of controls to render in the web part toolbar. In the example below we are defining one top action as a button interface.
4445

@@ -59,8 +60,9 @@ return {
5960
}
6061
```
6162

62-
### 4. Execute the command when the user interacts
63-
The previous step demonstrated how to get a button to display in the web part's toolbar. Now we will perform an action when the user clicks the button. Note that `actionName` was defined as `targetProperty` in the last step and since this is a button we can ignore the `newValue` that comes in.
63+
### Execute the command when the user interacts
64+
65+
The previous step demonstrated how to get a button to display in the web part's toolbar. Now we will perform an action when the user selects the button. Note that `actionName` was defined as `targetProperty` in the last step and since this is a button we can ignore the `newValue` that comes in.
6466

6567
```typescript
6668
return {
@@ -73,10 +75,14 @@ return {
7375
}
7476
}
7577
```
76-
> Common pitfalls when implementing the `onExecute` command, is not syncing the new state with the web part properties and/or not refreshing or re-rendering the web part.
78+
79+
> [!TIP]
80+
> Common pitfall when implementing the `onExecute` command, is not syncing the new state with the web part properties and/or not refreshing or re-rendering the web part.
7781
7882
## Code Snippets
83+
7984
### Button command
85+
8086
The type interace for a button is similar to the property panel's button (`IPropertyPaneButtonProps`).
8187

8288
```typescript
@@ -104,8 +110,9 @@ public getTopActionsConfiguration(): ITopActions | undefined {
104110
}
105111
```
106112

107-
### Drop down command
108-
The type interace for a drop down is similar to the property panel's choice group (`IPropertyPaneChoiceGroupOption`).
113+
### Drop-down command
114+
115+
The type interface for a drop-down is similar to the property panel's choice group (`IPropertyPaneChoiceGroupOption`).
109116

110117
```typescript
111118
import { ITopActions } from '@microsoft/sp-top-actions';
@@ -137,7 +144,7 @@ public getTopActionsConfiguration(): ITopActions | undefined {
137144
]
138145
}
139146
}],
140-
// for ChoiceGroup drop down, the newValue tells us which option's key was selected
147+
// for ChoiceGroup drop-down, the newValue tells us which option's key was selected
141148
onExecute: (actionName: string, newValue: any) => {
142149
if (actionName === 'layout') {
143150
this.setLayout(newValue);
@@ -149,22 +156,19 @@ public getTopActionsConfiguration(): ITopActions | undefined {
149156
```
150157

151158
## Advanced configurations
152-
For advanced configurations of your top action commands, checkout the type definitions from `@microsoft/sp-property-pane` and `@microsoft/sp-top-actions`. Currently, the two supported top action commands, button and drop down, can be defined using a subset of the types `IPropertyPaneChoiceGroupOption` and `IPropertyPaneButtonProps`.
153159

154-
For `IPropertyPaneButtonProps`, the currently supported properties are `icon`, `text`, `ariaLabel`, `disabled`
160+
For advanced configurations of your top action commands, checkout the type definitions from `@microsoft/sp-property-pane` and `@microsoft/sp-top-actions`. Currently, the two supported top action commands, button and drop-down, can be defined using a subset of the types `IPropertyPaneChoiceGroupOption` and `IPropertyPaneButtonProps`.
155161

156-
For `IPropertyPaneChoiceGroupOption`, the currently supported porperty is `options` and from that array we support `key`, `text`, `iconProps.officeFabricIconFontName`, `imageSize`, `checked`, `title`
157-
158-
> [!WARNING]
159-
> The APIs used for Top Actions are subject to change as the feature graduates to stable status.
162+
* For `IPropertyPaneButtonProps`, the currently supported properties are `icon`, `text`, `ariaLabel`, `disabled`
163+
* For `IPropertyPaneChoiceGroupOption`, the currently supported porperty is `options` and from that array we support `key`, `text`, `iconProps.officeFabricIconFontName`, `imageSize`, `checked`, `title`
160164

161165
```typescript
162166
import { IPropertyPaneButtonProps, IPropertyPaneChoiceGroupOption } from '@microsoft/sp-property-pane'
163167
import { ITopActions } from '@microsoft/sp-top-actions';
164168
```
169+
165170
### See more
166-
[Top Actions API](/javascript/api/sp-top-actions)
167171

172+
[Top Actions API](/javascript/api/sp-top-actions)
168173
[IPropertyPaneButtonProps](/javascript/api/sp-webpart-base/ipropertypanebuttonprops)
169-
170174
[IPropertyPaneChoiceGroupOption](/javascript/api/sp-webpart-base/ipropertypanechoicegroupoption)

docs/toc.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -446,14 +446,16 @@
446446
href: spfx/supported-extensibility-platforms-overview.md
447447
- name: SharePoint Online
448448
href: spfx/spfx-sharepoint-online.md
449-
- name: SharePoint 2019 & SE support
450-
href: spfx/sharepoint-2019-support.md
451-
- name: SharePoint 2016 support
452-
href: spfx/sharepoint-2016-support.md
453449
- name: Microsoft Teams
454450
href: /sharepoint/dev/spfx/build-for-teams-overview
451+
- name: Extend Outlook and Office
452+
href: /sharepoint/dev/spfx/office/overview
455453
- name: Microsoft Viva Connections
456454
href: /sharepoint/dev/spfx/viva/overview-viva-connections
455+
- name: SharePoint 2019 & SE support
456+
href: spfx/sharepoint-2019-support.md
457+
- name: SharePoint 2016 support
458+
href: spfx/sharepoint-2016-support.md
457459
- name: Release notes & roadmap
458460
items:
459461
- name: Overview

0 commit comments

Comments
 (0)