-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
Feature: Delete/Trash referenced by #18351
Conversation
…/delete-referenced-by
# Conflicts: # src/Umbraco.Web.UI.Client/src/packages/documents/documents/item/document-item-ref.element.ts
…re/delete-referenced-by
…re/delete-referenced-by
# Conflicts: # src/Umbraco.Web.UI.Client/src/packages/documents/documents/reference/repository/document-reference.server.data.ts # src/Umbraco.Web.UI.Client/src/packages/media/media/item/manifests.ts # src/Umbraco.Web.UI.Client/src/packages/media/media/reference/repository/media-reference.server.data.ts # src/Umbraco.Web.UI.Client/src/packages/relations/relations/types.ts # src/Umbraco.Web.UI.Client/utils/all-umb-consts/index.ts
|
||
async #initData() { | ||
if (!this.data) { | ||
this.#itemRepository?.destroy(); |
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.
Shouldn't we just already destroy the itemRepository if it exists at this point.
Aka. removing the condition around it. :-)
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.
Ah well, I mean move it above the condition
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.
@nielslyngsoe There is a fix for ref elements here: umbraco/Umbraco.UI#1015 |
Build on top of #18318 - Review this first
This PR introduces two new kinds of dialogs 'trashWithRelation' and 'deleteWithRelation'. They are both used for entities that support dependency relations. Compared to regular trash and delete dialog, they require a referenceRepositoryAlias as part of the manifest, which is used to look up items referenced by the item being deleted or any descendants of the item with references.
Below you can see example screenshots of the dialogs.
Trash Document dialog (same experience for media)
Delete Document dialog (same experience for media)