Skip to content

Commit 0d18ef7

Browse files
Merge pull request SharePoint#8816 from andrewconnell/vivaconnections-docs-refresh
📚 update viva connections ace docs
2 parents b9052fa + 80e47a5 commit 0d18ef7

11 files changed

+166
-104
lines changed

docs/spfx/viva/get-started/actions/geolocation/GeolocationDocumentation.md

Lines changed: 49 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,17 @@
11
---
22
title: Location capabilities in Adaptive Card Extension
33
description: Geolocation is a new action that the SharePoint Adaptive Card Extension framework supports, which enables third party developers to come up with their ___location specific scenarios.
4-
ms.date: 04/06/2022
4+
ms.date: 03/08/2023
55
ms.localizationpriority: high
66
---
77
# Location capabilities in Adaptive Card Extension
88

9-
> [!NOTE]
10-
> The geolocation capability in Adaptive Card Extension will be available in SPFx v1.15.
11-
>
12-
> So make sure that you have installed it before proceeding further.
13-
>
14-
> For more information on installing the SPFx v1.15 Preview, see [SharePoint Framework v1.15 release notes](../../../../release-1.15.md).
15-
>
16-
> This tutorial also assumes that you have already built a SharePoint Adaptive Card Extension.
9+
Microsoft added support for two geolocation actions, unique to Viva Connections, in the [SharePoint Framework (SPFx) v1.15 release](../../../../release-1.15.md).
10+
11+
> [!IMPORTANT]
12+
> This tutorial also assumes that you've already built an SPFx Adaptive Card Extension.
1713
>
18-
> To learn how to create your first SharePoint Adaptive Card Extension, try out [this tutorial](../../../get-started/build-first-sharepoint-adaptive-card-extension.md).
14+
> To learn how to create your first an SPFx Adaptive Card Extension, try out [this tutorial](../../../get-started/build-first-sharepoint-adaptive-card-extension.md).
1915
2016
### New action types for geolocation
2117

@@ -24,25 +20,44 @@ There are 2 Location actions:
2420
1. Get Location
2521
1. Show Location
2622

27-
### Get Location:
23+
### Get Location
2824

29-
Gives user’s current device ___location or opens a ___location picker and returns the ___location chosen by the user. In the browser it uses Bing Maps as the mapping interface.
25+
The `VivaAction.GetLocation` action takes user’s current device ___location or opens a ___location picker and returns the ___location chosen by the user. The Viva Connections browser client uses Bing Maps for the mapping experience:
3026

31-
The ACE action for Get Location is: `VivaAction.GetLocation`.
32-
33-
It takes an optional boolean parameter: `ChooseLocationOnMap`.
27+
```json
28+
{
29+
"id": "originLocation",
30+
"type": "VivaAction.GetLocation",
31+
"title": "Select ___location on the map",
32+
"parameters": {
33+
"chooseLocationOnMap": true
34+
}
35+
}
36+
```
3437

35-
If the property `ChooseLocationOnMap` is set to `true`, then the action will open a map, and user will get to choose a ___location on the map, otherwise, it will fetch user's current device ___location.
38+
When the optional parameter property `ChooseLocationOnMap` is set to `true`, the action will open a map, and user will get to choose a ___location on the map. If set to `false` (*the default setting*), it will fetch user's current device ___location.
3639

37-
### Show Location:
40+
### Show Location
3841

39-
With this action, a map shows up on the screen on which you can either show the user's current ___location on the map or you can show your specified coordinates on the map.
42+
The `VivaAction.ShowLocation` action displays a map that displays the user's current ___location on the map or a specified ___location:
4043

41-
The ACE action for Show Location is: `VivaAction.ShowLocation`.
44+
```json
45+
{
46+
action: {
47+
type: 'VivaAction.ShowLocation',
48+
parameters: {
49+
locationCoordinates: {
50+
latitude: 28.6132039578389,
51+
longitude: 77.229488240066
52+
}
53+
}
54+
}
55+
}
56+
```
4257

4358
It takes an optional ___location parameter: `locationCoordinates`.
4459

45-
To show a specific ___location, you should pass the ___location coordinates (latitude and longitude) via the `locationCoordinates` parameter.
60+
To show a specific ___location, set the optional `locationCoordinates` property the ___location coordinates (*latitude and longitude*).
4661

4762
The `locationCoordinates` object consists of the following properties:
4863

@@ -143,36 +158,39 @@ The following examples describe the geolocation action and their purpose.
143158
If you don't want to write code, but still wish to see how the geolocation actions work, then you can explore [this tutorial](./GeolocationPropertyPane.md) which lets you create cards with geolocation actions via property pane.
144159

