Skip to content
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

Merged
merged 152 commits into from
Feb 20, 2025
Merged

Conversation

madsrasmussen
Copy link
Contributor

@madsrasmussen madsrasmussen commented Feb 17, 2025

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)

Screenshot 2025-02-18 at 10 24 46

Delete Document dialog (same experience for media)

Screenshot 2025-02-18 at 10 25 05

Base automatically changed from v15/feature/$type-data-mapper-extension to v15/dev February 20, 2025 14:48
@nielslyngsoe nielslyngsoe enabled auto-merge (squash) February 20, 2025 14:48
# 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();
Copy link
Member

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. :-)

Copy link
Member

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

Copy link
Member

@nielslyngsoe nielslyngsoe left a comment

Choose a reason for hiding this comment

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

All good.

Do we have a task to correct none-interactive ref elements?
image

@nielslyngsoe nielslyngsoe merged commit 2c20902 into v15/dev Feb 20, 2025
22 of 23 checks passed
@nielslyngsoe nielslyngsoe deleted the v15/feature/delete-referenced-by branch February 20, 2025 15:29
@madsrasmussen
Copy link
Contributor Author

@nielslyngsoe There is a fix for ref elements here: umbraco/Umbraco.UI#1015

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.

4 participants