Skip to content

<umb-content-workspace-property> DX #19399

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

Open
wants to merge 11 commits into
base: release/16.0
Choose a base branch
from

Conversation

madsrasmussen
Copy link
Contributor

@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 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
Contributor

@Copilot 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
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.

2 participants