145160
> [!NOTE]
146-
> Theses geolocation actions can be added on the card view or the buttons of the card view or inside the quick view.
161+
> Theses geolocation actions can be added on the CardView or the buttons of the CardView or inside the QuickView.
147162

148163
### Permission and error codes
149164

150-
For the ___location APIs to work, the user has to grant the permission to access device's ___location.
151-
165+
For the ___location APIs to work, the user must grant the browser permission to access device's ___location.
152166

153167
Error Code | Error Description
154168
----------------- | -----------------
155169
PermissionDenied | User has denied the permission to access ___location
156170
InternalError | An unexpected error happened while invoking the ___location APIs
157171
HostNotSupported | The ___location action is being used in an unsupported environment
158172

159-
160173
### Callbacks for Card Developers
161174

162175
When the action `VivaAction.GetLocation` is invoked, we pass the fetched ___location coordinates via the onAction callback.
163176

164177
> [!NOTE]
165-
> onAction callback is not invoked for `VivaAction.ShowLocation`.
178+
> `onAction` callback is not invoked for `VivaAction.ShowLocation`.
166179

167-
For actions: `VivaAction.GetLocation` and `VivaAction.ShowLocation`, if the user lands into an error state, then an onError callback will get invoked, to which we pass the action name and the error code.
180+
For actions: `VivaAction.GetLocation` and `VivaAction.ShowLocation`, if the user lands into an error state, then an `onError` callback will get invoked, to which we pass the action name and the error code.
168181

169182
### Availability of geolocation actions
170183

171184
> [!NOTE]
172-
> These new actions are **only available in the browser** currently. Viva Connections desktop and Viva Connections mobile support will be enabled later.
185+
> These new actions are currently **only available in the browser**. Viva Connections desktop and Viva Connections mobile support will be enabled later.
186+
173187
After General Availability the support matrix for actions will look like:
174188

175-
Action | Viva Connection Desktop | Viva Connections Mobile | Browser
176-
------------- | ------------- | ------------- | -------------
177-
Get Location | Not Supported | Supported | Supported
178-
Show Location | Not Supported | Supported | Supported
189+
Action | Viva Connection Desktop | Viva Connections Mobile | Browser
190+
------------- | ----------------------- | ----------------------- | ---------
191+
Get Location | Not Supported | Supported | Supported
192+
Show Location | Not Supported | Supported | Supported
193+
194+
## See Also
195+
196+
- [Microsoft Learning: Create Adaptive Card Extensions (ACE) for Microsoft Viva Connections](/training/modules/sharepoint-spfx-adaptive-card-extension-card-types)

docs/spfx/viva/get-started/actions/geolocation/GeolocationPropertyPane.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Explore Geolocation capability via property pane of card-desinger card in Adaptive Card Extension
33
description: Geolocation is a new action that the SharePoint Adaptive Card Extension framework supports, and in this tutorial we see how we can explore this capability via the property pane of the card-designer card.
4-
ms.date: 04/06/2022
4+
ms.date: 03/08/2023
55
ms.localizationpriority: high
66
---
77

@@ -68,3 +68,7 @@ You can now check out the three geolocation actions that you introduced via the
6868

6969
> [!NOTE]
7070
> This property-pane experience doesn't allow you to introduce onAction callback, and hence the action `Select ___location from a map` is actually a no-op.
71+
72+
## See Also
73+
74+
- [Microsoft Learning: Create Adaptive Card Extensions (ACE) for Microsoft Viva Connections](/training/modules/sharepoint-spfx-adaptive-card-extension-card-types)

docs/spfx/viva/get-started/actions/geolocation/GeolocationTutorial.md

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Create an Adaptive Card Extension with geolocation action
33
description: Step by step guide on creating Adaptive Card Extension for Geolocation action.
4-
ms.date: 04/06/2022
4+
ms.date: 03/08/2023
55
ms.localizationpriority: high
66
---
77
# Create an Adaptive Card Extension with geolocation action
@@ -100,7 +100,6 @@ to the `IGeoLocationAdaptiveCardExtensionStrings` interface.
100100

101101
As mentioned earlier, on the Card View, we will add a button, which will show user their current ___location and on clicking the Card View, we will show the Quick View experience.
102102

103-
104103
We will first add the functionality for the button on the Card View. For this, locate and open the following file in your project: **./src/adaptiveCardExtensions/geoLocation/cardView/CardView.ts**
105104

