Skip to content

Commit 2b26a6e

Browse files
authored
Merge pull request #7481 from umbraco/merge-v16-changes-to-v17
Merge v16 changes to v17
2 parents e9a0451 + 9b7a784 commit 2b26a6e

File tree

45 files changed

+744
-98
lines changed

Some content is hidden

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

45 files changed

+744
-98
lines changed

17/umbraco-cms/SUMMARY.md

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -156,7 +156,7 @@
156156
* [Vite Package Setup](customizing/development-flow/vite-package-setup.md)
157157
* [Extensions Overview](customizing/extending-overview/README.md)
158158
* [Extension Registry](customizing/extending-overview/extension-registry/README.md)
159-
* [Register an Extension](customizing/extending-overview/extension-registry/register-an-extension.md)
159+
* [Register an Extension](customizing/extending-overview/extension-registry/register-extensions.md)
160160
* [Extension Manifest](customizing/extending-overview/extension-registry/extension-manifest.md)
161161
* [Replace, Exclude or Unregister](customizing/extending-overview/extension-registry/replace-exclude-or-unregister.md)
162162
* [Extension Types](customizing/extending-overview/extension-types/README.md)
@@ -217,6 +217,7 @@
217217
* [Sections & Trees](customizing/section-trees.md)
218218
* [Property Level UI Permissions](customizing/property-level-ui-permissions.md)
219219
* [Icons](customizing/foundation/icons.md)
220+
* [BackOffice Signs](customizing/back-office-signs.md)
220221
* [Searchable Trees (ISearchableTree)](customizing/searchable-trees.md)
221222
* [Property Editors](customizing/property-editors/README.md)
222223
* [Property Editor Validation](customizing/property-editors/property-editor-validation.md)
@@ -261,6 +262,7 @@
261262
* [Using Azure Blob Storage for Media and ImageSharp Cache](extending/filesystemproviders/azure-blob-storage.md)
262263
* [Configuring Azure Key Vault](extending/key-vault.md)
263264
* [Server Events From SignalR](extending/server-events.md)
265+
* [Flag Providers](extending/flag-providers.md)
264266
* [Packages](extending/packages/README.md)
265267
* [Creating a Package](extending/packages/creating-a-package.md)
266268
* [Language file for packages](extending/packages/language-files-for-packages.md)
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
description: Describes how to use sign information provided in management API responses to present additional details to consumers.
3+
---
4+
5+
# Backoffice Signs
6+
7+
When trees, collections and items are presented in the backoffice, additional information can be displayed in the form of Signs.
8+
9+
A Backoffice sign is a client-side extension point that determines how each sign is displayed in the backoffice.
10+
11+
A Sign can utilize conditions in the same way as other Extensions or it can be bound to a Flag coming from the Management API.
12+
13+
For example, a Document scheduled for future publishing will have a Flag defined as part of trees, collections and item response:
14+
15+
```json
16+
"flags": [
17+
{
18+
"alias": "Umb.ScheduledForPublish"
19+
}
20+
],
21+
```
22+
23+
A Flag can be the determinant for a Sign by declaring the `forEntityFlags` as part of its Manifest.
24+
25+
Example:
26+
```json
27+
...
28+
forEntityFlags: "Umb.ScheduledForPublish",
29+
...
30+
```
31+
32+
Using this binding lets the server determine which signs are present in the response via the registered collection of [flag providers](../extending/flag-providers.md).
33+
34+
## Displaying a Sign
35+
36+
{% hint style="info" %}
37+
The client extension for backoffice signs will be available in Umbraco 16.4 / 17.0.
38+
{% endhint %}

17/umbraco-cms/customizing/extending-overview/extension-registry/register-an-extension.md

Lines changed: 0 additions & 2 deletions
This file was deleted.

17/umbraco-cms/customizing/extending-overview/extension-types/modals/confirm-dialog.md

