mirror of
https://github.com/microsoft/PowerToys.git
synced 2026-05-18 05:05:25 +02:00
(this PR is an updated version of #43784) This PR adds a new type of page to Command Palette: The `ParametersPage`. This allows extensions to create commands that require a set of parameters before invoking the command. Previously, extensions could create commands with a form page to use an adaptive card for parameter input, but that was a relatively heavyweight UX. Instead, the `ParametersPage` allows extensions to define a set of lightweight inputs, which allows for a more streamlined experience. The parameters page is made up of a set of "runs". Each run represents a single element in the search box. Runs can be either: * A label run: a static piece of text * An value run: some input for the user to provide a value. These fall into several categories: * String input * Command Input * `IInvokableCommand`s become buttons in the search box * `IListPage`s become a list input to pick from (**these will be added in a follow-up PR**) There are a ton of samples included. I also added all my draft notes in the drafts folder, to see how we got here. I'd skip reviewing those. Furthermore, I added the "dumb" token support, where an extension can opt in to having tokens in the search box, delimited by ZWSP characters. The XAML styling was fixed by Niels a few months back Closes #40948 --------- Co-authored-by: Niels Laute <niels.laute@live.nl>