Skip to content

Conversation

@bszyman
Copy link
Contributor

@bszyman bszyman commented Dec 1, 2025

📋 Description

Update Entity Actions article to support Umbraco v16, v17. Refreshed and verified code samples. Formatting improvements. Additional clarity around entity action permissions.

📎 Related Issues (if applicable)

#7318

✅ Contributor Checklist

I've followed the Umbraco Documentation Style Guide and can confirm that:

  • Code blocks are correctly formatted.
  • Sentences are short and clear (preferably under 25 words).
  • Passive voice and first-person language (“we”, “I”) are avoided.
  • Relevant pages are linked.
  • All links work and point to the correct resources.
  • Screenshots or diagrams are included if useful.
  • Any code examples or instructions have been tested.
  • Typos, broken links, and broken images are fixed.

Product & Version (if relevant)

v16, v17

Deadline (if relevant)

N/A

📚 Helpful Resources

@bszyman bszyman changed the title Entity Actions, v16 Entity Actions, v16 & v17 Dec 1, 2025
@bszyman bszyman marked this pull request as ready for review December 1, 2025 08:41
…and verified code samples. Formatting improvements. Additional clarity around entity action permissions.
Removed reference to "xgrid" (unsure what that meant here)
I thought it best to flesh out the example
since the current backoffice is now v17.

Removed "Umb.DocumentRecycleBin.Restore" entry, as doesn't exist.
for consistency throughout the article.
as the flow felt confusing to display the default UI
after mentioning it can be replaced.
Remove the `config` part as it does not exist in the codebase.
Copy link
Member

@leekelleher leekelleher left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Reviewed the technical contents. I have made changes to the code snippets, (for consistency and TypeScript support).

@sofietoft I have left a comment about the extra anchor tags.

From a technical perspective, I am happy with these changes.

Thank you @bszyman for the herculean effort you've put into this! 💪 #h5yr

| I | Umb.Document.CultureAndHostnames |
| P | Umb.Document.PublicAccess |
| K | Umb.Document.Rollback |
| V | Umb.DocumentRecycleBin.Restore |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've removed the Umb.DocumentRecycleBin.Restore entry, as it does not exist. The user permission for recycle-bin restore is actually checked against Umb.Document.Move.


| Current Backoffice Letter | Verb |
| ------------------------- | -------------------------------- |
| Current Backoffice letter | Verb |
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I've renamed to "Legacy" (since the "current" backoffice is now v17).

Although I'm unsure if we need this section going forwards. It may be useful for package developers who need to migrate user-permissions from v13 to v17, but for newcomers it is not relevant.


In the following example, the `conditions:alias` property of an `entityAction` extension matches the `alias` property of the `entityUserPermission` extension definition.

Similarly, the `conditions:config:allOf` array must contain the one of the values from the `meta:verbs` array of the `entityUserPermission` extension definition.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The config part is incorrect, I have updated the code example.

Copy link
Contributor

@sofietoft sofietoft left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for the PR @bszyman !

I've reviewed the article, adding a few suggestions here and there.
Let me know if something doesn't make sense.

Also, calling them "fly-out" menus - is that something you have discussed in the community docs team? To my knowledge, we haven't called the menus this before, and I just want to make sure we keep it consistent throughout the repository.

{% endhint %}

Entity Actions is a feature that provides a generic place for secondary or additional functionality for an entity type. An entity type can be a media, document and so on.
Entity Actions is an extension type that provides a fly-out context menu for secondary or additional functionality to an entity (document, media, etc...).
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Entity Actions is an extension type that provides a fly-out context menu for secondary or additional functionality to an entity (document, media, etc...).
Entity Actions is an extension type that provides a fly-out context menu for secondary or additional functionality to an entity (document, media, or the like).

```typescript
interface UmbEntityActionElement {}
```
Umbraco provides a few generic actions that can be used across silos, such as copy, move, trash, etc. Umbraco may include additional generic actions in the future.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Umbraco provides a few generic actions that can be used across silos, such as copy, move, trash, etc. Umbraco may include additional generic actions in the future.
Umbraco provides a few generic actions that can be used across silos, such as copy, move, and trash. Umbraco may include additional generic actions in the future.

Comment on lines +76 to +78
The entity action class will provide one of the following methods:
* `getHref` - returns a URL that will be used for navigation
* `execute` - programs custom imperative behaviors that can work with contexts and service APIs
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
The entity action class will provide one of the following methods:
* `getHref` - returns a URL that will be used for navigation
* `execute` - programs custom imperative behaviors that can work with contexts and service APIs
The Entity Action class will provide one of the following methods:
* `getHref` - returns a URL that will be used for navigation.
* `execute` - programs custom imperative behaviors that can work with contexts and service APIs.

### The `getHref()` Method <a href="#get-href-method" id="get-href-method"></a>

Example of providing a `getHref` method:
Entity action extensions are provided `this.args` by the `UmbEntityActionBase` superclass. The `this.args` contains a property, `unique` that allows developers to identity which element the user selected.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not entirely sure I understand the first sentence here. Is this.args provided by UmbEntityActionBase? If that's the case, it needs to be a little clearer.

Suggested change
Entity action extensions are provided `this.args` by the `UmbEntityActionBase` superclass. The `this.args` contains a property, `unique` that allows developers to identity which element the user selected.
Entity action extensions are provided `this.args` by the `UmbEntityActionBase` superclass. The `this.args` contains a `unique` property that allows developers to identify which element the user selected.

Comment on lines +207 to +210
| Custom Backoffice letter | Verb |
|--------------------------|--------------------------------|
|| *Placeholder* |

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should this table also contain a column for the package name, and perhaps GitHub account name, of the one submitting the letters? 🤔


### Entity User Permissions

Entity user permissions are assigned to a document, media, member, etc., and are registered using the `entityUserPermission` type in the extension's manifest.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
Entity user permissions are assigned to a document, media, member, etc., and are registered using the `entityUserPermission` type in the extension's manifest.
Entity user permissions are assigned to entities like documents, media, and members. They are registered using the `entityUserPermission` type in the extension's manifest.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants