You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
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).
12
10
13
11
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).
Copy file name to clipboardExpand all lines: docs/spfx/release-1.16.md
+4-2Lines changed: 4 additions & 2 deletions
Original file line number
Diff line number
Diff line change
@@ -161,7 +161,9 @@ Node.js v12 & v14 are no longer supported. SPFx v1.16 requires Node.js v16.
161
161
> [!NOTE]
162
162
> Node.js v18 support is scheduled for the first half of the 2023 calendar year.
163
163
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.
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.
10
13
11
14
> [!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.
@@ -38,7 +39,7 @@ public getTopActionsConfiguration(): ITopActions | undefined {
38
39
}
39
40
```
40
41
41
-
### 3. Define your toolbar's user interface
42
+
### Define your toolbar's user interface
42
43
43
44
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.
44
45
@@ -59,8 +60,9 @@ return {
59
60
}
60
61
```
61
62
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.
64
66
65
67
```typescript
66
68
return {
@@ -73,10 +75,14 @@ return {
73
75
}
74
76
}
75
77
```
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.
77
81
78
82
## Code Snippets
83
+
79
84
### Button command
85
+
80
86
The type interace for a button is similar to the property panel's button (`IPropertyPaneButtonProps`).
81
87
82
88
```typescript
@@ -104,8 +110,9 @@ public getTopActionsConfiguration(): ITopActions | undefined {
104
110
}
105
111
```
106
112
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`).
@@ -137,7 +144,7 @@ public getTopActionsConfiguration(): ITopActions | undefined {
137
144
]
138
145
}
139
146
}],
140
-
// for ChoiceGroup dropdown, 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
141
148
onExecute: (actionName:string, newValue:any) => {
142
149
if (actionName==='layout') {
143
150
this.setLayout(newValue);
@@ -149,22 +156,19 @@ public getTopActionsConfiguration(): ITopActions | undefined {
149
156
```
150
157
151
158
## 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`.
153
159
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`.
155
161
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`
0 commit comments