Document Recycle Bin: Remove non-relevant entity bulk actions (closes #20677)#20685
Merged
AndyButland merged 1 commit intomainfrom Oct 30, 2025
Merged
Conversation
Introduces the UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS to various document-related bulk action manifests, ensuring actions like duplicate, move, publish, unpublish, and trash are only available for entities that are not already in the recycle bin.
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR adds a condition to prevent certain document bulk actions from being available on trashed items by adding the UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS condition to multiple manifest files.
Key changes:
- Adds the "is not trashed" condition to document bulk actions (trash, publish, unpublish, move, duplicate)
- Ensures these actions are only available for non-trashed documents
- Imports the condition constant from the recycle-bin package
Reviewed Changes
Copilot reviewed 6 out of 6 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
src/Umbraco.Web.UI.Client/src/packages/documents/documents/recycle-bin/entity-action/bulk-trash/manifests.ts |
Adds is-not-trashed condition to bulk trash action |
src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/unpublish/entity-bulk-action/manifests.ts |
Adds is-not-trashed condition to unpublish bulk action |
src/Umbraco.Web.UI.Client/src/packages/documents/documents/publishing/publish/entity-bulk-action/manifests.ts |
Adds is-not-trashed condition to publish bulk action |
src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/move-to/manifests.ts |
Adds is-not-trashed condition to move bulk action |
src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/duplicate-to/manifests.ts |
Adds is-not-trashed condition to duplicate bulk action |
src/Umbraco.Web.UI.Client/src/packages/documents/documents/collection/action/manifests.ts |
Adds is-not-trashed condition to collection create action |
Comments suppressed due to low confidence (1)
src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/move-to/manifests.ts:8
- The external import from '@umbraco-cms/backoffice/recycle-bin' is placed before relative imports, violating the project's ESLint import order rule. According to the eslint.config.js, imports should be ordered as: builtin, parent, sibling, index, external. Move this import to after the relative imports, grouped with the other '@umbraco-cms/backoffice' import on line 8.
import { UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS } from '@umbraco-cms/backoffice/recycle-bin';
import { UMB_DOCUMENT_COLLECTION_ALIAS } from '../../collection/constants.js';
import { UMB_DOCUMENT_ENTITY_TYPE } from '../../entity.js';
import { UMB_DOCUMENT_TREE_ALIAS } from '../../tree/manifests.js';
import { UMB_USER_PERMISSION_DOCUMENT_MOVE } from '../../user-permissions/document/constants.js';
import { UMB_BULK_MOVE_DOCUMENT_REPOSITORY_ALIAS } from './repository/constants.js';
import { manifests as repositoryManifests } from './repository/manifests.js';
import { UMB_COLLECTION_ALIAS_CONDITION } from '@umbraco-cms/backoffice/collection';
...Web.UI.Client/src/packages/documents/documents/entity-bulk-actions/duplicate-to/manifests.ts
Show resolved
Hide resolved
AndyButland
approved these changes
Oct 30, 2025
Contributor
AndyButland
left a comment
There was a problem hiding this comment.
Working as expected, I now only see the three relevant entity actions (on the tree, as a workspace action and as a collection item action), e.g.
@madsrasmussen - I've set to auto-merge but there's a Copilot comment for you to consider before it'll go through.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #20677
Introduces the UMB_ENTITY_IS_NOT_TRASHED_CONDITION_ALIAS to various document-related bulk action manifests, ensuring actions like duplicate, move, publish, unpublish, and trash are only available for entities that are not already in the recycle bin.