106105
Here, replace the definition of `cardButtons` function with the following:
@@ -274,3 +273,7 @@ So now, whenever the `VivaAction.GetLocation` action is triggered from your Quic
274273
At this point, you can run **gulp serve** again and see how all the changes you made so far came together.
275274

276275
This is it! Congratulations on successfully creating you Adaptive Card Extension with geolocation actions.
276+
277+
## See Also
278+
279+
- [Microsoft Learning: Create Adaptive Card Extensions (ACE) for Microsoft Viva Connections](/training/modules/sharepoint-spfx-adaptive-card-extension-card-types)
Lines changed: 67 additions & 50 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,39 @@
11
---
22
title: Media upload in Adaptive Card Extension
33
description: Media upload is a new action that the SharePoint Adaptive Card Extension framework supports, which enables third party developers to upload data content to sharepoint.
4-
ms.date: 01/09/2023
4+
ms.date: 03/08/2023
55
---
66
# Media upload in Adaptive Card Extension
77

8+
Microsoft added support for an action to upload media, unique to Viva Connections, in the [SharePoint Framework (SPFx) v1.15.2](../../../../release-1.15.2.md) release.
9+
810
> [!NOTE]
9-
> The media upload capability in Adaptive Card Extension is available in SPFx v1.15.2.
10-
>
11-
> For more information on installing the SPFx v1.15.2, see [SharePoint Framework v1.15.2 release notes](../../../../release-1.15.2.md).
12-
>
13-
> This tutorial also assumes that you have already built a SharePoint Adaptive Card Extension.
11+
> This tutorial also assumes that you've already built an SPFx Adaptive Card Extension.
1412
>
15-
> To learn how to create your first SharePoint Adaptive Card Extension, try out [this tutorial](../../../get-started/build-first-sharepoint-adaptive-card-extension.md).
13+
> To learn how to create your first SPFx Adaptive Card Extension, try out [this tutorial](../../../get-started/build-first-sharepoint-adaptive-card-extension.md).
1614
1715
## Action type for media upload
1816

1917
### Select Media
2018

21-
Allows users to upload media content via an Adaptive Card Extension (ACE). The current size limitation is 1 MB per image. A user may specify any image type to be uploaded. **Note**: _If an image type isn't specified, then an error indicating only images can be uploaded will show up._
19+
Allows users to upload media content via an Adaptive Card Extension (ACE). The current size limitation is 1 MB per image. A user may specify any image type to be uploaded.
20+
21+
> [!WARNING]
22+
> If an image type isn't specified, then an error indicating only images can be uploaded is displayed.
2223
2324
The ACE action for Select Media is: `VivaAction.SelectMedia`.
2425

26+
```json
27+
{
28+
"type": "VivaAction.SelectMedia",
29+
"id": "Select Media",
30+
"title": "Select Files",
31+
"parameters": {
32+
"mediaType": "MediaType.Image"
33+
}
34+
}
35+
```
36+
2537
The parameters that it takes are as follows:
2638

