Skip to content

Commit 7a25711

Browse files
committed
Lets see what it complains about
1 parent a80bae5 commit 7a25711

18 files changed

+190
-21
lines changed

hub/dev-environment/toc.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -137,16 +137,20 @@ items:
137137
href: ../powertoys/command-palette/adding-commands.md
138138
- name: Update a list of commands
139139
href: ../powertoys/command-palette/update-a-list-of-commands.md
140-
- name: Command results
141-
href: ../powertoys/command-palette/command-results.md
142140
- name: Add top-level commands to your extension
143141
href: ../powertoys/command-palette/add-top-level-commands-to-your-extension.md
142+
- name: Command results
143+
href: ../powertoys/command-palette/command-results.md
144144
- name: Display markdown content
145145
href: ../powertoys/command-palette/using-markdown-content.md
146146
- name: Get user input with forms
147147
href: ../powertoys/command-palette/using-form-pages.md
148148
# - name: Handle the search text
149149
# href: ../powertoys/command-palette/dynamic-lists.md
150+
# - name: Adding details
151+
# href: ../powertoys/command-palette/add-details.md
152+
# - name: Tags
153+
# href: ../powertoys/command-palette/tags.md
150154
# - name: "Advanced: Adding an extension to your package"
151155
# href: ../powertoys/command-palette/adding-an-extension-to-your-package.md
152156
- name: Publishing your extension

hub/powertoys/command-palette/add-top-level-commands-to-your-extension.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -49,11 +49,10 @@ If we want to add another command to the top-level list of commands, we just nee
4949

5050
There you have it. Now you can add additional top-level commands to your extension.
5151

52-
If you'd like to update the list of top-level commands dynamically, you can do so in the same way as you would updating a list page. This can be useful for cases like an extension that might first require the user to log in, before showing certain commands. In that case, you can show the "log in" command at the top level initially. Then, once the user logs in successfully, you can update the list of top-level commands to include the commands that required authentication.
52+
If you'd like to update the list of top-level commands dynamically, you can do so in the same way as you would update a list page. This can be useful for cases like an extension that might first require the user to log in, before showing certain commands. In that case, you can show the "log in" command at the top level initially. Then, once the user logs in successfully, you can update the list of top-level commands to include the commands that required authentication.
5353

5454
Once you've determined that you need to change the top level list, call [`RaiseItemsChanged()`](../microsoft-commandpalette-extensions-toolkit/commandprovider-raiseitemschanged.md) on your `CommandProvider`. Command Palette will then ask for the top-level commands via `TopLevelCommands()` again, and you can return the updated list.
5555

56-
5756
> [!TIP]
5857
> Create the `CommandItem`s for the top-level commands before calling `RaiseItemsChanged()`. This will ensure that the new commands are available when Command Palette asks for the top-level commands. This will help keep the work being done in call to `TopLevelCommands()` method to a minimum.
5958

hub/powertoys/command-palette/adding-commands.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ no-loc: [PowerToys, Windows, Insider]
1414
Now that you've created your extension, it's time to add some commands to it. We can start by navigating to the `ExtensionNamePage.cs` file. This file is the [`ListPage`](./microsoft-commandpalette-extensions-toolkit/listpage.md) that will be displayed when the user selects your extension. In there you should see:
1515

