From c71c6c1a5bb50833037446b18badf5da2c7abdf3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 30 Apr 2024 22:24:03 +0200 Subject: [PATCH 1/8] delete group + inheritance display + links --- ...t-type-container-structure-helper.class.ts | 5 ++ .../content-type-structure-manager.class.ts | 6 ++ ...ontent-type-design-editor-group.element.ts | 86 +++++++++++++++---- ...t-type-design-editor-properties.element.ts | 20 +---- ...ent-type-design-editor-property.element.ts | 2 +- .../content-type-design-editor-tab.element.ts | 38 +++++--- .../content-type-design-editor.element.ts | 18 ++-- 7 files changed, 118 insertions(+), 57 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-container-structure-helper.class.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-container-structure-helper.class.ts index c3afe98927..2688c49331 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-container-structure-helper.class.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-container-structure-helper.class.ts @@ -240,6 +240,11 @@ export class UmbContentTypeContainerStructureHelper x.id === containerId); } + getContentTypeOfContainer(containerId?: string) { + if (!this.#structure || !containerId) return; + return this.#structure.getContentTypeOfContainer(containerId); + } + containersByNameAndType(name: string, type: UmbPropertyContainerTypes) { return this.#childContainers.asObservablePart((cons) => cons.filter((x) => x.name === name && x.type === type)); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts index 26d96f45a8..e0a0601348 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/structure/content-type-structure-manager.class.ts @@ -704,6 +704,12 @@ export class UmbContentTypeStructureManager< }); } + getContentTypeOfContainer(containerId: string) { + return this.#contentTypes + .getValue() + .find((contentType) => contentType.containers.some((c) => c.id === containerId)); + } + contentTypeOfProperty(propertyId: UmbPropertyTypeId) { return this.#contentTypes.asObservablePart((contentTypes) => contentTypes.find((contentType) => contentType.properties.some((p) => p.id === propertyId)), diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts index 540d32257f..db90c71576 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts @@ -1,6 +1,6 @@ import type { UUIInputEvent } from '@umbraco-cms/backoffice/external/uui'; import { UmbLitElement, umbFocus } from '@umbraco-cms/backoffice/lit-element'; -import { css, html, customElement, property, state, nothing } from '@umbraco-cms/backoffice/external/lit'; +import { css, html, customElement, property, state, nothing, repeat } from '@umbraco-cms/backoffice/external/lit'; import type { UmbContentTypeContainerStructureHelper, UmbContentTypeModel, @@ -8,6 +8,7 @@ import type { } from '@umbraco-cms/backoffice/content-type'; import './content-type-design-editor-properties.element.js'; +import { umbConfirmModal } from '@umbraco-cms/backoffice/modal'; @customElement('umb-content-type-design-editor-group') export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { @@ -37,6 +38,9 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { @property({ type: Boolean, attribute: 'sort-mode-active', reflect: true }) sortModeActive = false; + @property({ attribute: false }) + editContentTypePath?: string; + @state() _groupId?: string; @@ -46,6 +50,9 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { @state() _inherited?: boolean; + @state() + _inheritedFrom?: Array; + #checkInherited() { if (this.groupStructureHelper && this.group) { // Check is this container matches with any other group. If so it is inherited aka. merged with others. [NL] @@ -54,18 +61,22 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { this.observe( this.groupStructureHelper.containersByNameAndType(this.group.name, 'Group'), (containers) => { - const hasAOwnerContainer = containers.some((con) => - this.groupStructureHelper!.isOwnerChildContainer(con.id), - ); + const ownerContainer = containers.find((con) => this.groupStructureHelper!.isOwnerChildContainer(con.id)); + const hasAOwnerContainer = !!ownerContainer; const pureOwnerContainer = hasAOwnerContainer && containers.length === 1; - // TODO: Check if requstUpdate is needed here, I do not think it is when i added it, but I just wanted to be safe when debugging [NL] + // TODO: Check if requestUpdate is needed here, I do not think it is when i added it, but I just wanted to be safe when debugging [NL] const oldHasOwnerContainer = this._hasOwnerContainer; const oldInherited = this._inherited; + const oldInheritedFrom = this._inheritedFrom; this._hasOwnerContainer = hasAOwnerContainer; this._inherited = !pureOwnerContainer; + this._inheritedFrom = containers + .filter((con) => con.id !== this.group!.id) + .map((con) => this.groupStructureHelper!.getContentTypeOfContainer(con.id)); this.requestUpdate('_hasOwnerContainer', oldHasOwnerContainer); this.requestUpdate('_inherited', oldInherited); + this.requestUpdate('_inheritedFrom', oldInheritedFrom); }, 'observeGroupContainers', ); @@ -112,6 +123,27 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { } } + async #requestRemove(e: Event) { + e.preventDefault(); + e.stopImmediatePropagation(); + if (!this.groupStructureHelper || !this._group) return; + + // TODO: Do proper localization here: [NL] + await umbConfirmModal(this, { + headline: `${this.localize.term('actions_delete')} property`, + content: html` + Are you sure you want to delete the group ${this._group.name ?? this._group.id} + + `, + confirmLabel: this.localize.term('actions_delete'), + color: 'danger', + }); + + this.groupStructureHelper.removeContainer(this._group.id); + } + render() { return this._inherited !== undefined && this._groupId ? html` @@ -124,10 +156,9 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { : ''; } + // TODO: impl UMB_EDIT_DOCUMENT_TYPE_PATH_PATTERN #renderContainerHeader() { return html`
-
- + ${this._inherited && this._inheritedFrom + ? html` + + ${this.localize.term('contentTypeEditor_inheritedFrom')} + ${repeat( + this._inheritedFrom, + (inherited) => inherited.unique, + (inherited) => html` + ${inherited.name} + `, + )} + + ` + : null}
- ${this.sortModeActive - ? html` - this._singleValueUpdate('sortOrder', parseInt(e.target.value as string) || 0)} - .value=${this.group!.sortOrder ?? 0} - ?disabled=${!this._hasOwnerContainer}>` - : ''} -
`; +
+ ${this._inherited + ? null + : html` + + `} + ${this.sortModeActive + ? html` + this._singleValueUpdate('sortOrder', parseInt(e.target.value as string) || 0)} + .value=${this.group!.sortOrder ?? 0} + ?disabled=${!this._hasOwnerContainer}>` + : ''} +
`; } static styles = [ diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-properties.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-properties.element.ts index 06e96bfb28..4f433510d9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-properties.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-properties.element.ts @@ -104,6 +104,9 @@ export class UmbContentTypeDesignEditorPropertiesElement extends UmbLitElement { #propertyStructureHelper = new UmbContentTypePropertyStructureHelper(this); + @property({ attribute: false }) + editContentTypePath?: string; + @state() private _propertyStructure: Array = []; @@ -113,9 +116,6 @@ export class UmbContentTypeDesignEditorPropertiesElement extends UmbLitElement { @state() private _modalRouteBuilderNewProperty?: UmbModalRouteBuilder; - @state() - private _editContentTypePath?: string; - @state() private _sortModeActive?: boolean; @@ -142,18 +142,6 @@ export class UmbContentTypeDesignEditorPropertiesElement extends UmbLitElement { this.consumeContext(UMB_CONTENT_TYPE_WORKSPACE_CONTEXT, async (workspaceContext) => { this.#propertyStructureHelper.setStructureManager(workspaceContext.structure); - const entityType = workspaceContext.getEntityType(); - - this.#workspaceModal?.destroy(); - this.#workspaceModal = new UmbModalRouteRegistrationController(this, UMB_WORKSPACE_MODAL) - .addAdditionalPath(entityType) - .onSetup(async () => { - return { data: { entityType: entityType, preset: {} } }; - }) - .observeRouteBuilder((routeBuilder) => { - this._editContentTypePath = routeBuilder({}); - }); - this.observe( workspaceContext.structure.ownerContentType, (contentType) => { @@ -208,7 +196,7 @@ export class UmbContentTypeDesignEditorPropertiesElement extends UmbLitElement { return html` diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts index 4a2a857964..df53221a18 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts @@ -258,6 +258,7 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement { ${this.renderPropertyTags()} @@ -415,7 +416,6 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement { #editor { position: relative; - background-color: var(--uui-color-background); } #alias-input, #label-input, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-tab.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-tab.element.ts index d11766797a..58d32eb3a2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-tab.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-tab.element.ts @@ -12,6 +12,7 @@ import { import './content-type-design-editor-properties.element.js'; import './content-type-design-editor-group.element.js'; import { type UmbSorterConfig, UmbSorterController } from '@umbraco-cms/backoffice/sorter'; +import { UMB_WORKSPACE_MODAL, UmbModalRouteRegistrationController } from '@umbraco-cms/backoffice/modal'; const SORTER_CONFIG: UmbSorterConfig = { getUniqueOfElement: (element) => element.group?.id, @@ -71,16 +72,17 @@ export class UmbContentTypeDesignEditorTabElement extends UmbLitElement { }, }); - private _containerId?: string | null; + #workspaceModal?: UmbModalRouteRegistrationController; + #containerId?: string | null; @property({ type: String }) public get containerId(): string | null | undefined { - return this._containerId; + return this.#containerId; } public set containerId(value: string | null | undefined) { - const oldValue = this._containerId; - if (value === this._containerId) return; - this._containerId = value; + const oldValue = this.#containerId; + if (value === this.#containerId) return; + this.#containerId = value; this.#groupStructureHelper.setContainerId(value); this.requestUpdate('containerId', oldValue); } @@ -94,6 +96,9 @@ export class UmbContentTypeDesignEditorTabElement extends UmbLitElement { @state() _sortModeActive?: boolean; + @state() + _editContentTypePath?: string; + #groupStructureHelper = new UmbContentTypeContainerStructureHelper(this); constructor() { @@ -101,6 +106,18 @@ export class UmbContentTypeDesignEditorTabElement extends UmbLitElement { this.consumeContext(UMB_CONTENT_TYPE_WORKSPACE_CONTEXT, (context) => { this.#groupStructureHelper.setStructureManager(context.structure); + + const entityType = context.getEntityType(); + + this.#workspaceModal?.destroy(); + this.#workspaceModal = new UmbModalRouteRegistrationController(this, UMB_WORKSPACE_MODAL) + .addAdditionalPath(entityType) + .onSetup(async () => { + return { data: { entityType: entityType, preset: {} } }; + }) + .observeRouteBuilder((routeBuilder) => { + this._editContentTypePath = routeBuilder({}); + }); }); this.consumeContext(UMB_CONTENT_TYPE_DESIGN_EDITOR_CONTEXT, (context) => { this.observe( @@ -138,19 +155,11 @@ export class UmbContentTypeDesignEditorTabElement extends UmbLitElement { // Idea, maybe we can gather the sortOrder from the last group rendered and add 1 to it? const len = this._groups.length; const sortOrder = len === 0 ? 0 : this._groups[len - 1].sortOrder + 1; - this.#groupStructureHelper.addContainer(this._containerId, sortOrder); + this.#groupStructureHelper.addContainer(this.#containerId, sortOrder); }; render() { return html` - ${ - this._sortModeActive - ? html`` - : '' - } ${ this._hasProperties ? html` @@ -169,6 +178,7 @@ export class UmbContentTypeDesignEditorTabElement extends UmbLitElement { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts index 0431c3e3c3..720c6c6b34 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts @@ -276,7 +276,6 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements if (tab) { const path = this._routerPath + '/tab/' + encodeFolderName(tab.name && tab.name !== '' ? tab.name : '-'); window.history.replaceState(null, '', path); - console.log('new tab', path); this.#focusInput(); } } @@ -525,14 +524,6 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements static styles = [ UmbTextStyles, css` - #buttons-wrapper { - flex: 1; - display: flex; - align-items: center; - justify-content: space-between; - align-items: stretch; - } - :host { position: relative; display: flex; @@ -541,6 +532,14 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements --uui-tab-background: var(--uui-color-surface); } + #buttons-wrapper { + flex: 1; + display: flex; + align-items: center; + justify-content: space-between; + align-items: stretch; + } + [drag-placeholder] { opacity: 0.5; } @@ -553,6 +552,7 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements #header { width: 100%; + min-height: var(--uui-size-15); display: flex; align-items: center; justify-content: space-between; From e4923c8db0c84b09ae130c1e9918cd9a3d0e7e92 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 30 Apr 2024 22:39:39 +0200 Subject: [PATCH 2/8] polish group inheritance --- .../design/content-type-design-editor-group.element.ts | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts index db90c71576..8cfb8aa1f2 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts @@ -9,6 +9,7 @@ import type { import './content-type-design-editor-properties.element.js'; import { umbConfirmModal } from '@umbraco-cms/backoffice/modal'; +import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; @customElement('umb-content-type-design-editor-group') export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { @@ -72,8 +73,9 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { this._hasOwnerContainer = hasAOwnerContainer; this._inherited = !pureOwnerContainer; this._inheritedFrom = containers - .filter((con) => con.id !== this.group!.id) - .map((con) => this.groupStructureHelper!.getContentTypeOfContainer(con.id)); + .filter((con) => con.id !== ownerContainer?.id) + .map((con) => this.groupStructureHelper!.getContentTypeOfContainer(con.id)) + .filter((contentType) => contentType !== undefined) as Array; this.requestUpdate('_hasOwnerContainer', oldHasOwnerContainer); this.requestUpdate('_inherited', oldInherited); this.requestUpdate('_inheritedFrom', oldInheritedFrom); @@ -202,6 +204,7 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { } static styles = [ + UmbTextStyles, css` :host([drag-placeholder]) { opacity: 0.5; From 8ad2aced4e960badc71e3fce68a26c8d54410d09 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 30 Apr 2024 22:56:15 +0200 Subject: [PATCH 3/8] only show inheritance if pure composition ownership --- .../views/design/content-type-design-editor-group.element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts index 8cfb8aa1f2..9695f79952 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts @@ -169,7 +169,7 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { @change=${this.#renameGroup} @blur=${this.#blurGroup} ${this._group!.name === '' ? umbFocus() : nothing}> - ${this._inherited && this._inheritedFrom + ${this._hasOwnerContainer === false && this._inheritedFrom ? html` Date: Tue, 30 Apr 2024 23:34:45 +0200 Subject: [PATCH 4/8] polishing --- ...ontent-type-design-editor-group.element.ts | 37 ++++++++++------- ...ent-type-design-editor-property.element.ts | 40 +++++++++++-------- 2 files changed, 46 insertions(+), 31 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts index 9695f79952..7a4271bf66 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts @@ -161,14 +161,19 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { // TODO: impl UMB_EDIT_DOCUMENT_TYPE_PATH_PATTERN #renderContainerHeader() { return html`
- +
+ ${this.sortModeActive && this._hasOwnerContainer ? html`` : null} + +
+
+
${this._hasOwnerContainer === false && this._inheritedFrom ? html` @@ -184,13 +189,11 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { ` : null} -
-
- ${this._inherited - ? null - : html` + ${!this._inherited && !this.sortModeActive + ? html` - `} + ` + : nothing} ${this.sortModeActive ? html` ` - : ''} + : nothing}
`; } @@ -231,6 +234,10 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { max-width: 75px; } + .inherited uui-icon { + vertical-align: sub; + } + :host([sort-mode-active]) div[slot='header'] { cursor: grab; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts index df53221a18..be72037e82 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-property.element.ts @@ -65,10 +65,10 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement { @property({ type: Boolean, reflect: true, attribute: 'sort-mode-active' }) public sortModeActive = false; - @property({ type: String, attribute: 'edit-content-type-path' }) + @property({ attribute: false }) public editContentTypePath?: string; - @state() + @property({ type: Boolean, reflect: true, attribute: '_inherited' }) public _inherited?: boolean; @state() @@ -213,15 +213,17 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement {
${this.renderPropertyTags()} - - - ${this.localize.term('contentTypeEditor_inheritedFrom')} - - ${this._inheritedContentTypeName ?? '??'} - - - + ${this._inherited + ? html` + + ${this.localize.term('contentTypeEditor_inheritedFrom')} + + ${this._inheritedContentTypeName ?? '??'} + + + ` + : nothing}
`; } @@ -276,12 +278,13 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement { if (!this.property) return; return html`
- - ${this.property.name} (${this.property.alias}) + + ${this.property.name} + (${this.property.alias})
this.#partialUpdate({ sortOrder: parseInt(e.target.value as string) ?? 0 } as UmbPropertyTypeModel)} @@ -373,18 +376,23 @@ export class UmbContentTypeDesignEditorPropertyElement extends UmbLitElement { margin-bottom: 0; } - :host([sort-mode-active]:not([inherited])) { + :host([sort-mode-active]:not([_inherited])) { cursor: grab; } :host([sort-mode-active]) .sortable { flex: 1; display: flex; - background-color: var(--uui-color-divider); align-items: center; padding: 0 var(--uui-size-3); gap: var(--uui-size-3); } + :host([sort-mode-active][_inherited]) .sortable { + color: var(--uui-color-disabled-contrast); + } + :host([sort-mode-active]:not([_inherited])) .sortable { + background-color: var(--uui-color-divider); + } :host([sort-mode-active]) uui-input { max-width: 75px; From 8945d540730d916519644ec8307d1462490fe326 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 30 Apr 2024 23:46:38 +0200 Subject: [PATCH 5/8] fix delete tab name --- .../views/design/content-type-design-editor.element.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts index 720c6c6b34..2627482872 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts @@ -230,11 +230,13 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements } async #requestDeleteTab(tab: UmbPropertyTypeContainerModel | undefined) { + if (!tab) return; + const tabName = tab.name === '' ? 'Unnamed' : tab.name; // TODO: Localize this: const modalData: UmbConfirmModalData = { headline: 'Delete tab', - content: html` - Are you sure you want to delete the tab ${tab?.name ?? tab?.id} + content: html` + Are you sure you want to delete the tab ${tabName}
From 92f760453f5a15fbbcb414a09842baf946e19833 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 30 Apr 2024 23:47:33 +0200 Subject: [PATCH 6/8] todo --- .../workspace/views/design/content-type-design-editor.element.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts index 2627482872..bd97af52bb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor.element.ts @@ -231,6 +231,7 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements async #requestDeleteTab(tab: UmbPropertyTypeContainerModel | undefined) { if (!tab) return; + // TODO: Localize this: const tabName = tab.name === '' ? 'Unnamed' : tab.name; // TODO: Localize this: const modalData: UmbConfirmModalData = { From 0aef50fd2dd1e0e395a7622b78498ea7f99dfd84 Mon Sep 17 00:00:00 2001 From: Mads Rasmussen Date: Wed, 1 May 2024 13:06:05 +0200 Subject: [PATCH 7/8] change property to group --- .../views/design/content-type-design-editor-group.element.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts index 7a4271bf66..01e3d1cba3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts @@ -132,8 +132,8 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { // TODO: Do proper localization here: [NL] await umbConfirmModal(this, { - headline: `${this.localize.term('actions_delete')} property`, - content: html` Are you sure you want to delete the group ${this._group.name ?? this._group.id} From 0163f247dca0b9c4cd794f77bc9454918ee80d9e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Wed, 1 May 2024 13:22:26 +0200 Subject: [PATCH 8/8] fix property inherited url --- .../views/design/content-type-design-editor-group.element.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts index 01e3d1cba3..e22ef369a4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/content-type/workspace/views/design/content-type-design-editor-group.element.ts @@ -152,6 +152,7 @@ export class UmbContentTypeWorkspaceViewEditGroupElement extends UmbLitElement { ${this.#renderContainerHeader()} `