V16 Ensures backwards compatibility of deprecated UMB_CONTENT_PROPERTY_CONTEXT#19465
Conversation
…OPERTY_TYPE_BASED_PROPERTY_CONTEXT`
There was a problem hiding this comment.
Pull Request Overview
This pull request fixes the resolution issue of the deprecated UMB_CONTENT_PROPERTY_CONTEXT token by updating its references to UMB_PROPERTY_TYPE_BASED_PROPERTY_CONTEXT. The changes include updating context consumption in multiple tree and modal files as well as aligning the exported context token string identifier.
Reviewed Changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
| src/Umbraco.Web.UI.Client/src/packages/media/media/tree/media-tree.context.ts | Updated context consumption to use the new token for media tree. |
| src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts | Updated context consumption to use the new token in the media picker modal. |
| src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/document-tree.context.ts | Updated context consumption to use the new token for document tree. |
| src/Umbraco.Web.UI.Client/src/packages/content/content/components/property-type-based-property/property-type-based-property.context-token.ts | Renamed the string identifier to match the new token name. |
Comments suppressed due to low confidence (4)
src/Umbraco.Web.UI.Client/src/packages/content/content/components/property-type-based-property/property-type-based-property.context-token.ts:13
- The string identifier has been updated to 'UmbPropertyTypeBasedPropertyContext', which should match the new token name consistently; verify that this change does not affect any external references.
'UmbPropertyTypeBasedPropertyContext',
src/Umbraco.Web.UI.Client/src/packages/media/media/tree/media-tree.context.ts:14
- The context token update here aligns with the new API, ensuring backwards compatibility with the updated token. Confirm that all downstream consumers of this context are correctly adjusted.
this.consumeContext(UMB_PROPERTY_TYPE_BASED_PROPERTY_CONTEXT, (context) => {
src/Umbraco.Web.UI.Client/src/packages/media/media/modals/media-picker/media-picker-modal.element.ts:85
- The token has been updated in this modal file to ensure proper context resolution; please verify that its usage is consistent with the media picker functionality.
this.consumeContext(UMB_PROPERTY_TYPE_BASED_PROPERTY_CONTEXT, (context) => {
src/Umbraco.Web.UI.Client/src/packages/documents/documents/tree/document-tree.context.ts:18
- The updated context token here should restore compatibility for document tree contexts; ensure that the change is propagated to all related document handling logic.
this.consumeContext(UMB_PROPERTY_TYPE_BASED_PROPERTY_CONTEXT, (context) => {
Description
Fixes #19449.
Due to a name change in #19375, the
UMB_CONTENT_PROPERTY_CONTEXTtoken no longer resolved.This hot-fix updates the context alias (with
UmbPropertyTypeBasedPropertyContext) so that the context can be resolved.I have also updated the references of deprecated
UMB_CONTENT_PROPERTY_CONTEXTto useUMB_PROPERTY_TYPE_BASED_PROPERTY_CONTEXTinstead.