Skip to content

Commit 4e016e2

Browse files
Merge pull request SharePoint#7210 from ganesh-sanap/patch-7
Update build-first-sharepoint-adaptive-card-extension.md
2 parents ab3ff0c + 7e884d0 commit 4e016e2

File tree

1 file changed

+14
-12
lines changed

1 file changed

+14
-12
lines changed

docs/spfx/viva/get-started/build-first-sharepoint-adaptive-card-extension.md

Lines changed: 14 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
---
22
title: Build your first SharePoint Adaptive Card Extension
33
description: Adaptive Card Extensions (ACEs) are a new SharePoint Framework component type, which enable developers to build rich, native extensions to Viva Connections' Dashboards and SharePoint Pages. In this tutorial, you'll build and explore your first ACE.
4-
ms.date: 07/22/2021
4+
ms.date: 08/05/2021
55
ms.prod: sharepoint
66
localization_priority: Priority
77
---
@@ -34,7 +34,7 @@ When prompted, enter the following values (*select the default option for all pr
3434

3535
When prompted by the generator for which ACE template to use, select **Primary Text Template** for this tutorial.
3636

37-
At this point, Yeoman installs the required dependencies and scaffolds the solution files. This might take a few minutes.
37+
At this point, Yeoman installs the required dependencies and scaffolds the solution files. This might take few minutes.
3838

3939
## Step 2 - Serve the ACE in the workbench
4040

@@ -74,7 +74,7 @@ Switch the Workbench to **Preview** mode.
7474

7575
:::image type="content" source="../../../images/viva-extensibility/lab1-preview.png" alt-text="Set the workbench to preview mode":::
7676

77-
Select on the **Quick View** button on the ACE:
77+
Select the **Quick View** button on the ACE:
7878

7979
:::image type="content" source="../../../images/viva-extensibility/lab1-hw-ql.png" alt-text="Select the Quick View button on the ACE":::
8080

@@ -131,7 +131,7 @@ The default Card view, will render using the following properties from the manif
131131
> [!NOTE]
132132
> Unlike with the Card view, there is no default Quick view.
133133
134-
### Register a view for hte ACE
134+
### Register a view for the ACE
135135

136136
For a View to be used, it must be registered with its respective `ViewNavigator`.
137137

@@ -184,7 +184,7 @@ Each of these Views will render differently and have different constraints on wh
184184
> [!NOTE]
185185
> The card views for Adaptive Card templates are fixed and cannot be changed.
186186
187-
Additionally there two generics for the `properties` and `state` objects shared between the view and the ACE.
187+
Additionally, there are two generics for the `properties` and `state` objects shared between the view and the ACE.
188188

189189
- **TProperties**: The View's properties interface, the same interface used by persisted properties of the ACE (*property bag*).
190190
- **TState**: The View's generic state interface, which must be the same as the ACE's state interface
@@ -260,10 +260,10 @@ Selecting the Card will now open the Quick view.
260260

261261
Locate and open the following file: **./src/adaptiveCardExtensions/helloWorld/quickView/QuickView.ts**.
262262

263-
Quick views must extend the **BaseAdaptiveCardView** base case. There are three optional generics that can be defined:
263+
Quick views must extend the **BaseAdaptiveCardView** base class. There are three optional generics that can be defined:
264264

265265
- **TData**: The type returned from the `data()` getter method.
266-
- **TProperties**: Similar to the Quick view, this is the same interface used by persisted properties of the ACE (*property bag*).
266+
- **TProperties**: Similar to the Card view, this is the same interface used by persisted properties of the ACE (*property bag*).
267267
- **TState** Similar to the Card view, this is the set of stateful data the View needs to render. **TState** must share properties with the ACE's state interface.
268268

269269
A Quick View has more control over the Adaptive Card template schema than a Card view. The
@@ -355,7 +355,9 @@ public get data(): IPrimaryTextCardParameters {
355355
> [!NOTE]
356356
> In its `template()` getter, the Quick view of the ACE you generated returns the object from a JSON file.
357357
358-
Locate and open the following file: **./src/adaptiveCardExtensions/helloWorld/quickView/template/QuickViewTemplate.json**. Replace the contents of this file with the following JSON:
358+
Locate and open the following file: **./src/adaptiveCardExtensions/helloWorld/quickView/template/QuickViewTemplate.json**.
359+
360+
Replace the contents of this file with the following JSON:
359361

360362
```json
361363
{
@@ -429,7 +431,7 @@ public onAction(action: IActionArguments): void {
429431
}
430432
```
431433

432-
Selecting on either button will now set the state's `subTitle` to the `data.message` value, causing a re-render (*more on this later*). The Quick view's Adaptive Card will now display this message, since its template binds to `subTitle`.
434+
Selecting either button will now set the state's `subTitle` to the `data.message` value, causing a re-render (*more on this later*). The Quick view's Adaptive Card will now display this message, since its template binds to `subTitle`.
433435

434436
### Property Pane
435437

@@ -497,7 +499,7 @@ protected onPropertyPaneFieldChanged(propertyPath: string, oldValue: any, newVal
497499
}
498500
```
499501

500-
Passing `setState()` a `Partial<TState>` object will update all Views with the new values. Updating the **Description Field** in the Property Pane will now update the `subTitle` displayed on the Quick view.
502+
Passing a `Partial<TState>` object to `setState()` method will update all Views with the new values. Updating the **Description Field** in the Property Pane will now update the `subTitle` displayed on the Quick view.
501503

502504
> [!NOTE]
503505
> If no value or identical values are passed, a re-render will still occur.
@@ -519,8 +521,8 @@ public onInit(): Promise<void> {
519521

520522
Unlike with `properties`, `state` isn't persisted past the current session and should only be used for ephemeral View state.
521523

522-
> [!Note]
523-
The scaffolded AdaptiveCardExtension maintains a `description` property in the `state` object. This is obsolete, since the AdaptiveCardExtension and all its views can simply reference the `description` stored in `properties`.
524+
> [!NOTE]
525+
> The scaffolded AdaptiveCardExtension maintains a `description` property in the `state` object. This is obsolete, since the AdaptiveCardExtension and all its views can simply reference the `description` stored in `properties`.
524526
525527
## Step 4 - Card designer
526528

0 commit comments

Comments
 (0)