Skip to content

Commit 22c933e

Browse files
authored
Merge pull request #6990 from umbraco/property-editors
Updated UI Builder articles
2 parents 592fb1d + f00d20d commit 22c933e

File tree

6 files changed

+66
-49
lines changed

6 files changed

+66
-49
lines changed

15/umbraco-ui-builder/areas/context-apps.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ description: Configuring context apps in Umbraco UI Builder.
44

55
# Context Apps
66

7-
Context Apps in Umbraco UI Builder function similarly to Content Apps. They provide contextual applications within the content editor UI. By defining context apps, you can expose collections that are directly related to the content in question. For example, blog post comments can be linked to their respective blog posts and managed in context through a content app.
7+
Context Apps in Umbraco UI Builder function similarly to Workspace Views (previously called as Content Apps). They provide contextual applications within the content editor UI. By defining context apps, you can expose collections that are directly related to the content in question. For example, blog post comments can be linked to their respective blog posts and managed in context through a Workspace View.
88

99
![Context App](../images/context_app.png)
1010

@@ -159,7 +159,7 @@ contextAppConfig.SetIconColor("blue");
159159

160160
## Changing Context App Visibility
161161

162-
Context app visibility is controlled by a delegate that takes a `ContextAppVisibilityContext` instance. This method contains a `Source` property which holds a reference to the source object that the content app is being displayed on (i.e., an `IContent` instance). It also holds a reference to a `UserGroups` collection of the currently logged-in user's user groups. You can use these values to determine when the context app should be displayed.
162+
Context app visibility is controlled by a delegate that takes a `ContextAppVisibilityContext` instance. This method contains a `Source` property which holds a reference to the source object that the Workspace View is being displayed on (i.e., an `IContent` instance). It also holds a reference to a `UserGroups` collection of the currently logged-in user's user groups. You can use these values to determine when the context app should be displayed.
163163

164164
By default, context apps are pre-filtered to only appear on the tree they are defined in. This default behavior is combined with the SetVisibility configuration to control visibility.
165165

15/umbraco-ui-builder/getting-started/user-interface.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ The editor is where the main content editing occurs. It is structured using tabs
3838

3939
## Workspace Views
4040

41-
Workspace Views are additional functionality that can be added to an editor. They provide extra features based on the content of the item being edited. For instance, a media content app might allow you to resize or crop an image directly from the editor.
41+
Workspace Views are additional functionality that can be added to an editor. They provide extra features based on the content of the item being edited. For instance, a media Workspace View might allow you to resize or crop an image directly from the editor.
4242

4343
![Workspace Views](images/workspace-views.png)
4444

Lines changed: 18 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,32 @@
11
---
2-
description: Conventions used by Umbraco UI Builder, the backoffice UI builder for Umbraco.
2+
description: Guidelines for fluent configuration and naming conventions in Umbraco UI Builder.
33
---
44

55
# Conventions
66

77
## Fluent Conventions
88

9-
Most configuration methods in Umbraco UI Builder aim to be fluent. This means that they return a relevant config instance allowing to chain multiple methods calls together in one. For those who prefer to be a bit more verbose, many methods also accept an optional lambda expression. This allows you to pass in a delegate to perform the inner configuration of the element being defined.
9+
Umbraco UI Builder follows a fluent configuration style, allowing method chaining for concise and readable code. Alternatively, a lambda expression can be used for a more structured approach.
10+
11+
### Chaining Example
12+
13+
```csharp
14+
config.AddSection("Repositories")
15+
.Tree()
16+
.AddCollection<People>(p => p.Id, "Person", "People");
17+
```
18+
19+
### Lambda Expression Example Example
1020

1121
```csharp
12-
// Chaining example
13-
config.AddSection("Repositories").Tree().AddCollection<People>(p => p.Id, "Person", "People");
14-
15-
// Delegate example
16-
config.AddSection("Repositories", sectionConfig => {
17-
sectionConfig.Tree(treeConfig => {
18-
treeConfig.AddCollection<People>(p => p.Id, "Person", "People");
19-
});
22+
config.AddSection("Repositories", sectionConfig => {
23+
sectionConfig.Tree(treeConfig => {
24+
treeConfig.AddCollection<People>(p => p.Id, "Person", "People");
25+
});
2026
});
2127
```
2228

