Skip to content

Commit 6f84578

Browse files
Linda-EditorVesaJuvonen
authored andcommitted
Moved Query Para details to own section (SharePoint#967)
1 parent c2c712f commit 6f84578

File tree

1 file changed

+23
-21
lines changed

1 file changed

+23
-21
lines changed

docs/spfx/extensions/get-started/building-simple-cmdset-with-dialog-api.md

Lines changed: 23 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ This article describes how to create your first ListView Command Set Extension.
6464
code .
6565
```
6666
67-
**Note:** Because the SharePoint client-side solution is HTML/TypeScript based, you can use any code editor that supports client-side development to build your extension.
67+
> **Note:** Because the SharePoint client-side solution is HTML/TypeScript based, you can use any code editor that supports client-side development to build your extension.
6868
6969
Note how the default solution structure looks like the solution structure of client-side web parts. This is the basic SharePoint Framework solution structure, with similar configuration options across all solution types.
7070
@@ -153,47 +153,49 @@ You cannot currently use the local workbench to test SharePoint Framework Extens
153153
154154
Because our ListView Command Set is hosted from localhost and is running, we can use specific debug query parameters to execute the code in the list view.
155155
156-
3. Append the following query string parameters to the URL. Notice that you will need to update the GUID to match the ID of your ListView Command Set Extension available in the **HelloWorldCommandSet.manifest.json** file:
156+
3. Append the following query string parameters to the URL. Notice that you will need to update the GUID to match the ID of your ListView Command Set Extension available in the **HelloWorldCommandSet.manifest.json** file. For more information, see [More details about the URL query parameters](#more-details-about-the-url-query-parameters).
157157
158158
```
159159
?loadSpfx=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&customActions={"a8047e2f-30d5-40fc-b880-b2890c7c16d6":{"___location":"ClientSideExtension.ListViewCommandSet.CommandBar","properties":{"sampleTextOne":"One item is selected in the list.","sampleTextTwo":"This command is always visible."}}}
160160
```
161161
162-
More detail about the URL query parameters:
162+
The full URL should look similar to the following, depending on your tenant URL and the ___location of the list.
163163
164-
- **loadSPFX=true** ensures that the SharePoint Framework is loaded on the page. For performance reasons, the framework is not normally loaded unless at least one extension is registered. Because no components are registered yet, we must explicitly load the framework.
165-
- **debugManifestsFile** specifies that we want to load SPFx components that are being locally served. The loader only looks for components in the App Catalog (for your deployed solution) and the SharePoint manifest server (for the system libraries).
166-
- **customActions** simulates a custom action. You can set many properties on this `CustomAction` object that affect the look, feel, and ___location of your button; we’ll cover them all later.
167-
- **Key**: GUID of the extension.
168-
- **Location**: Where the commands are displayed. The possible values are:
169-
- **ClientSideExtension.ListViewCommandSet.ContextMenu:** The context menu of the item(s)
170-
- **ClientSideExtension.ListViewCommandSet.CommandBar:** The top command set menu in a list or library
171-
- **ClientSideExtension.ListViewCommandSet:** Both the context menu and the command bar (Corresponds to SPUserCustomAction.Location="CommandUI.Ribbon")
172-
- **Properties**: An optional JSON object containing properties that are available via the `this.properties` member.
173-
174-
The full URL should look similar to the following, depending on your tenant URL and the ___location of the list.
175-
176-
```
177-
contoso.sharepoint.com/Lists/Orders/AllItems.aspx?loadSpfx=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&customActions={"a8047e2f-30d5-40fc-b880-b2890c7c16d6":{"___location":"ClientSideExtension.ListViewCommandSet.CommandBar","properties":{"sampleTextOne":"One item is selected in the list.","sampleTextTwo":"This command is always visible."}}}
178-
```
164+
```
165+
contoso.sharepoint.com/Lists/Orders/AllItems.aspx?loadSpfx=true&debugManifestsFile=https://localhost:4321/temp/manifests.js&customActions={"a8047e2f-30d5-40fc-b880-b2890c7c16d6":{"___location":"ClientSideExtension.ListViewCommandSet.CommandBar","properties":{"sampleTextOne":"One item is selected in the list.","sampleTextTwo":"This command is always visible."}}}
166+
```
179167
180168
4. Accept the loading of debug manifests by selecting **Load debug scripts** when prompted.
181169
182170
![Accept loading debugripts](../../../images/ext-com-accept-debug-scripts.png)
183171
184-
Notice the new **Command Two** button available in the toolbar. If you select that button, you'll see the text provided as property for the `sampleTextTwo` property.
172+
5. Notice the new **Command Two** button available in the toolbar. Select that button to see the text provided as property for the `sampleTextTwo` property.
185173
186174
![Command Two button visible in the document library toolbar](../../../images/ext-com-default-customizer-output.png)
187175
188-
The **Command One** button is not visible based on the code, until one row is selected in the document library. Upload or create a document to the library and confirm that the second button is visible.
176+
6. The **Command One** button is not visible based on the code, until one row is selected in the document library. Upload or create a document to the library and confirm that the second button is visible.
189177
190178
![Selecting one document to get Command One button visible](../../../images/ext-com-default-customizer-doc-select.png)
191179
192-
5. Select **Command Two** to see how the dialog control works, which is used in the default output from the solution scaffolding when the ListView Command Set is selected as the extension type.
180+
7. Select **Command Two** to see how the dialog control works, which is used in the default output from the solution scaffolding when the ListView Command Set is selected as the extension type.
193181
194182
![Selecting one document to get Command One button visible](../../../images/ext-com-default-customizer-btn-click.png)
195183
196184
185+
### More details about the URL query parameters
186+
187+
- **loadSPFX=true** ensures that the SharePoint Framework is loaded on the page. For performance reasons, the framework is not normally loaded unless at least one extension is registered. Because no components are registered yet, we must explicitly load the framework.
188+
- **debugManifestsFile** specifies that we want to load SPFx components that are being locally served. The loader only looks for components in the App Catalog (for your deployed solution) and the SharePoint manifest server (for the system libraries).
189+
- **customActions** simulates a custom action. You can set many properties on this `CustomAction` object that affect the look, feel, and ___location of your button; we’ll cover them all later.
190+
- **Key**: GUID of the extension.
191+
- **Location**: Where the commands are displayed. The possible values are:
192+
- **ClientSideExtension.ListViewCommandSet.ContextMenu:** The context menu of the item(s)
193+
- **ClientSideExtension.ListViewCommandSet.CommandBar:** The top command set menu in a list or library
194+
- **ClientSideExtension.ListViewCommandSet:** Both the context menu and the command bar (Corresponds to SPUserCustomAction.Location="CommandUI.Ribbon")
195+
- **Properties**: An optional JSON object containing properties that are available via the `this.properties` member.
196+
197+
<br/>
198+
197199
## Enhance the ListView Command Set rendering
198200
199201
The default solution takes advantage of a new Dialog API, which can be used to show modal dialogs easily from your code. In the following steps, we'll slightly modify the default experience to demonstrate Dialog API use cases.

0 commit comments

Comments
 (0)