Skip to content

V16: introduce <umb-content-workspace-property> to spin up new properties in content workspace#19399

Merged
nielslyngsoe merged 12 commits intorelease/16.0from
v16/hotfix/content-property-dx
May 26, 2025
Merged

V16: introduce <umb-content-workspace-property> to spin up new properties in content workspace#19399
nielslyngsoe merged 12 commits intorelease/16.0from
v16/hotfix/content-property-dx

Conversation

@madsrasmussen
Copy link
Copy Markdown
Member

@madsrasmussen madsrasmussen commented May 23, 2025

The PR introduces a new component to make it easier to spin up a new property in a content workspace.

This will render a property with a value that matches the current active culture. I have also moved the enforcement of the view guards rule to the property element. If anyone uses this element as a "standalone" element, the guards/user permissions will still be enforced.

The element will be globally available for other packages to use.

Ex:

<umb-content-workspace-property alias="my-property-alias"></umb-content-workspace-property>

This removes umb-content-workspace-view-edit-property which can safely be removed as it was not exported and was new for v.16

@madsrasmussen madsrasmussen changed the title UmbContentProperty DX <umb-content-property> DX May 23, 2025
@madsrasmussen madsrasmussen marked this pull request as ready for review May 23, 2025 11:56
Copilot AI review requested due to automatic review settings May 23, 2025 11:56
@madsrasmussen madsrasmussen changed the title <umb-content-property> DX <umb-content-workspace-property> DX May 23, 2025
Copy link
Copy Markdown
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 introduces a new globally available <umb-content-workspace-property> component that renders a content property matching the active culture and enforces view guards at the property element level. It also refactors the existing properties list to use this new component and updates exports to expose it.

  • Replaced manual guard/filter logic in the properties list with the new global property element
  • Updated the edit-property element to listen for property changes instead of type
  • Added a new global-components folder and updated exports to include the new element

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/.../content-editor-property.element.ts Changed willUpdate to watch property instead of type
src/.../content-editor-properties.element.ts Removed manual view-guard processing and dataset context; simplified render to use <umb-content-workspace-property>
src/.../content/index.ts Exported the new global-components directory
src/.../global-components/index.ts Added an index to export the new global component
src/.../global-components/content-workspace-property.element.ts Implemented the new <umb-content-workspace-property> element with context consumption, guard checks, and render logic
Comments suppressed due to low confidence (1)

src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-properties.element.ts:28

  • The _visibleProperties state is no longer used after removing manual guard filtering. You can remove this unused property to clean up dead code.
@state()
	_visibleProperties?: Array<UmbPropertyTypeModel>;

@nielslyngsoe nielslyngsoe enabled auto-merge (squash) May 24, 2025 19:43
# Conflicts:
#	src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-property.element.ts
@nielslyngsoe nielslyngsoe merged commit 86bbdfe into release/16.0 May 26, 2025
2 of 4 checks passed
@nielslyngsoe nielslyngsoe deleted the v16/hotfix/content-property-dx branch May 26, 2025 07:11
@iOvergaard iOvergaard changed the title <umb-content-workspace-property> DX V16: introduce <umb-content-workspace-property> to spin up new properties in content workspace May 30, 2025
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.

4 participants