Include property aliases in compatible composition check#19277
Merged
nielslyngsoe merged 9 commits intorelease/16.0from May 14, 2025
Merged
Conversation
…in-compatible-composition-check
…sition-check' of https://github.com/umbraco/Umbraco-CMS into v16/hotfix/include-property-aliases-in-compatible-composition-check
Contributor
There was a problem hiding this comment.
Pull Request Overview
This PR addresses the compatibility check in content type composition by replacing a hardcoded property alias array with a dynamic lookup.
- Replaces hardcoded property aliases with dynamically fetched ones.
- Updates the composition picker modal to account for compositions used in both inheritance and composition.
- Adds a new method to retrieve property aliases in the content type structure manager.
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/content/content-type/workspace/views/design/content-type-design-editor.element.ts | Updates composition selection and includes dynamically retrieved property aliases. |
| src/Umbraco.Web.UI.Client/src/packages/content/content-type/structure/content-type-structure-manager.class.ts | Adds a new method to fetch all property aliases for content types. |
| src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/composition-picker-modal.token.ts | Extends the modal token interface to include a composition usage array. |
| src/Umbraco.Web.UI.Client/src/packages/content/content-type/modals/composition-picker/composition-picker-modal.element.ts | Adds a new state property and adjusts the disabled condition for compositions in the modal. |
Comments suppressed due to low confidence (1)
src/Umbraco.Web.UI.Client/src/packages/content/content-type/workspace/views/design/content-type-design-editor.element.ts:393
- [nitpick] The variable name 'currentOwnerCompositionCompositionUniques' is overly verbose and contains redundant wording. Consider renaming it to 'currentOwnerCompositionUniques' for clarity.
const currentOwnerCompositionCompositionUniques = currentOwnerCompositionCompositions.map((composition) => composition.contentType.unique);
…in-compatible-composition-check
nielslyngsoe
approved these changes
May 14, 2025
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.
This PR resolves the compatibility check when composing content types. Currently, we passed a hardcoded array for the property aliases; this PR corrects it so we send the actual property aliases.