Lines changed: 44 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ To see all properties of the `UMB_CONFIRM_MODAL` token, see the [API reference](
2020

2121
The `onSubmit` method returns a promise that resolves when the user confirms the dialog, and rejects when the user cancels the dialog.
2222

23-
## Basic Usage
23+
## Opening a Confirmation Dialog
2424

2525
{% code title="my-element.ts" %}
2626
```typescript
@@ -62,3 +62,46 @@ export class MyConfirmationModal extends UmbElementMixin(LitElement) {
6262
}
6363
```
6464
{% endcode %}
65+
66+
## Convenience Method
67+
68+
Confirmation dialogs can be opened using the `umbConfirmModal` method, which offers a slightly simplified API.
69+
70+
{% code title="my-element.ts" %}
71+
```typescript
72+
import {
73+
html,
74+
LitElement,
75+
customElement,
76+
} from "@umbraco-cms/backoffice/external/lit";
77+
import { UmbElementMixin } from "@umbraco-cms/backoffice/element-api";
78+
import { umbConfirmModal } from "@umbraco-cms/backoffice/modal";
79+
80+
@customElement("restart-services-modal")
81+
export class RestartServicesModal extends UmbElementMixin(LitElement) {
82+
#onRequestDisable() {
83+
umbConfirmModal(this, {
84+
headline: this.localize.term("actions_disable"),
85+
content: this.localize.term("defaultdialogs_confirmdisable"),
86+
color: "danger",
87+
confirmLabel: this.localize.term("actions_disable"),
88+
})
89+
.then(() => {
90+
console.log("User has approved");
91+
})
92+
.catch(() => {
93+
console.log("User has rejected");
94+
});
95+
}
96+
97+
render() {
98+
return html`<uui-button
99+
look="primary"
100+
color="positive"
101+
@click=${this.#onRequestDisable}
102+
label=${this.localize.term("actions_disable")}
103+
></uui-button>`;
104+
}
105+
}
106+
```
107+
{% endcode %}

17/umbraco-cms/customizing/extending-overview/extension-types/property-value-preset.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ Notice that `forPropertyEditorSchemaAlias` only targets the Properties used on t
4949
## Utilize the Data-Type configuration
5050

5151
The `processValue` method takes four arguments:
52+
5253
- The current value.
5354
- The Data Type configuration.
5455
- The type arguments, which contains details such as whether the property is mandatory, and how it varies by culture and segment.

17/umbraco-cms/customizing/extending-overview/extension-types/sections/section-sidebar.md

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,7 @@ Section Sidebar extensions can be composed of **one or more** section sidebar ap
2020

2121
### Custom Sidebar App Example
2222

23-
Section Sidebar extension authors can place any custom web component into the sidebar. Extension authors will need to
24-
supply the `element` property with the path of their custom web component. Specify the full path, starting from the
25-
Umbraco project root.
23+
Section Sidebar extension authors can place any custom web component into the sidebar. Extension authors will need to supply the `element` property with the path of their custom web component. Specify the full path, starting from the Umbraco project root.
2624

2725
Sidebar Section extension authors may specify where the Section Sidebar app appears using
2826
[extension conditions](../condition.md).
@@ -94,9 +92,7 @@ For more information, see the documentation for the [menus](../menu.md) extensio
9492

9593
#### Coordinating subviews with menu items
9694

97-
Menu sidebar apps can coordinate navigation between subviews in the section extension by referencing
98-
[workspace extensions](../workspaces/workspace.md). Modify the menu item extension to include the `meta:entityType`
99-
property, and assign it the same value as a workspace view extensions' own `meta:entityType` property.
95+
Menu sidebar apps can coordinate navigation between subviews in the section extension by referencing [workspace extensions](../workspaces/workspace.md). Modify the menu item extension to include the `meta:entityType` property, and assign it the same value as a workspace view extensions' own `meta:entityType` property.
10096

10197
{% code title="umbraco-package.json" %}
10298
```json

17/umbraco-cms/customizing/extending-overview/extension-types/sections/section-view.md

Lines changed: 42 additions & 48 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ Section View extensions are containers for custom Umbraco packages or other back
1111

1212
## Creating a custom Section View
1313

14-
Custom Section View extensions are straightforward to create. Extension authors register the Section View extension and
15-
subsequently implement the content or interface they desire to display within the Section View.
14+
Custom Section View extensions are straightforward to create. Extension authors register the Section View extension and subsequently implement the content or interface they desire to display within the Section View.
1615

1716
### Registering Section View extensions
1817

@@ -32,27 +31,26 @@ Extensions authors can register the Section View extension using a JSON declarat
3231
{% code title="umbraco-package.json" %}
3332
```json
3433
{
35-
"type": "sectionView",
36-
"alias": "My.SectionView",
37-
"name": "My Section View",
38-
"element": "/App_Plugins/<package_name>/my-section.element.js",
39-
"meta": {
40-
"label": "My View",
41-
"icon": "icon-add",
42-
"pathname": "my-view"
43-
},
44-
"conditions": [
45-
{
46-
"alias": "Umb.Condition.SectionAlias",
47-
"match": "My.Section"
48-
}
49-
]
34+
"type": "sectionView",
35+
"alias": "My.SectionView",
36+
"name": "My Section View",
37+
"element": "/App_Plugins/<package_name>/my-section.element.js",
38+
"meta": {
39+
"label": "My View",
40+
"icon": "icon-add",
41+
"pathname": "my-view"
42+
},
43+
"conditions": [
44+
{
45+
"alias": "Umb.Condition.SectionAlias",
46+
"match": "My.Section"
47+
}
48+
]
5049
}
5150
```
5251
{% endcode %}
5352

54-
Tip: Use the absolute path, starting from the root of your Umbraco project, in the `element` property for
55-
JSON declarations. TypeScript declarations are capable of employing relative paths.
53+
Tip: Use the absolute path, starting from the root of your Umbraco project, in the `element` property for JSON declarations. TypeScript declarations are capable of employing relative paths.
5654

5755
{% endtab %}
5856

@@ -74,12 +72,12 @@ const sectionViews: Array<ManifestSectionView> = [
7472
meta: {
7573
label: "My View",
7674
icon: "icon-add",
77-
pathname: "my-view",
75+
pathname: "my-view",
7876
},
7977
conditions: [
8078
{
8179
alias: 'Umb.Condition.SectionAlias',
82-
match: 'My.Section',
80+
match: 'My.Section',
8381
}
8482
]
8583
}
@@ -112,11 +110,11 @@ export class MySectionViewElement extends UmbLitElement {
112110

113111
static override readonly styles = [
114112
css`
115-
:host {
116-
display: block;
113+
:host {
114+
display: block;
117115
padding: 20px;
118-
}
119-
`,
116+
}
117+
`,
120118
];
121119

122120
}
@@ -133,13 +131,11 @@ declare global {
133131

134132
## Adding Section Views to your own package
135133

136-
When developing a Section View extension for their own package, an extension author must create a Section extension to
137-
host the Section View extension.
134+
When developing a Section View extension for their own package, an extension author must create a Section extension to host the Section View extension.
138135

139136
Guidelines on creating Section extensions can be found at [this link](./section.md).
140137

141-
To link a Section View with a Section, set the `match` property in the condition to the same value as the Section's `alias`. In the
142-
provided example, this value is `NetworkServices.Section`.
138+
To link a Section View with a Section, set the `match` property in the condition to the same value as the Section's `alias`. In the provided example, this value is `NetworkServices.Section`.
143139

144140
{% code title="umbraco-package.json" %}
145141
```json
@@ -178,30 +174,28 @@ provided example, this value is `NetworkServices.Section`.
178174

179175
The Umbraco backoffice architecture places a strong emphasis on composing. Authors can extend existing sections, including core ones like Content, Media, and Settings, with Section View extensions.
180176

181-
After an author has completed their Section View extension, they can control the placement of the extension using
182-
conditions in the manifest definition.
177+
After an author has completed their Section View extension, they can control the placement of the extension using conditions in the manifest definition.
183178

184-
The `match` property demonstrates how an extension author can incorporate a custom Section View within the Content
185-
section.
179+
The `match` property demonstrates how an extension author can incorporate a custom Section View within the Content section.
186180

187181
{% code title="umbraco-package.json" %}
188182
```json
189183
{
190-
"type": "sectionView",
191-
"alias": "My.SectionView",
192-
"name": "My Section View",
193-
"element": "/App_Plugins/<package_name>/my-section.element.js",
194-
"meta": {
195-
"label": "My View",
196-
"icon": "icon-add",
197-
"pathname": "my-view"
198-
},
199-
"conditions": [
200-
{
201-
"alias": "Umb.Condition.SectionAlias",
202-
"match": "Umb.Section.Content"
203-
}
204-
]
184+
"type": "sectionView",
185+
"alias": "My.SectionView",
186+
"name": "My Section View",
187+
"element": "/App_Plugins/<package_name>/my-section.element.js",
188+
"meta": {
189+
"label": "My View",
190+
"icon": "icon-add",
191+
"pathname": "my-view"
192+
},
193+
"conditions": [
194+
{
195+
"alias": "Umb.Condition.SectionAlias",
196+
"match": "Umb.Section.Content"
197+
}
198+
]
205199
}
206200
```
207201
{% endcode %}

17/umbraco-cms/customizing/extending-overview/extension-types/sections/section.md

Lines changed: 7 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,9 @@ description: Introducing Section extensions, a home for custom content and funct
44

55
# Section
66

7-
Umbraco extension authors can place their extension in the top-level navigation of the backoffice using Sections. The
8-
extension will be placed among the default options such as Content, Media, Settings, etc.
7+
Umbraco extension authors can place their extension in the top-level navigation of the backoffice using Sections. The extension will be placed among the default options such as Content, Media, Settings, etc.
98

10-
Within the section, authors can add menus, section views, workspace views, or any other content or interface they
11-
desire.
9+
Within the section, authors can add menus, section views, workspace views, or any other content or interface they desire.
1210

1311
<figure><img src="../../../../.gitbook/assets/section.svg" alt=""><figcaption><p>Section</p></figcaption></figure>
1412

@@ -34,14 +32,11 @@ Sections can be created by adding a definition in the extension's manifest file.
3432

3533
### **Group permissions**
3634

37-
To enable custom sections for backoffice users, site administrators must first assign permissions to those users. This
38-
involves configuring the permission for a user group and assigning users to that group.
35+
To enable custom sections for backoffice users, site administrators must first assign permissions to those users. This involves configuring the permission for a user group and assigning users to that group.
3936

40-
To grant access to the custom section, open the Umbraco backoffice, navigate to the **Users** section, and select the
41-
**User groups** menu item. Site administrators can create a new user group or modify an existing one.
37+
To grant access to the custom section, open the Umbraco backoffice, navigate to the **Users** section, and select the **User groups** menu item. Site administrators can create a new user group or modify an existing one.
4238

43-
Once the user group is open, click the **Choose** button under the Sections section. Select the custom section from the
44-
slide-out modal to enable access.
39+
Once the user group is open, click the **Choose** button under the Sections section. Select the custom section from the slide-out modal to enable access.
4540

4641
<figure><img src="../../../../.gitbook/assets/sections-assigning.png" alt=""><figcaption><p>Enabling new Sections</p></figcaption></figure>
4742

@@ -51,15 +46,11 @@ After assigning permission, users may need to reload the backoffice for the chan
5146

5247
### **Entry points**
5348

54-
When creating a new section, create an [Entry Point](../backoffice-entry-point.md) extension in the
55-
[Umbraco Package Manifest](../../../umbraco-package.md) to complement it. Entry Point extensions add initialization and
56-
teardown lifecycle events that may be helpful in coordinating behavior inside the section.
49+
When creating a new section, create an [Entry Point](../backoffice-entry-point.md) extension in the [Umbraco Package Manifest](../../../umbraco-package.md) to complement it. Entry Point extensions add initialization and teardown lifecycle events that may be helpful in coordinating behavior inside the section.
5750

5851
## **Extend with Sidebar, Dashboards, and more**
5952

60-
Sections serve as blank canvases within the Umbraco backoffice. Extension authors can integrate other Umbraco extensions
61-
into sections, including [custom dashboards](../../../../tutorials/creating-a-custom-dashboard/),
62-
[sidebars](section-sidebar.md), and [section views](section-view.md).
53+
Sections serve as blank canvases within the Umbraco backoffice. Extension authors can integrate other Umbraco extensions into sections, including [custom dashboards](../../../../tutorials/creating-a-custom-dashboard/), [sidebars](section-sidebar.md), and [section views](section-view.md).
6354

6455
Section authors can also skip Umbraco backoffice components and build a fully custom view by creating an empty element.
6556

0 commit comments

Comments
 (0)