-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Include property aliases in compatible composition check #19277
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Include property aliases in compatible composition check #19277
Conversation
…in-compatible-composition-check
…sition-check' of https://github.com/umbraco/Umbraco-CMS into v16/hotfix/include-property-aliases-in-compatible-composition-check
There was a problem hiding this 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 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
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.