Skip to content

Conversation

@madsrasmussen
Copy link
Contributor

Fixes: #20520

We no longer set a name in the Document Model because we need to retrieve the name from a specific variant. This caused the name to disappear in the generic "Restore from Recycle Bin"-modal.

This PR adds the option to pass an ItemDataResolver, which determines the correct variant name, to the generic modal.

Copilot AI review requested due to automatic review settings October 21, 2025 18:16
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull Request Overview

This PR fixes a bug where document names disappeared in the "Restore from Recycle Bin" modal. The root cause was that document names are now variant-specific and no longer stored directly in the Document Model. The fix introduces an optional ItemDataResolver mechanism to the generic restore modal, allowing it to retrieve the correct variant name for documents.

Key Changes:

  • Added optional itemDataResolver parameter to the restore-from-recycle-bin infrastructure
  • Refactored modal to use separate state properties for item names resolved through the data resolver
  • Configured document recycle bin to use UmbDocumentItemDataResolver for proper variant name resolution

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
manifests.ts Configures document recycle bin to use UmbDocumentItemDataResolver
types.ts Adds optional itemDataResolver property to restore action metadata
restore-from-recycle-bin.action.ts Passes itemDataResolver to the restore modal
restore-from-recycle-bin-modal.token.ts Adds itemDataResolver to modal data interface
restore-from-recycle-bin-modal.element.ts Implements name resolution using the data resolver and refactors state management

Copy link
Contributor

@AndyButland AndyButland left a comment

Choose a reason for hiding this comment

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

Works just fine - have checked restoring to a folder and to root, for content and media.

@AndyButland AndyButland merged commit 6effe32 into release/17.0 Oct 21, 2025
24 checks passed
@AndyButland AndyButland deleted the v17/hotfix/restore-from-recycle-bin-item-name branch October 21, 2025 18:46
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