V16: introduce <umb-content-workspace-property> to spin up new properties in content workspace#19399
Merged
nielslyngsoe merged 12 commits intorelease/16.0from May 26, 2025
Merged
Conversation
Contributor
There was a problem hiding this comment.
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
propertychanges instead oftype - 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
_visiblePropertiesstate is no longer used after removing manual guard filtering. You can remove this unused property to clean up dead code.
@state()
_visibleProperties?: Array<UmbPropertyTypeModel>;
....Client/src/packages/content/content/global-components/content-workspace-property.element.ts
Outdated
Show resolved
Hide resolved
…components/content-workspace-property.element.ts Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
… into v16/hotfix/content-property-dx
nielslyngsoe
approved these changes
May 24, 2025
# Conflicts: # src/Umbraco.Web.UI.Client/src/packages/content/content/workspace/views/edit/content-editor-property.element.ts
<umb-content-workspace-property> to spin up new properties in content workspace
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.
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:
This removes
umb-content-workspace-view-edit-propertywhich can safely be removed as it was not exported and was new for v.16