-
Notifications
You must be signed in to change notification settings - Fork 815
Entity Actions, v16 & v17 #7681
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
2233d8f to
623bd06
Compare
…and verified code samples. Formatting improvements. Additional clarity around entity action permissions.
623bd06 to
0bb891b
Compare
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.
leekelleher
left a comment
There was a problem hiding this 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
16/umbraco-cms/customizing/extending-overview/extension-types/entity-actions.md
Show resolved
Hide resolved
| | I | Umb.Document.CultureAndHostnames | | ||
| | P | Umb.Document.PublicAccess | | ||
| | K | Umb.Document.Rollback | | ||
| | V | Umb.DocumentRecycleBin.Restore | |
There was a problem hiding this comment.
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 | |
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
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.
sofietoft
left a comment
There was a problem hiding this 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...). |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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). |
16/umbraco-cms/customizing/extending-overview/extension-types/entity-actions.md
Show resolved
Hide resolved
| ```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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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. |
| 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 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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. |
There was a problem hiding this comment.
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.
| 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. |
| | Custom Backoffice letter | Verb | | ||
| |--------------------------|--------------------------------| | ||
| | ⌘ | *Placeholder* | | ||
|
|
There was a problem hiding this comment.
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. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| 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. |
📋 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:
Product & Version (if relevant)
v16, v17
Deadline (if relevant)
N/A
📚 Helpful Resources