2329
## Naming Conventions
2430

25-
Throughout the API, where a method name starts with **Add** then multiple configurations can be declared. Whereas if a method name starts with **Set** then only one instance of the configuration can be declared within the current configuration context.
31+
* Methods prefixed with **Add** allow multiple configurations.
32+
* Methods prefixed with **Set** permit only one instance within the current configuration context.

15/umbraco-ui-builder/miscellaneous/umbraco-aliases.md

Lines changed: 14 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,27 @@
11
---
2-
description: A list of useful Umbraco aliases for use with Umbraco UI Builder, the backoffice UI builder for Umbraco.
2+
description: Common Umbraco aliases used in Umbraco UI Builder for Sections, Dashboards, Workspace Views, and Trees.
33
---
44

55
# Umbraco Aliases
66

7-
In a number of places in the Umbraco UI Builder API, you are required to know the aliases of other elements. For example, when you are adding sections, context apps, or dashboards before/after other instances. This is basic enough when it's referencing aliases of things defined in the Umbraco UI Builder config. However, for existing Umbraco instances it can be hard to find them so below is documented a number of known aliases for different elements.
7+
Umbraco UI Builder requires aliases for different elements, such as sections, context apps, and dashboards. While aliases for elements defined in the UI Builder config are straightforward, finding aliases for existing Umbraco instances can be challenging. Below is a list of known aliases for reference.
88

9-
## Dashboard aliases
9+
## Dashboard Aliases
1010

11-
### **Content**
11+
### Content
1212

1313
| Name | Alias |
1414
| -- | -- |
1515
| Getting Started | `contentIntro` |
1616
| Redirect URL Management | `contentRedirectManager` |
1717

18-
### **Media**
18+
### Media
1919

2020
| Name | Alias |
2121
| -- | -- |
2222
| Content | `mediaFolderBrowser` |
2323

24-
### **Settings**
24+
### Settings
2525

2626
| Name | Alias |
2727
| -- | -- |
@@ -31,36 +31,36 @@ In a number of places in the Umbraco UI Builder API, you are required to know th
3131
| Models Builder | `settingsModelsBuilder` |
3232
| Health Check | `settingsHealthCheck` |
3333

34-
### **Members**
34+
### Members
3535

3636
| Name | Alias |
3737
| -- | -- |
3838
| Getting Started | `memberIntro` |
3939

40-
## Content App aliases
40+
## Workspace Views Aliases
4141

42-
### **Content**
42+
### Content
4343

4444
| Name | Alias |
4545
| -- | -- |
4646
| Content | `umbContent` |
4747
| Info | `umbInfo` |
4848

49-
### **Media**
49+
### Media
5050

5151
| Name | Alias |
5252
| -- | -- |
5353
| Content | `umbContent` |
5454
| Info | `umbInfo` |
5555

56-
### **Members**
56+
### Members
5757

5858
| Name | Alias |
5959
| -- | -- |
6060
| Content | `umbContent` |
6161
| Info | `umbInfo` |
6262

63-
### **ContentTypes**
63+
### ContentTypes
6464

6565
| Name | Alias |
6666
| -- | -- |
@@ -69,7 +69,7 @@ In a number of places in the Umbraco UI Builder API, you are required to know th
6969
| Permissions | `permissions` |
7070
| Templates | `templates` |
7171

72-
## Section aliases
72+
## Section Aliases
7373

7474
| Name | Alias |
7575
| -- | -- |
@@ -82,7 +82,7 @@ In a number of places in the Umbraco UI Builder API, you are required to know th
8282
| Forms | `forms` |
8383
| Translation | `translation` |
8484

85-
## Tree aliases
85+
## Tree Aliases
8686

8787
| Name | Alias |
8888
| -- | -- |

15/umbraco-ui-builder/property-editors/entity-picker.md

Lines changed: 28 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -1,44 +1,54 @@
11
---
2-
description: Using the entity picker property editor with Umbraco UI Builder, the backoffice UI builder for Umbraco.
2+
description: Configure and use the Entity Picker property editor in Umbraco UI Builder to select entities from a collection.
33
---
44

55
# Entity Picker
66

7-
The Entity Picker property editor is an Umbraco property editor that lets you select one or more entities from an Umbraco UI Builder collection.
7+
The Entity Picker property editor allows selecting one or more entities from an Umbraco UI Builder collection.
88

