Skip to content

Commit 7319dcc

Browse files
authored
Merge pull request MicrosoftDocs#5292 from MicrosoftDocs/main
Merging main to live to pick up recent changes
2 parents 125b29c + e6c52f2 commit 7319dcc

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

48 files changed

+1979
-25
lines changed

hub/apps/design/accessibility/designing-inclusive-software.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,7 @@ In summary, follow these seven steps to ensure your software is inclusive.
9494
3. Design a logical hierarchy for your product, noting where the standard controls, any custom controls, and keyboard focus are in the UI.
9595
4. Design useful system settings (such as keyboard navigation, high contrast, and high dpi) into your product.
9696
5. Implement your design, using the [Microsoft accessibility developer hub](https://developer.microsoft.com/windows/accessible-apps) and your framework’s accessibility specification as a reference point.
97-
6. Test your product with users who have special needs to ensure they will be able to take advantage of the inclusive design techniques implemented in it.
97+
6. Test your product with users who have functional needs to ensure they will be able to take advantage of the inclusive design techniques implemented in it.
9898
7. Deliver your finished product and document your implementation for those who may work on the project after you.
9999

100100
## Related topics

hub/apps/design/controls/forms.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -121,7 +121,7 @@ Control | Use | Example
121121
### Lists
122122
Control | Use | Example
123123
- | - | -
124-
[ComboBox](combo-box.md) | Start in compact state and expand to show list of selectable items | Select from a long list of items, such as states or countries
124+
[ComboBox](combo-box.md) | Start in compact state and expand to show list of selectable items | Select from a long list of items, such as states or countries/regions
125125
[ListView](./lists.md#list-view) | Categorize items and assign group headers, drag and drop items, curate content, and reorder items | Rank options
126126
[GridView](./lists.md#grid-view) | Arrange and browse image-based collections | Pick a photo, color, display theme
127127

hub/apps/design/globalizing/guidelines-and-checklist-for-globalizing-your-app.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ Design and develop your app in such a way that it functions appropriately on sys
2020
| Appropriately format numbers, dates, times, addresses, and phone numbers. | These formats vary between cultures, regions, languages, and markets. If you're displaying these data then use [**Globalization**](/uwp/api/Windows.Globalization?branch=live) APIs to get the format appropriate for a particular audience. See [Globalize your date/time/number formats](use-global-ready-formats.md). The order in which family and given names are displayed, and the format of addresses, can differ as well. Use standard date, time, and number displays. Use standard date and time picker controls. Use standard address information. |
2121
| Support international units of measurement and currency. | Different units and scales are used in different countries, although the most popular are the metric system and the imperial system. Be sure to support the correct system measurement if you deal with measurements such as length, temperature, and area. Use the [**GeographicRegion.CurrenciesInUse**](/uwp/api/windows.globalization.geographicregion.CurrenciesInUse) property to get the set of currencies in use in a region. |
2222
| Use Unicode for character encoding. | By default, Microsoft Visual Studio uses Unicode character encoding for all documents. If you're using a different editor, be sure to save source files in the appropriate Unicode character encodings. All Windows Runtime APIs return UTF-16 encoded strings. |
23-
| Support international paper sizes. | The most common paper sizes differ between countries, so if you include features that depend on paper size, such as printing, be sure to support and test common international sizes. |
23+
| Support international paper sizes. | The most common paper sizes differ between countries/regions, so if you include features that depend on paper size, such as printing, be sure to support and test common international sizes. |
2424
| Record the language of the keyboard or IME. | When your app asks the user for text input, record the language tag for the currently enabled keyboard layout or Input Method Editor (IME). This ensures that when the input is displayed later it's presented to the user with the appropriate formatting. Use the [**Language.CurrentInputMethodLanguageTag**](/uwp/api/windows.globalization.language.CurrentInputMethodLanguageTag) property to get the current input language. |
2525
| Don't use language to assume a user's region; and don't use region to assume a user's language. | Language and region are separate concepts. A user can speak a particular regional variant of a language, like en-GB for English as spoken in the UK, but the user might be in an entirely different country or region. Consider whether your app requires knowledge about the user's language (for UI text, for example), or region (for licensing, for example). For more info, see [Understand user profile languages and app manifest languages](manage-language-and-region.md). |
2626
| The rules for comparing language tags are non-trivial. | [BCP-47 language tags](https://tools.ietf.org/html/bcp47) are complex. There are a number of issues when comparing language tags, including issues with matching script information, legacy tags, and multiple regional variants. The Resource Management System in Windows takes care of matching for you. You can specify a set of resources in any languages, and the system chooses the appropriate one for the user and the app. See [App resources and the Resource Management System](/windows/uwp/app-resources/index) and [How the Resource Management System matches language tags](/windows/uwp/app-resources/how-rms-matches-lang-tags). |

hub/apps/design/globalizing/use-global-ready-formats.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,7 @@ To ensure that the preferred calendar format is used, you can use the standard [
108108

109109
## Format phone numbers appropriately
110110

111-
Phone numbers are formatted differently across regions. The number of digits, how the digits are grouped, and the significance of certain parts of the phone number vary between countries. Starting in Windows 10, version 1607, you can use classes in the [**PhoneNumberFormatting**](/uwp/api/windows.globalization.phonenumberformatting?branch=live) namespace to format phone numbers appropriately for the current region.
111+
Phone numbers are formatted differently across regions. The number of digits, how the digits are grouped, and the significance of certain parts of the phone number vary between countries/regions. Starting in Windows 10, version 1607, you can use classes in the [**PhoneNumberFormatting**](/uwp/api/windows.globalization.phonenumberformatting?branch=live) namespace to format phone numbers appropriately for the current region.
112112

113113
[**PhoneNumberInfo**](/uwp/api/windows.globalization.phonenumberformatting.phonenumberinfo?branch=live) parses a string of digits and allows you to: determine whether the digits are a valid phone number in the current region; compare two numbers for equality; and to extract the different functional parts of the phone number, such as country code or geographical area code.
114114

hub/apps/design/input/guidelines-for-optical-zoom.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ Optical zoom shouldn't be confused with [Semantic Zoom](../controls/semantic-zoo
4242
Use the following guidelines for apps that support either resizing or optical zooming:
4343

4444
- If maximum and minimum size constraints or boundaries are defined, use visual feedback to demonstrate when the user reaches or exceeds those boundaries.
45-
- Use snap points to influence zooming and resizing behavior by providing logical points at which to stop the manipulation and ensure a specific subset of content is displayed in the viewport. Provide snap points for common zoom levels or logical views to make it easier for a user to select those levels. For example, photo apps might provide a resizing snap point at 100% or, in the case of mapping apps, snap points might be useful at city, state, and country views.
45+
- Use snap points to influence zooming and resizing behavior by providing logical points at which to stop the manipulation and ensure a specific subset of content is displayed in the viewport. Provide snap points for common zoom levels or logical views to make it easier for a user to select those levels. For example, photo apps might provide a resizing snap point at 100% or, in the case of mapping apps, snap points might be useful at city, state, and country/region views.
4646

4747
Snap points enable users to be imprecise and still achieve their goals. If you're using XAML, see the snap points properties of [**ScrollViewer**](/uwp/api/Windows.UI.Xaml.Controls.ScrollViewer).
4848

Lines changed: 234 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,234 @@
1+
---
2+
title: Action definition JSON schema for Windows Copilot Runtime Action providers
3+
description: Describes the format of the action definition JSON file format for Windows Copilot Runtime Action providers.
4+
ms.topic: article
5+
ms.date: 02/04/2025
6+
ms.localizationpriority: medium
7+
---
8+
9+
10+
11+
# Action definition JSON schema for Windows Copilot Runtime Action providers
12+
13+
This article describes the format of the action definition JSON file format for Windows Copilot Runtime Actions. This file must be included in your project with the **Build Action** set to "Content" and **Copy to Output Directory** set to “Copy if newer”. Specify the package-relative path to the JSON file in your package manifest XML file. For more information, see [Action provider package manifest XML format](action-provider-manifest.md).
14+
15+
## Example action definition JSON file
16+
17+
```json
18+
"version": 1,
19+
"actions": [
20+
{
21+
"id": "Contoso.SampleGreeting",
22+
"description": "Send greeting with Contoso",
23+
"icon": "ms-resource//...",
24+
"inputs": [
25+
{
26+
"name": "UserFriendlyName",
27+
"kind": "Text"
28+
},
29+
{
30+
"name": "PetName",
31+
"kind": "Text",
32+
"required": false
33+
}
34+
],
35+
"inputCombinations": [
36+
{
37+
"inputs": ["UserFriendlyName"],
38+
"description": "Greet ${UserFriendlyName.Text}"
39+
},
40+
{
41+
"inputs": ["UserFriendlyName", "PetName"],
42+
"description": "Greet ${UserFriendlyName.Text} and their pet ${PetName.Text}"
43+
}
44+
],
45+
"contentAgeRating": "child",
46+
"invocation":
47+
{
48+
{
49+
"type": "Uri",
50+
"uri": "contoso://greetUser?userName=${UserFriendlyName.Text}&petName=${PetName.Text}",
51+
},
52+
"where": [
53+
"${UserFriendlyName.Length > 3}"
54+
]
55+
}
56+
},
57+
{
58+
"id": "Contoso.SampleGetText",
59+
"description": "Summarize file with Contoso",
60+
"icon": "ms-resource://...",
61+
"inputs": [
62+
{
63+
"name": "FileToSummarize",
64+
"kind": "File"
65+
}
66+
],
67+
"inputCombinations": [
68+
{
69+
"inputs": ["FileToSummarize"],
70+
"description": "Summarize ${FileToSummarize.Path}"
71+
},
72+
],
73+
"outputs": [
74+
{
75+
"name": "Summary",
76+
"kind": "Text"
77+
}
78+
],
79+
"contentAgeRating": "child",
80+
"invocation": {
81+
"type": "COM",
82+
"clsid": "{...}"
83+
}
84+
}
85+
]
86+
}
87+
```
88+
89+
## Action definition JSON properties
90+
91+
The tables below describe the properties of the action definition JSON file.
92+
93+
### Document root
94+
95+
| Property | Type | Description | Required |
96+
|----------|------|-------------|----------|
97+
| version | string | Schema version. When new functionality added, the version increments by one. | Yes. |
98+
| actions | Action[] | Defines the actions provided by the app. | Yes. |
99+
100+
### Action
101+
102+
| Property | Type | Description | Required |
103+
|----------|------|-------------|----------|
104+
| id | string | Action identifier. Must be unique per app package. This value is not localizable. | Yes |
105+
| description | string | User-facing description for this action. This value is localizable. | Yes |
106+
| icon | string | Localizable icon for the action. This value is an *ms-resource* string for an icon deployed with the app. | No |
107+
| inputs | Inputs[] | List of entities that this action accepts as input. | Yes |
108+
| inputCombinations | InputCombination[] | Provides descriptions for different combinations of inputs. | Yes |
109+
| outputs | Output[] | If specified, must be an empty string in the current release. | No |
110+
| invocation | Invocation | Provides information about how the action is invoked. | Yes |
111+
| contentAgeRating | string | A field name from the [UserAgeConsentGroup](/uwp/api/windows.system.userageconsentgroup)that specifies the appropriate age rating for the action. The allowed values are "Child", "Minor", "Adult". If no value is specified, the default behavior allows access to all ages. | No |
112+
113+
### Output
114+
115+
| Property | Type | Description | Required |
116+
|----------|------|-------------|----------|
117+
| name | string | The variable name of the entity. This value is not localizable. | Yes |
118+
| kind | string | A field name from the **ActionEntityKind** enumeration specifying the entity type. This value is not localizable. The allowed values are "None", "Document", "File", "Photo", "Text". | Yes |
119+
120+
### InputCombination
121+
122+
| Property | Type | Description | Required |
123+
|----------|------|-------------|----------|
124+
| inputs | string[] | A list of Input names for an action invocation. The list may be empty. | Yes |
125+
| description | string | Description for the action invocation. This value is localizable. | No |
126+
| where | string[] | One or more conditional statements determining the conditions under which the action applies. | No |
127+
128+
### Invocation
129+
130+
| Property | Type | Description | Required |
131+
|----------|------|-------------|----------|
132+
| type | string | The instantiation type for the action. The allowed values are "uri" and "com" | Yes |
133+
| uri | string | The absolute URI for launching the action. Entity usage can be included within the string. | Yes, for URI instantiated actions. |
134+
| clsid | string | The class ID for the COM class that implements **IActionProvider**. | Yes, for COM actions |
135+
| inputData | A list of name/value pairs specifying additional data for URI actions. | No. Only valid for URI actions. |
136+
137+
138+
## ActionEntityKind enumeration
139+
140+
The **ActionEntityKind** enumeration specifies the types of entities that are supported by the Windows Copilot Runtime Actions. In the context of a JSON action definition, the entity kinds are string literals that are case-sensitive.
141+
142+
| Entity kind string | Description |
143+
|-------|------------|-------------|
144+
| "File" | Includes all file types that are not supported by photo or document entity types. |
145+
| "Photo" | Image file types. Supported image file extensions are ".jpg", ".jpeg", and ".png" |
146+
| "Document" | Document file types. Supported document file extensions are ".doc", ".docx", ".pdf", ".txt" |
147+
| "Text" | Supports strings of text |
148+
149+
## Entity properties
150+
151+
Each entity type supports one or more properties that provide instance data for the entity. Entity property names are case sensitive.
152+
153+
The following example illustrates how entities are referenced in the query string for actions that are launched via URI activation:
154+
155+
`...?param1=${entityName.property1}&param2=${entityName.property2}`
156+
157+
For information on using entity properties to create conditional sections in the action definition JSON, see [Where clauses](#where-clauses).
158+
159+
### File entity properties
160+
161+
| Property | Type | Description |
162+
|----------|------|-------------|
163+
| "FileName" | string | The name of the file. |
164+
| "Path" | string | The path of the file. |
165+
| "Extension" | string | The extension of the file. |
166+
167+
### Document entity properties
168+
169+
The *Document* entity supports the same properties as *File*.
170+
171+
### Photo entity properties
172+
173+
The *Photo* entity supports all of the properties of *File* in addition to the following properties.
174+
175+
| Property | Type | Description |
176+
|----------|------|-------------|
177+
| "IsTemporaryPath" | boolean | A value specifying whether the photo is stored in a temporary path. For example, this property is true for photos that are stored in memory from a bitmap, not stored permanently in a file. |
178+
179+
### Text entity properties
180+
181+
| Property | Type | Description |
182+
|----------|------|-------------|
183+
| "Text" | string | The full text. |
184+
| "ShortText" | string | A shortened version of the text, suitable for UI display. |
185+
| "Title" | string | The title of the text. |
186+
| "Description" | string | A description of the text. |
187+
| "Length" | double | The length of the text in characters. |
188+
| "WordCount" | double | The number of words in the text. |
189+
190+
## Where clauses
191+
192+
The action definition JSON format supports *where* clauses that can be used to implement conditional logic, such as specifying that an action should be invoked only when an entity property has a specified value.
193+
194+
The following operators can be used with *where* clauses.
195+
196+
| Operator | Description |
197+
|----------|-------------|
198+
| == | Equality |
199+
| ~= | Case-insensitive equality |
200+
| != | Inequality |
201+
| < | Less than |
202+
| <= | Less than or equal to |
203+
| > | Greater than |
204+
| >= | Greater than or equal to |
205+
| \|\| | Logical OR |
206+
| && | Logical AND |
207+
208+
*Where* clauses use the following format:
209+
210+
```json
211+
"where": [
212+
"${<property_accessor>} <operator> <value>"
213+
]
214+
```
215+
216+
The following example shows a *where* clause that evaluates to true if a **File** entity has the file extension ".txt".
217+
218+
```json
219+
"where": [
220+
"${File.Extension} ~= \".txt\""
221+
]
222+
```
223+
224+
Multiple *where* clauses can be combined using the logical AND and logical OR operators.
225+
226+
```json
227+
where": [
228+
"${File.Extension} ~= \".txt\" || ${File.Extension} ~= \".md\""
229+
]
230+
```
231+
232+
## Related articles
233+
234+

0 commit comments

Comments
 (0)