Content Rollback: Add notification message meta property#22631
Merged
Conversation
so that the Rollback modal can return the entity-type, to display the correct notification message.
This comment was marked as resolved.
This comment was marked as resolved.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR updates the content rollback flow so the rollback modal returns entity metadata (unique, entityType) and the rollback entity action can show an entity-specific localized success notification (with a generic fallback), while also making the notification context access non-throwing.
Changes:
- Extend
UmbContentRollbackModalValueto includeunique/entityType(viaUmbEntityModel) and submit those values from the modal. - Update the rollback entity action to localize the success notification based on the returned
entityType, and make notification context usage optional. - Minor formatting cleanup in the entity-action manifest types.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 2 comments.
| File | Description |
|---|---|
src/Umbraco.Web.UI.Client/src/packages/content/content/rollback/modal/types.ts |
Makes the rollback modal’s return value include unique + entityType by extending UmbEntityModel. |
src/Umbraco.Web.UI.Client/src/packages/content/content/rollback/modal/content-rollback-modal.element.ts |
Submits { unique, entityType } on successful rollback instead of an empty object. |
src/Umbraco.Web.UI.Client/src/packages/content/content/rollback/entity-action/types.ts |
Formatting-only change to the rollback entity action manifest interface. |
src/Umbraco.Web.UI.Client/src/packages/content/content/rollback/entity-action/content-rollback.action.ts |
Uses returned entityType to build an entity-specific localization key and peeks a success notification via optional context. |
Merged
4 tasks
AndyButland
approved these changes
Apr 29, 2026
AndyButland
left a comment
Contributor
There was a problem hiding this comment.
Works as expected @leekelleher, and looks good. I've tested out the rollback from both the entity action and the audit log itself. Just a couple of inline comments to consider, then, unless you feel you need a more expert FE review, looks good to merge.
This was referenced Jun 26, 2026
Merged
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.
Description
The Content Rollback entity action kind (introduced in #21939) hard-coded its success notification to use the document-specific localization key
rollback_documentRolledBack. This prevents other content types (e.g. Global Elements in v18) from supplying their own message.Summary
rollbackNotificationMessagemeta property to thecontentRollbackentity action kind. Manifests can supply a localization key (or literal string) to use for the success notification.#rollback_documentRolledBack, preserving the existing message.#rollback_contentRolledBack("Content has been rolled back") localization key.Test plan