9-
## Configuring an entity picker
9+
## Configuring an Entity Picker
1010

11-
To configure an entity picker you need to create a Data Type in the Umbraco backoffice. From the property editor dropdown choose 'Umbraco UI Builder Entity Picker'.
11+
To configure an entity picker, follow these steps:
1212

13-
![Data Type config](../images/entity_picker_config.png)
13+
1. Go to the **Settings** section in the Umbraco backoffice.
14+
2. Create a **New Data Type**.
15+
3. Select **UI Builder Entity Picker** from the **Property Editor** field.
1416

15-
From there choose 'Section' and 'Collection' you wish to pick entities from. You can also choose an optional list view 'Data View' if there are any configured.
17+
![Data Type config](../images/entity_picker_config.png)
1618

17-
You can also set a minimum and maximum number of items to be able to pick if required.
19+
4. Enter a **Name** for the picker and click **Save**.
20+
5. Select the **Section** the collection is located in.
21+
6. Select the **Collection** to pick the entities from.
22+
7. *[Optional]* Select a list view **Data View**, if configured.
23+
8. Enter a **Minimum number of items** and **Maximum number of items** that can be selected.
24+
9. Click **Save**.
1825

19-
With an entity picker Data Type defined, finish off the configuration by adding it to the desired Document Type definition.
26+
After defining the entity picker Data Type, add it to the desired Document Type.
2027

2128
![Document Type config](../images/entity_picker_setup.png)
2229

23-
## Using an entity picker
30+
## Using an Entity Picker
2431

25-
Using the entity picker should be pretty familiar as it aims to mimic the content picker as closely as possible.
32+
The entity picker functions similarly to the content picker.
2633

27-
To pick an entity click the 'Add' link to launch the picker dialog. The dialog should present a paginated list of entities to pick from. If any searchable fields were configured for the entity type, you can perform a search by typing a search term in the search input field.
34+
To pick an entity, follow these steps:
2835

29-
![Entity picker dialog](../images/entity_picker_search.png)
36+
1. Go to the Document Type where the entity picker Data Type is added.
37+
2. Click **Add** to open the picker dialog, displaying a paginated list of entities.
38+
3. *[Optional]* If searchable fields are configured, use the search input field to filter results.
3039

31-
To pick your items click on the entity names and then click 'Select' in the bottom right-hand corner.
40+
![Entity picker dialog](../images/entity_picker_search.png)
3241

33-
The picker should display a summary of the selected entities which can be sorted by dragging the selected entities into the desired order.
42+
4. Click on the entity names.
43+
5. Click **Submit**.
44+
The picker displays a summary of selected entities, which can be reordered by dragging them.
45+
6. Click **Save** or **Save and publish** to save the changes.
3446

3547
![Entity picker values](../images/entity_picker_picked.png)
3648

37-
To save the value either **save** or **save and publish** the current document.
49+
## Retrieving the Value of an Entity Picker
3850

39-
## Getting the value of an entity picker
40-
41-
The entity picker property editor comes with a built-in [value converter](https://docs.umbraco.com/umbraco-cms/extending/property-editors/property-value-converters/). This means that whenever you retrieve the property value from Umbraco it will return the actual selected entities, even converting them to the relevant type.
51+
The entity picker property editor includes a built-in [value converter](https://docs.umbraco.com/umbraco-cms/customizing/property-editors/property-value-converters). Retrieving the property value from Umbraco returns the selected entities, converting them to the relevant type.
4252

4353
````csharp
4454
// Example

15/umbraco-ui-builder/property-editors/overview.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,12 @@
11
---
2-
description: Property Editors available with Umbraco UI Builder, the backoffice UI builder for Umbraco.
2+
description: Available property editors in Umbraco UI Builder for managing data in Umbraco content nodes.
33
---
44

55
# Property Editors
66

7-
As well as the API for managing your custom data source, Umbraco UI Builder also comes with some property editors. Those property editors help you work with your data inside Umbraco content nodes.
7+
Umbraco UI Builder provides property editors for managing data inside Umbraco content nodes.
88

9-
The property editors available are:
9+
The available property editors are:
1010

1111
{% content-ref url="entity-picker.md" %}
1212
[Entity Picker](entity-picker.md)

0 commit comments

Comments
 (0)