1616
```csharp
17-
public DocsSamplePage()
17+
public ExtensionNamePage()
1818
{
1919
Icon = IconHelpers.FromRelativePath("Assets\\StoreLogo.png");
2020
Title = "My sample extension";
@@ -108,7 +108,7 @@ There are two different kinds of pages you can show:
108108
* [`ListPage`](./microsoft-commandpalette-extensions-toolkit/listpage.md) - This is a page that shows a list of commands. This is what we've been working with so far.
109109
* [`ContentPage`](./microsoft-commandpalette-extensions-toolkit/contentpage.md) - This is a page that shows rich content to the user. This allows you to specify abstract content, and let Command Palette worry about rendering the content in a native experience. There are two different types of content supported so far:
110110
* [Markdown content](./using-markdown-content.md) - This is content that's written in Markdown, and is rendered in the Command Palette. See [`MarkdownContent`](./microsoft-commandpalette-extensions-toolkit/markdowncontent.md) for details.
111-
* [Form content](./using-form-pages.md) - This is content that shows a form to the user, and then returns the results of that form to the extension. These are powered by [Adaptive Cards](aka.ms/adaptive-cards) This is useful for getting user input, or displaying more complex layouts of information. See [`FormContent`](./microsoft-commandpalette-extensions-toolkit/formcontent.md) for details.
111+
* [Form content](./using-form-pages.md) - This is content that shows a form to the user, and then returns the results of that form to the extension. These are powered by [Adaptive Cards](https://aka.ms/adaptive-cards) This is useful for getting user input, or displaying more complex layouts of information. See [`FormContent`](./microsoft-commandpalette-extensions-toolkit/formcontent.md) for details.
112112

113113

114114
We'll start by adding a new page that shows a list of commands. We can create a new class that implements `ListPage`:

hub/powertoys/command-palette/command-results.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
---
22
title: Command results
3-
description: Learn how to add new commands to your Command Palette extension.
3+
description: Learn what the different kinds of Command Palette command results do.
44
ms.date: 3/23/2025
55
ms.topic: concept-article
66
no-loc: [PowerToys, Windows, Insider]

hub/powertoys/command-palette/creating-an-extension.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ The form will ask you for the following information:
1818
* The project will be created in a subdirectory of the path you provided.
1919
* If this path doesn't exist, it will be created for you.
2020

21-
![](../../images/command-palette/create-extension-page.png)
21+
![The "Create a new extension" page of the Windows Command Palette](../../images/command-palette/create-extension-page.png)
2222

2323
Once you submit the form, Command Palette will automatically generate the project for you. At this point, your projects structure should look like the following:
2424

@@ -64,7 +64,7 @@ From here, you can immediately build the project and run it. Once your package i
6464
6565
You should be able to see your extension in the Command Palette at the end of the list of commands. Entering that command should take you to the page for your command, and you should see a single command that says "TODO: Implement your extension here".
6666
67-
![](../../images/command-palette/initial-created-extension-list.png)
67+
![A screenshot of the empty extension template, running in the command palette](../../images/command-palette/initial-created-extension-list.png)
6868
6969
Congrats! You've made your first extension! Now let's go ahead and actually add some commands to it.
7070

hub/powertoys/command-palette/extensibility-overview.md

Lines changed: 9 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -15,14 +15,15 @@ The fastest way to get started writing extensions is from the Command Palette it
1515

1616
For more detailed instructions, you can follow these pages:
1717

18-
* [Creating an extension](../powertoys/command-palette/creating-an-extension.md)
19-
* [Update a list of commands](../powertoys/command-palette/update-a-list-of-commands.md)
20-
* [Command results](../powertoys/command-palette/command-results.md)
21-
* [Add top-level commands to your extension](../powertoys/command-palette/add-top-level-commands-to-your-extension.md)
22-
* [Display markdown content](../powertoys/command-palette/using-markdown-content.md)
23-
* [Get user input with forms](../powertoys/command-palette/using-form-pages.md)
24-
* [Handle the search text](../powertoys/command-palette/dynamic-lists.md)
25-
* [Advanced: Adding an extension to your package](../powertoys/command-palette/adding-an-extension-to-your-package.md)
18+
* [Creating an extension](../command-palette/creating-an-extension.md)
19+
* [Adding commands](../command-palette/adding-commands.md)
20+
* [Update a list of commands](../command-palette/update-a-list-of-commands.md)
21+
* [Add top-level commands to your extension](../command-palette/add-top-level-commands-to-your-extension.md)
22+
* [Command results](../command-palette/command-results.md)
23+
* [Display markdown content](../command-palette/using-markdown-content.md)
24+
* [Get user input with forms](../command-palette/using-form-pages.md)
25+
<!-- * [Handle the search text](../command-palette/dynamic-lists.md) -->
26+
<!-- * [Advanced: Adding an extension to your package](../command-palette/adding-an-extension-to-your-package.md) -->
2627

2728

2829
## Extension details

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/commandresult.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,3 +38,7 @@ The **CommandResult** class is used to specify the result of a command execution
3838
| [KeepOpen()](commandresult_keepopen.md) | Do nothing. This leaves the palette in its current state, with the current page stack and query. |
3939
| [ShowToast(String)](commandresult_showtoast_string.md) | Display a transient desktop-level message to the user. Creates a new [CommandResult](commandresult.md) with **Args** set to a new [ToastArgs](toastargs.md) object with its [Message](toastargs.md#properties) set to **String**. |
4040
| [ShowToast(ToastArgs)](commandresult_showtoast_toastargs.md) | Display a transient desktop-level message to the user. Creates a new `CommandResult` instance with **Args** set to [ToastArgs](toastargs.md). |
41+
42+
## Example
43+
44+
See [Command Results](../command-results.md) for an example of how to use this.

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/commandresult_confirm.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,3 +25,7 @@ The arguments for the command. This should be an instance of [ConfirmationArgs](
2525
## Returns
2626

2727
A [CommandResult](commandresult.md) instance.
28+
29+
## Example
30+
31+
See [Command Results](../command-results.md) for an example of how to use this.

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/commandresult_dismiss.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ Creates a new [CommandResult](commandresult.md) instance with its [Kind](command
1919
## Returns
2020

2121
A [CommandResult](commandresult.md) instance.
22+
23+
## Example
24+
25+
See [Command Results](../command-results.md) for an example of how to use this.

hub/powertoys/command-palette/microsoft-commandpalette-extensions-toolkit/commandresult_goback.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,3 +19,7 @@ Creates a new [CommandResult](commandresult.md) instance with its [Kind](command
1919
## Returns
2020

2121
A [CommandResult](commandresult.md) instance.
22+
23+
## Example
24+
25+
See [Command Results](../command-results.md) for an example of how to use this.

0 commit comments

Comments
 (0)