2739
- `mediaType`: Currently set as image by default. Audio and documents, such as PDFs, are supported as well.
@@ -52,80 +64,81 @@ The parameters that it takes are as follows:
5264
}
5365
```
5466

55-
_Note: If a user uploads a file that is not supported in the format parameters, an error code of **InCorrectFileFormat** will be raised_
67+
> [!WARNING]
68+
> If a user uploads a file that is not supported in the format parameters, an error code of **InCorrectFileFormat** is thrown.
5669
5770
## Tutorial and Examples
5871

5972
You can take a look at [this tutorial](./MediaUploadTutorial.md) which goes over a step by step guide on how to create a card with the available media upload action.
6073

6174
1. **Upload an image**
62-
75+
6376
In your template json file, add the following action:
64-
77+
6578
```json
6679
"actions": [
67-
{
68-
"type": "VivaAction.SelectMedia",
69-
"id": "Select Media",
70-
"title": "Upload Image",
71-
"parameters": {
72-
"mediaType": MediaType.Image
73-
}
80+
{
81+
"type": "VivaAction.SelectMedia",
82+
"id": "Select Media",
83+
"title": "Upload Image",
84+
"parameters": {
85+
"mediaType": MediaType.Image
7486
}
87+
}
7588
]
7689
```
7790

7891
1. **Upload multiple images**
79-
92+
8093
In your template json file, add the following action:
81-
94+
8295
```json
8396
"actions": [
84-
{
85-
"type": "VivaAction.SelectMedia",
86-
"id": "Select Media",
87-
"title": "Upload Image",
88-
"parameters": {
89-
"mediaType": MediaType.Image,
90-
"allowMultipleCapture": true
91-
}
97+
{
98+
"type": "VivaAction.SelectMedia",
99+
"id": "Select Media",
100+
"title": "Upload Image",
101+
"parameters": {
102+
"mediaType": MediaType.Image,
103+
"allowMultipleCapture": true
92104
}
105+
}
93106
]
94107
```
95108

96109
1. **Upload only JPG images**
97-
110+
98111
In your template json file, add the following action:
99-
112+
100113
```json
101114
"actions": [
102-
{
103-
"type": "VivaAction.SelectMedia",
104-
"id": "Select Media",
105-
"title": "Upload Image",
106-
"parameters": {
107-
"mediaType": MediaType.Image,
108-
"supportedFileFormats": "jpg"
109-
}
115+
{
116+
"type": "VivaAction.SelectMedia",
117+
"id": "Select Media",
118+
"title": "Upload Image",
119+
"parameters": {
120+
"mediaType": MediaType.Image,
121+
"supportedFileFormats": "jpg"
110122
}
123+
}
111124
]
112125
```
113126

114127
1. **Upload allow only small images to be uploaded**
115128

116129
In your template json file, add the following action:
117-
130+
118131
```json
119132
"actions": [
120-
{
121-
"type": "VivaAction.SelectMedia",
122-
"id": "Select Media",
123-
"title": "Upload Image",
124-
"parameters": {
125-
"mediaType": MediaType.Image,
126-
"supportedFilemaxSizePerFileFormats": 1000
127-
}
133+
{
134+
"type": "VivaAction.SelectMedia",
135+
"id": "Select Media",
136+
"title": "Upload Image",
137+
"parameters": {
138+
"mediaType": MediaType.Image,
139+
"supportedFilemaxSizePerFileFormats": 1000
128140
}
141+
}
129142
]
130143
```
131144

@@ -141,6 +154,10 @@ If you don't want to write up a new ACE but still want to see the media upload i
141154
> [!NOTE]
142155
> Currently this feature is not supported in teams mobile and will throw an error indicating that this.
143156

144-
Action | Viva Connection Desktop | Viva Connections Mobile | Browser
145-
------------- | ------------- | ------------- | -------------
146-
Select Media | Supported | Not Supported | Supported
157+
Action | Viva Connection Desktop | Viva Connections Mobile | Browser
158+
------------ | ----------------------- | ----------------------- | ---------
159+
Select Media | Supported | Not Supported | Supported
160+
161+
## See Also
162+
163+
- [Microsoft Learning: Create Adaptive Card Extensions (ACE) for Microsoft Viva Connections](/training/modules/sharepoint-spfx-adaptive-card-extension-card-types)

docs/spfx/viva/get-started/actions/media-upload/MediaUploadPropertyPane.md

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,14 @@
11
---
22
title: Explore Media Upload capability via property pane of card-designer card in Adaptive Card Extension
33
description: Media Upload is a new action that the SharePoint Adaptive Card Extension framework supports. In this tutorial we'll see how we can explore this capability via the property pane of the card-designer card.
4-
ms.date: 08/09/2022
4+
ms.date: 03/08/2023
55
ms.localizationpriority: high
66
---
77

88
# Explore Media Upload capability via property pane of card-designer card in Adaptive Card Extension
99

1010
In this tutorial we'll see how we can explore this capability via the property pane of the card-designer card.
1111

12-
we'll:
13-
1412
- Update the card strings
1513
- Introduce media upload actions on the card view, primary button, and secondary button.
1614

@@ -59,7 +57,11 @@ Finally, for the `Secondary Button`, set the `Title` to `Select multiple media`
5957
Now close the property pane and click `Preview` from the top right hand corner of the page:
6058

6159
- Click on the card to open up media upload and exit
62-
- Clicking `Select single media` will pull open the same modal
60+
- Clicking `Select single media` will pull open the same modal
6361
- Clicking `Select multiple media` will open up the same modal but will allow the user to upload several files at once
6462

65-
![Multiple images uploaded at once](./img/mediaUploadPropertyPaneMultipleImages.PNG)
63+
![Multiple images uploaded at once](./img/mediaUploadPropertyPaneMultipleImages.PNG)
64+
65+
## See Also
66+
67+
- [Microsoft Learning: Create Adaptive Card Extensions (ACE) for Microsoft Viva Connections](/training/modules/sharepoint-spfx-adaptive-card-extension-card-types)

0 commit comments

Comments
 (0)