Skip to content

Commit 6876293

Browse files
authored
Merge pull request AdobeDocs#89 from AdobeDocs/kh_sdk-120
Admin SDK UI 1.2.0 docs
2 parents 79a229f + 4778a49 commit 6876293

File tree

7 files changed

+116
-21
lines changed

7 files changed

+116
-21
lines changed

src/data/navigation/sections/admin-ui-sdk.js

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,15 +17,19 @@ module.exports = [
1717
pages: [
1818
{
1919
title: "menu",
20-
path: "admin-ui-sdk/extension-points/menu.md"
20+
path: "/admin-ui-sdk/extension-points/menu.md"
21+
},
22+
{
23+
title: "order",
24+
path: "/admin-ui-sdk/extension-points/order.md"
2125
},
2226
{
2327
title: "page",
24-
path: "admin-ui-sdk/extension-points/page.md"
28+
path: "/admin-ui-sdk/extension-points/page.md"
2529
},
2630
{
2731
title: "product",
28-
path: "admin-ui-sdk/extension-points/product.md"
32+
path: "/admin-ui-sdk/extension-points/product.md"
2933
}
3034

3135
]

src/pages/admin-ui-sdk/app-registration.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ Create an `ExtensionRegistration` component that registers the menu configurati
5050
1. Add the `uix-guest` dependency in the `package.json`.
5151

5252
```json
53-
"@adobe/uix-guest": "^0.8.2"
53+
"@adobe/uix-guest": "^0.8.3"
5454
```
5555

5656
2. Run `npm install`.

src/pages/admin-ui-sdk/configuration.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ Navigate to **Stores** > Settings > **Configuration** > **Adobe Services** > **A
3636
bin/magento cache:flush
3737
```
3838

39+
## Clean the Admin UI SDK cache
40+
41+
The `admin_ui_sdk` cache type stores Admin customizations. As you develop these customizations, run the following command to ensure you are seeing the latest changes:
42+
43+
```bash
44+
bin/magento cache clean admin_ui_sdk
45+
```
46+
3947
## Test with a sample app
4048

4149
You can download a sample app from the [Commerce UI test extension repository](https://github.com/magento/app-builder-samples) to gain insight on how the Admin SDK injects menus and pages into the Admin.

src/pages/admin-ui-sdk/extension-points/menu.md

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -12,26 +12,34 @@ The `menu` extension point creates a new menu that redirects to the App Builder
1212

1313
## Example customization
1414

15-
The following example creates the **Marketing** > **First App on App Builder** menu option.
15+
The following example creates the **Apps** > **First App on App Builder** menu option.
1616

1717
```javascript
18-
menu: {
19-
getItems() {
20-
return [
18+
menu: {
19+
getItems() {
20+
return [
2121
{
22-
id: `${extensionId}`,
23-
title: 'First App on App Builder',
24-
parent: 'Magento_Backend::marketing'
22+
id: `${extensionId}::first`,
23+
title: 'First App on App Builder',
24+
parent: `${extensionId}::apps`,
25+
sortOrder: 1
26+
},
27+
{
28+
id: `${extensionId}::apps`,
29+
title: 'Apps',
30+
isSection: true
2531
}
26-
]
27-
}
28-
}
32+
]
33+
}
34+
}
2935
```
3036

3137
## Parameters
3238

3339
| Field | Type | Required | Description |
3440
| --- | --- | --- | --- |
3541
| `id` | string | Yes | A unique ID to identify the application menu in Adobe Commerce Admin. |
42+
| `isSection` | boolean | No | Indicates whether the menu item is a new section. The default value is `false`. |
3643
| `parent` | string | No | The parent menu. |
44+
| `sortOrder` | integer | No | The position of the menu, relative to other menus in the section. A value of `1` indicates the menu will be listed first. If this parameter is not specified, it will be placed randomly.
3745
| `title` | string | No | The title to display. |
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
---
2+
title: order
3+
description: Customize the orders page in the Adobe Commerce Admin.
4+
keywords:
5+
- App Builder
6+
- Extensibility
7+
---
8+
9+
# order
10+
11+
The `order` extension point enables you to add columns to the grid on the **Sales** > **Orders** page in the Adobe Commerce Admin. This extension point requires a GraphQL Mesh instance to retrieve the data to be added to the custom columns.
12+
13+
You can use the [`aio api-mesh:describe` command](https://developer.adobe.com/graphql-mesh-gateway/gateway/command-reference/#aio-api-meshdescribe) to retrieve the values of the API key and mesh ID. The key is appended to the mesh endpoint URL.
14+
15+
## Example customization
16+
17+
​The following example creates custom columns labeled `First App Column` and `Second App Column`.
18+
19+
```javascript
20+
order: {
21+
getGridColumns() {
22+
return {
23+
data:{
24+
meshId:'MESH_ID',
25+
apiKey: 'API_KEY'
26+
},
27+
properties:[
28+
{
29+
label: 'First App Column',
30+
columnId: 'first_column',
31+
type: 'string',
32+
align: 'left'
33+
},
34+
{
35+
label: 'Second App Column',
36+
columnId: 'second_column',
37+
type: 'integer',
38+
align: 'left'
39+
}
40+
]
41+
}
42+
}
43+
}
44+
```
45+
46+
## Parameters
47+
48+
​| Field | Type | Required | Description |
49+
| --- | --- | --- | --- |
50+
| `data.apiKey` | string | Yes | The API key assigned to the GraphQL mesh. |
51+
| `data.meshId` | string | Yes | The ID of the mesh used to retrieve the column data.|
52+
| `properties.align` | string | Yes | The alignment of the values in the column. One of `left`, `right`, `center`. |
53+
| `properties.columnId` | string | Yes | The identifier used in the external dataset to identify the column. |
54+
| `properties.label` | string | Yes | The label of the column to display. |
55+
| `properties.type` | string | Yes | The data type of the values in the column. Supported values: `boolean`, `date`, `float`, `integer`, `string`.|

src/pages/admin-ui-sdk/extension-points/product.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,7 @@ keywords:
88

99
# product
1010

11-
The `product` extension point customizes product features in the Adobe Commerce Admin.
12-
13-
You can customize the following product features:
11+
The `product` extension point customizes product features in the Adobe Commerce Admin. You can customize the following product features:
1412

1513
* Product grid mass actions
1614

@@ -30,13 +28,14 @@ product: {
3028
title: 'First App Mass Action',
3129
message: 'Are you sure your want to proceed with First App Mass Action on selected products?'
3230
},
33-
path: 'first-mass-action'
31+
path: '#/first-mass-action',
32+
productSelectLimit: 1
3433
},
3534
{
3635
actionId: `${extensionId}::another-first-mass-action`,
3736
label: 'Another Mass Action',
3837
type: `${extensionId}.another-mass-action`,
39-
path: 'another-mass-action'
38+
path: '#/another-mass-action'
4039
}
4140
]
4241
}
@@ -51,5 +50,6 @@ product: {
5150
| `confirm.message` | string | No | The message displayed on the confirmation dialog for a mass action |
5251
| `confirm.title` | string | No | The title of a dialog that confirms the mass action |
5352
| `label` | string | Yes | An Action label to display in the Mass Actions grid |
54-
| `path` | string | Yes | The relative path in the application to redirect to the action. The URL will be appended with a query of selected `productIds` |
53+
| `path` | string | Yes | The relative path in the application to redirect to the action. You might need to prepend `#/` to the path to ensure access to the correct page. |
54+
| `productSelectLimit` | integer | No | Set the maximum number products that can be selected for a mass action. By default, the number is unlimited. |
5555
| `type` | string | Yes | A unique ID that identifies the type of the action. |

src/pages/admin-ui-sdk/release-notes.md

Lines changed: 21 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,26 @@ keywords:
88

99
# Adobe Commerce Admin UI SDK release notes
1010

11+
## Version 1.2.0
12+
13+
### Release date
14+
15+
October 18, 2023
16+
17+
### Enhancements
18+
19+
* Created the [`order` extension point](extension-points/order.md), which adds columns to the order grid. <!-- CEXT-2272 -->
20+
21+
* Added the [`admin_ui_sdk` cache type](configuration.md#clean-the-admin-ui-sdk-cache). When enabled, Commerce caches customizations to the Admin. <!-- CEXT-2377 -->
22+
23+
* Added the `isSection` and `sortOrder` parameters to the [`menu` extension point](extension-points/menu.md). The `isSection` parameter allows you to define a menu section, while `sortOrder` defines the placement of a menu item. <!-- CEXT 2249, CEXT-2289 -->
24+
25+
* Added the `productSelectLimit` parameter for mass actions in the [`product` extension point](extension-points/product.md). <!-- CEXT-2357 -->
26+
27+
### Bug fixes
28+
29+
* Minimized the number of calls needed to build a menu. <!-- CEXT-2396 -->
30+
1131
## Version 1.1.2
1232

1333
### Release date
@@ -16,7 +36,7 @@ October 6, 2023
1636

1737
### Enhancements
1838

19-
Fixed security cross-site scripting (XSS) and password hash security vulnerabilities.
39+
Fixed cross-site scripting (XSS) and password hash security vulnerabilities.
2040

2141
## Version 1.1.1
2242

0 commit comments

Comments
 (0)