Skip to content

Include property aliases in compatible composition check#19277

Merged
nielslyngsoe merged 9 commits intorelease/16.0from
v16/hotfix/include-property-aliases-in-compatible-composition-check
May 14, 2025
Merged

Include property aliases in compatible composition check#19277
nielslyngsoe merged 9 commits intorelease/16.0from
v16/hotfix/include-property-aliases-in-compatible-composition-check

Conversation

@madsrasmussen
Copy link
Member

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.

@madsrasmussen madsrasmussen marked this pull request as ready for review May 9, 2025 11:02
Copilot AI review requested due to automatic review settings May 9, 2025 11:02
Copy link
Contributor

Copilot AI left a 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);

@nielslyngsoe nielslyngsoe enabled auto-merge (squash) May 14, 2025 07:40
@nielslyngsoe nielslyngsoe merged commit d239849 into release/16.0 May 14, 2025
23 checks passed
@nielslyngsoe nielslyngsoe deleted the v16/hotfix/include-property-aliases-in-compatible-composition-check branch May 14, 2025 08:47
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants