From c198ad10a039a59aa67b2b6f9846c19576522ce6 Mon Sep 17 00:00:00 2001 From: Oskar kruger Date: Wed, 17 Sep 2025 14:37:26 +0200 Subject: [PATCH 01/19] added hovering and focus border to RTE --- .../components/input-tiptap/input-tiptap.element.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts index 03ef568b0939..cb38d7bad5d4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts @@ -291,6 +291,7 @@ export class UmbInputTiptapElement extends UmbFormControlMixin .tiptap { @@ -330,11 +335,15 @@ export class UmbInputTiptapElement extends UmbFormControlMixin Date: Wed, 17 Sep 2025 14:44:14 +0200 Subject: [PATCH 02/19] fix main to OG --- .../input-tiptap/input-tiptap.element.ts | 19 ++++++++----------- 1 file changed, 8 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts index cb38d7bad5d4..a4e75194ad1d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts @@ -1,3 +1,4 @@ + import { UmbTiptapRteContext } from '../../contexts/tiptap-rte.context.js'; import type { UmbTiptapExtensionApi } from '../../extensions/types.js'; import type { UmbTiptapStatusbarValue, UmbTiptapToolbarValue } from '../types.js'; @@ -173,7 +174,12 @@ export class UmbInputTiptapElement extends UmbFormControlMixin .tiptap { @@ -335,15 +336,11 @@ export class UmbInputTiptapElement extends UmbFormControlMixin Date: Wed, 17 Sep 2025 14:48:39 +0200 Subject: [PATCH 03/19] fix to main again --- .../components/input-tiptap/input-tiptap.element.ts | 9 +-------- 1 file changed, 1 insertion(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts index a4e75194ad1d..6bf7cef72a7c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts @@ -1,4 +1,3 @@ - import { UmbTiptapRteContext } from '../../contexts/tiptap-rte.context.js'; import type { UmbTiptapExtensionApi } from '../../extensions/types.js'; import type { UmbTiptapStatusbarValue, UmbTiptapToolbarValue } from '../types.js'; @@ -173,13 +172,7 @@ export class UmbInputTiptapElement extends UmbFormControlMixin Date: Wed, 17 Sep 2025 14:49:55 +0200 Subject: [PATCH 04/19] I'm going to cry --- .../tiptap/components/input-tiptap/input-tiptap.element.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts index 6bf7cef72a7c..03ef568b0939 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/tiptap/components/input-tiptap/input-tiptap.element.ts @@ -172,6 +172,7 @@ export class UmbInputTiptapElement extends UmbFormControlMixin Date: Wed, 8 Oct 2025 08:45:18 +0200 Subject: [PATCH 05/19] Missing localiztion feature, maybe UmbLitElement? --- src/Umbraco.Web.UI.Client/src/assets/lang/en.ts | 1 + .../entity-actions-bundle.element.ts | 11 +++++++++-- .../core/entity-action/common/create/create.action.ts | 7 +++++++ .../core/entity-action/entity-action.interface.ts | 2 ++ .../tree-item-base/tree-item-element-base.ts | 2 +- .../documents/entity-actions/create/create.action.ts | 8 ++++++++ 6 files changed, 28 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts index 1c06cc6307cd..047ac1b3f687 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts @@ -23,6 +23,7 @@ export default { copy: 'Duplicate', copyTo: 'Duplicate to', create: 'Create', + createFor: (name) => (name ? `Create for '${name}'` : 'Create'), createblueprint: 'Create Document Blueprint', createGroup: 'Create group', createPackage: 'Create Package', diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index 682ac057f946..a93701011441 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -115,9 +115,11 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { #renderMore() { if (this._numberOfActions === 1) return nothing; + const ariaLabel = this.localize.term('actions_viewActionsFor', [this.label]); + console.log(ariaLabel); return html` - + `; @@ -125,11 +127,16 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { #renderFirstAction() { if (!this._firstActionApi || !this._firstActionManifest) return nothing; + + const ariaLabel = this._firstActionApi.getAriaLabel?.(this.label); + console.log(ariaLabel); + return html` + ${this.localize.string(this._firstActionManifest.meta.label)} `; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts index 6b85c7ec3598..5dee359def4e 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts @@ -15,11 +15,14 @@ import type { ManifestEntityCreateOptionAction, UmbEntityCreateOptionAction, } from '@umbraco-cms/backoffice/entity-create-option-action'; +import type { UmbElement } from '@umbraco-cms/backoffice/element-api'; + export class UmbCreateEntityAction extends UmbEntityActionBase { #hasSingleOption = true; #optionsInit?: Promise; #singleOptionApi?: UmbEntityCreateOptionAction; + localize: any; constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); @@ -69,6 +72,10 @@ export class UmbCreateEntityAction extends UmbEntityActionBase>>, ) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.interface.ts index fa67894c60bd..2c1c6e608fe7 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.interface.ts @@ -17,4 +17,6 @@ export interface UmbEntityAction extends UmbAction} */ execute(): Promise; + + getAriaLabel?(entityName?: string): string | undefined; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts index b325590d1ffa..2bef1e47c3fe 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts @@ -194,7 +194,7 @@ export abstract class UmbTreeItemElementBase< slot="actions" .entityType=${this.#api.entityType} .unique=${this.#api.unique} - .label=${this.localize.term('actions_viewActionsFor', [this._label])}> + .label=${this._label}> `; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts index 9383940f682b..8f49f93805e8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts @@ -4,8 +4,11 @@ import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action' import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; +import type { UmbElement } from '@umbraco-cms/backoffice/element-api'; + export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { + localize: any; constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); } @@ -29,5 +32,10 @@ export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { }, }); } + + getAriaLabel(entityName?: string) { + debugger; + return this.localize.term('actions_createFor', [entityName ?? '']); + } } export default UmbCreateDocumentEntityAction; From 20aaa2bd02b99cb91db5f647e682525bc54b7554 Mon Sep 17 00:00:00 2001 From: OskarKruger Date: Wed, 8 Oct 2025 13:31:46 +0200 Subject: [PATCH 06/19] added localization controller to fetch localized version --- .../core/entity-action/common/create/create.action.ts | 9 ++++----- .../documents/entity-actions/create/create.action.ts | 8 ++++---- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts index 5dee359def4e..94539cb2400b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts @@ -15,15 +15,14 @@ import type { ManifestEntityCreateOptionAction, UmbEntityCreateOptionAction, } from '@umbraco-cms/backoffice/entity-create-option-action'; -import type { UmbElement } from '@umbraco-cms/backoffice/element-api'; - +import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; export class UmbCreateEntityAction extends UmbEntityActionBase { #hasSingleOption = true; #optionsInit?: Promise; #singleOptionApi?: UmbEntityCreateOptionAction; - localize: any; - + #localization = new UmbLocalizationController(this); + constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); @@ -73,7 +72,7 @@ export class UmbCreateEntityAction extends UmbEntityActionBase { - localize: any; + #localization = new UmbLocalizationController(this); constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); } @@ -34,8 +35,7 @@ export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { } getAriaLabel(entityName?: string) { - debugger; - return this.localize.term('actions_createFor', [entityName ?? '']); + return this.#localization.term('actions_createFor', [entityName ?? '']); } } export default UmbCreateDocumentEntityAction; From a5281093dbfc999d306839f2b7b5f8b09fe911cf Mon Sep 17 00:00:00 2001 From: OskarKruger Date: Wed, 8 Oct 2025 14:30:57 +0200 Subject: [PATCH 07/19] localization successful for viewActionsFor and CreateFor --- src/Umbraco.Web.UI.Client/src/assets/lang/de.ts | 2 ++ src/Umbraco.Web.UI.Client/src/assets/lang/en.ts | 3 ++- .../entity-actions-bundle.element.ts | 13 ++++++------- .../entity-action/common/create/create.action.ts | 7 +++++-- .../core/entity-action/entity-action.interface.ts | 4 +++- 5 files changed, 18 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/de.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/de.ts index c449621f6055..7f7bced17546 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/de.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/de.ts @@ -121,6 +121,7 @@ export default { }, buttons: { clearSelection: 'Auswahl aufheben', + createFor: 'Neu erstellen für {0}', select: 'Auswählen', somethingElse: 'Etwas anderes machen', bold: 'Fett', @@ -154,6 +155,7 @@ export default { styleChoose: 'Stil auswählen', styleShow: 'Stil anzeigen', tableInsert: 'Tabelle einfügen', + viewActionsFor: 'Aktion anzeigen für {0}', generateModelsAndClose: 'Erzeuge Daten-Model und schliesse', saveAndGenerateModels: 'Sichern und Daten-Model erzeugen', undo: 'Zurücknehmen', diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts index 047ac1b3f687..8598bf0c72d2 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts @@ -23,7 +23,6 @@ export default { copy: 'Duplicate', copyTo: 'Duplicate to', create: 'Create', - createFor: (name) => (name ? `Create for '${name}'` : 'Create'), createblueprint: 'Create Document Blueprint', createGroup: 'Create group', createPackage: 'Create Package', @@ -136,6 +135,7 @@ export default { clearSelection: 'Clear selection', select: 'Select', choose: 'Choose', + createFor: 'Create for {0}', somethingElse: 'Do something else', bold: 'Bold', deindent: 'Cancel Paragraph Indent', @@ -168,6 +168,7 @@ export default { styleChoose: 'Choose style', styleShow: 'Show styles', tableInsert: 'Insert table', + viewActionsFor: 'View action for {0}', generateModelsAndClose: 'Generate models and close', saveAndGenerateModels: 'Save and generate models', undo: 'Undo', diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index a93701011441..f481724c7cbf 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -115,11 +115,11 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { #renderMore() { if (this._numberOfActions === 1) return nothing; - const ariaLabel = this.localize.term('actions_viewActionsFor', [this.label]); - console.log(ariaLabel); + const actionsAriaLabel = this.localize.term('buttons_viewActionsFor', [this.label]); + console.log(actionsAriaLabel); return html` - + `; @@ -128,11 +128,10 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { #renderFirstAction() { if (!this._firstActionApi || !this._firstActionManifest) return nothing; - const ariaLabel = this._firstActionApi.getAriaLabel?.(this.label); - console.log(ariaLabel); - + const createAriaLabel = this._firstActionApi.getCreateAriaLabel?.(this.label); + console.log(createAriaLabel); return html` diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts index 94539cb2400b..e6b6928f3ede 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts @@ -71,8 +71,11 @@ export class UmbCreateEntityAction extends UmbEntityActionBase extends UmbAction; - getAriaLabel?(entityName?: string): string | undefined; + getCreateAriaLabel?(entityName?: string): string | undefined; + getActionsAriaLabel?(entityName?: string): string | undefined; + } From ec6472840b302731a7c53c54110cf9cda1814758 Mon Sep 17 00:00:00 2001 From: OskarKruger Date: Wed, 8 Oct 2025 14:52:11 +0200 Subject: [PATCH 08/19] clean up button text --- src/Umbraco.Web.UI.Client/src/assets/lang/en.ts | 2 +- .../entity-actions-bundle.element.ts | 8 ++++---- .../documents/entity-actions/create/create.action.ts | 7 +++++-- 3 files changed, 10 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts index 8598bf0c72d2..43a938be8ea2 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts @@ -135,7 +135,7 @@ export default { clearSelection: 'Clear selection', select: 'Select', choose: 'Choose', - createFor: 'Create for {0}', + createFor: 'Create item for {0}', somethingElse: 'Do something else', bold: 'Bold', deindent: 'Cancel Paragraph Indent', diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index f481724c7cbf..b7a5a8542add 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -116,7 +116,6 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { #renderMore() { if (this._numberOfActions === 1) return nothing; const actionsAriaLabel = this.localize.term('buttons_viewActionsFor', [this.label]); - console.log(actionsAriaLabel); return html` @@ -129,20 +128,21 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { if (!this._firstActionApi || !this._firstActionManifest) return nothing; const createAriaLabel = this._firstActionApi.getCreateAriaLabel?.(this.label); - console.log(createAriaLabel); + const actionName = this.localize.string(this._firstActionManifest.meta.label); + return html` - ${this.localize.string(this._firstActionManifest.meta.label)} `; } static override styles = [ css` - uui-scroll-container { + uui-scroll-container {w max-height: 700px; } `, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts index acd8009059d6..43256e0f4dab 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts @@ -34,8 +34,11 @@ export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { }); } - getAriaLabel(entityName?: string) { - return this.#localization.term('actions_createFor', [entityName ?? '']); + getCreateAriaLabel(entityName?: string) { + return this.#localization.term('buttons_createFor', [entityName ?? '']); + } + getActionsAriaLabel(entityName?: string) { + return this.#localization.term('buttons_viewActionsFor', [entityName ?? '']); } } export default UmbCreateDocumentEntityAction; From d2c4cc0c0208ce426454183de117bf5f8ac140a0 Mon Sep 17 00:00:00 2001 From: OskarKruger Date: Thu, 9 Oct 2025 10:30:40 +0200 Subject: [PATCH 09/19] Changed label for content header to display proper name --- .../src/assets/lang/en.ts | 2 +- .../entity-actions-bundle.element.ts | 3 ++- ...idebar-menu-with-entity-actions.element.ts | 24 +++++++++---------- 3 files changed, 15 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts index 43a938be8ea2..d1e16c363a94 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts @@ -168,7 +168,7 @@ export default { styleChoose: 'Choose style', styleShow: 'Show styles', tableInsert: 'Insert table', - viewActionsFor: 'View action for {0}', + viewActionsFor: 'View actions for {0}', generateModelsAndClose: 'Generate models and close', saveAndGenerateModels: 'Save and generate models', undo: 'Undo', diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index b7a5a8542add..7b93bdffbfaf 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -118,7 +118,8 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { const actionsAriaLabel = this.localize.term('buttons_viewActionsFor', [this.label]); return html` - + `; diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/menu/section-sidebar-menu-with-entity-actions/section-sidebar-menu-with-entity-actions.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/menu/section-sidebar-menu-with-entity-actions/section-sidebar-menu-with-entity-actions.element.ts index f7c885fc10e1..e7d8472df7f3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/menu/section-sidebar-menu-with-entity-actions/section-sidebar-menu-with-entity-actions.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/menu/section-sidebar-menu-with-entity-actions/section-sidebar-menu-with-entity-actions.element.ts @@ -21,18 +21,18 @@ export class UmbSectionSidebarMenuWithEntityActionsElement extends UmbSectionSid } override renderHeader() { - return html` - - `; - } + return html` + + `; +} static override styles = [ ...UmbSectionSidebarMenuElement.styles, From 0984b8184708577d4e44c576bbfea0a9451fa3b2 Mon Sep 17 00:00:00 2001 From: OskarKruger Date: Thu, 9 Oct 2025 10:35:38 +0200 Subject: [PATCH 10/19] clean up code --- .../entity-actions-bundle.element.ts | 4 ++-- .../core/entity-action/common/create/create.action.ts | 8 ++++---- ...section-sidebar-menu-with-entity-actions.element.ts | 4 ++-- .../documents/entity-actions/create/create.action.ts | 10 ++++------ 4 files changed, 12 insertions(+), 14 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index 7b93bdffbfaf..88d5adbff66c 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -105,7 +105,7 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { } event.stopPropagation(); - await this._firstActionApi?.execute().catch(() => {}); + await this._firstActionApi?.execute().catch(() => { }); } override render() { @@ -143,7 +143,7 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { static override styles = [ css` - uui-scroll-container {w + uui-scroll-container { max-height: 700px; } `, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts index e6b6928f3ede..81464ef09343 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts @@ -21,8 +21,8 @@ export class UmbCreateEntityAction extends UmbEntityActionBase; #singleOptionApi?: UmbEntityCreateOptionAction; - #localization = new UmbLocalizationController(this); - + #localization = new UmbLocalizationController(this); + constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); @@ -72,10 +72,10 @@ export class UmbCreateEntityAction extends UmbEntityActionBase

${this.localize.string(this.manifest?.meta?.label ?? '')}

`; -} + } static override styles = [ ...UmbSectionSidebarMenuElement.styles, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts index 43256e0f4dab..d046aba77c76 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts @@ -6,10 +6,8 @@ import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; - - export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { - #localization = new UmbLocalizationController(this); + #localization = new UmbLocalizationController(this); constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); } @@ -35,10 +33,10 @@ export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { } getCreateAriaLabel(entityName?: string) { - return this.#localization.term('buttons_createFor', [entityName ?? '']); - } + return this.#localization.term('buttons_createFor', [entityName ?? '']); + } getActionsAriaLabel(entityName?: string) { - return this.#localization.term('buttons_viewActionsFor', [entityName ?? '']); + return this.#localization.term('buttons_viewActionsFor', [entityName ?? '']); } } export default UmbCreateDocumentEntityAction; From 00a5e125a84f5042ee767c2408a849a3b8c9a0d7 Mon Sep 17 00:00:00 2001 From: OskarKruger Date: Thu, 9 Oct 2025 11:26:13 +0200 Subject: [PATCH 11/19] Included button labels for media section --- .../media/media/entity-actions/create/create.action.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts index 3629d1424ba8..ff7b875fa892 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts @@ -4,8 +4,11 @@ import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action' import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; +import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; export class UmbCreateMediaEntityAction extends UmbEntityActionBase { + #localization = new UmbLocalizationController(this); + constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); } @@ -29,6 +32,13 @@ export class UmbCreateMediaEntityAction extends UmbEntityActionBase { }, }); } + getCreateAriaLabel(entityName?: string) { + return this.#localization.term('buttons_createFor', [entityName ?? '']); + } + + getActionsAriaLabel(entityName?: string) { + return this.#localization.term('buttons_viewActionsFor', [entityName ?? '']); + } } export { UmbCreateMediaEntityAction as api }; From ea7b6ceadddeb5f30c84d0ac0d690837059de230 Mon Sep 17 00:00:00 2001 From: OskarKruger Date: Thu, 9 Oct 2025 11:28:41 +0200 Subject: [PATCH 12/19] clean code --- .../media/media/entity-actions/create/create.action.ts | 3 --- 1 file changed, 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts index ff7b875fa892..5291869a57b9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts @@ -8,7 +8,6 @@ import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization- export class UmbCreateMediaEntityAction extends UmbEntityActionBase { #localization = new UmbLocalizationController(this); - constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); } @@ -35,10 +34,8 @@ export class UmbCreateMediaEntityAction extends UmbEntityActionBase { getCreateAriaLabel(entityName?: string) { return this.#localization.term('buttons_createFor', [entityName ?? '']); } - getActionsAriaLabel(entityName?: string) { return this.#localization.term('buttons_viewActionsFor', [entityName ?? '']); } } - export { UmbCreateMediaEntityAction as api }; From 543cbfbaab6942b5cbe69f2b3c7deac79658c362 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 9 Oct 2025 13:49:25 +0100 Subject: [PATCH 13/19] Relocated localization keys, as `actions_viewActionsFor` already existed. Also made into a function, to support a fallback label. --- src/Umbraco.Web.UI.Client/src/assets/lang/de.ts | 4 ++-- src/Umbraco.Web.UI.Client/src/assets/lang/en.ts | 3 +-- .../entity-actions-bundle/entity-actions-bundle.element.ts | 5 +---- 3 files changed, 4 insertions(+), 8 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/de.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/de.ts index 7f7bced17546..b17fffd7bf7d 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/de.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/de.ts @@ -18,6 +18,7 @@ export default { changeDataType: 'Datentyp ändern', copy: 'Kopieren', create: 'Neu', + createFor: (name: string) => (name ? `Neu erstellen für ${name}` : 'Neu'), export: 'Exportieren', createPackage: 'Neues Paket', createGroup: 'Neue Gruppe', @@ -63,6 +64,7 @@ export default { unlock: 'Freigeben', createblueprint: 'Inhaltsvorlage anlegen', resendInvite: 'Einladung erneut versenden', + viewActionsFor: (name: string) => (name ? `Aktionen anzeigen für ${name}` : 'Aktionen anzeigen'), }, actionCategories: { content: 'Inhalt', @@ -121,7 +123,6 @@ export default { }, buttons: { clearSelection: 'Auswahl aufheben', - createFor: 'Neu erstellen für {0}', select: 'Auswählen', somethingElse: 'Etwas anderes machen', bold: 'Fett', @@ -155,7 +156,6 @@ export default { styleChoose: 'Stil auswählen', styleShow: 'Stil anzeigen', tableInsert: 'Tabelle einfügen', - viewActionsFor: 'Aktion anzeigen für {0}', generateModelsAndClose: 'Erzeuge Daten-Model und schliesse', saveAndGenerateModels: 'Sichern und Daten-Model erzeugen', undo: 'Zurücknehmen', diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts index d1e16c363a94..ff7fd5a1ed80 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts @@ -23,6 +23,7 @@ export default { copy: 'Duplicate', copyTo: 'Duplicate to', create: 'Create', + createFor: (name: string) => (name ? `Create item for ${name}` : 'Create'), createblueprint: 'Create Document Blueprint', createGroup: 'Create group', createPackage: 'Create Package', @@ -135,7 +136,6 @@ export default { clearSelection: 'Clear selection', select: 'Select', choose: 'Choose', - createFor: 'Create item for {0}', somethingElse: 'Do something else', bold: 'Bold', deindent: 'Cancel Paragraph Indent', @@ -168,7 +168,6 @@ export default { styleChoose: 'Choose style', styleShow: 'Show styles', tableInsert: 'Insert table', - viewActionsFor: 'View actions for {0}', generateModelsAndClose: 'Generate models and close', saveAndGenerateModels: 'Save and generate models', undo: 'Undo', diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index 88d5adbff66c..412b8c25835d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -115,11 +115,8 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { #renderMore() { if (this._numberOfActions === 1) return nothing; - const actionsAriaLabel = this.localize.term('buttons_viewActionsFor', [this.label]); - return html` - + `; From e760d97b163b8a14f010ed9ef2d76de423053a2d Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 9 Oct 2025 13:52:05 +0100 Subject: [PATCH 14/19] Simplified the "Create for" label/localization Removed the need for a `getCreateAriaLabel()` method. --- .../entity-actions-bundle.element.ts | 21 ++++++++----------- .../common/create/create.action.kind.ts | 2 +- .../common/create/create.action.ts | 8 ------- .../entity-action/entity-action.interface.ts | 4 ---- .../entity-actions/create/create.action.ts | 8 ------- .../entity-actions/create/manifests.ts | 2 +- .../entity-actions/create/create.action.ts | 7 ------- .../media/entity-actions/create/manifests.ts | 2 +- 8 files changed, 12 insertions(+), 42 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index 412b8c25835d..d0dca47e8b74 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -124,18 +124,15 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { #renderFirstAction() { if (!this._firstActionApi || !this._firstActionManifest) return nothing; - - const createAriaLabel = this._firstActionApi.getCreateAriaLabel?.(this.label); - const actionName = this.localize.string(this._firstActionManifest.meta.label); - - return html` - - `; + return html` + + + + `; } static override styles = [ diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.kind.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.kind.ts index a220d955aa3b..be22c22bec03 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.kind.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.kind.ts @@ -15,7 +15,7 @@ export const manifest: UmbExtensionManifestKind = { forEntityTypes: [], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts index 81464ef09343..c9a8b3bc7bf4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts @@ -21,7 +21,6 @@ export class UmbCreateEntityAction extends UmbEntityActionBase; #singleOptionApi?: UmbEntityCreateOptionAction; - #localization = new UmbLocalizationController(this); constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); @@ -71,13 +70,6 @@ export class UmbCreateEntityAction extends UmbEntityActionBase>>, ) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.interface.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.interface.ts index 7dddb2d895d5..fa67894c60bd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.interface.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/entity-action.interface.ts @@ -17,8 +17,4 @@ export interface UmbEntityAction extends UmbAction} */ execute(): Promise; - - getCreateAriaLabel?(entityName?: string): string | undefined; - getActionsAriaLabel?(entityName?: string): string | undefined; - } diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts index d046aba77c76..6529f9e41fd3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts @@ -7,7 +7,6 @@ import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { - #localization = new UmbLocalizationController(this); constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); } @@ -31,12 +30,5 @@ export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { }, }); } - - getCreateAriaLabel(entityName?: string) { - return this.#localization.term('buttons_createFor', [entityName ?? '']); - } - getActionsAriaLabel(entityName?: string) { - return this.#localization.term('buttons_viewActionsFor', [entityName ?? '']); - } } export default UmbCreateDocumentEntityAction; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/manifests.ts index 1cdd48b96d9b..361f62a30a43 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/manifests.ts @@ -13,7 +13,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_DOCUMENT_ROOT_ENTITY_TYPE, UMB_DOCUMENT_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, conditions: [ diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts index 5291869a57b9..46ccd4c41127 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts @@ -7,7 +7,6 @@ import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; export class UmbCreateMediaEntityAction extends UmbEntityActionBase { - #localization = new UmbLocalizationController(this); constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { super(host, args); } @@ -31,11 +30,5 @@ export class UmbCreateMediaEntityAction extends UmbEntityActionBase { }, }); } - getCreateAriaLabel(entityName?: string) { - return this.#localization.term('buttons_createFor', [entityName ?? '']); - } - getActionsAriaLabel(entityName?: string) { - return this.#localization.term('buttons_viewActionsFor', [entityName ?? '']); - } } export { UmbCreateMediaEntityAction as api }; diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/manifests.ts index 7572bca3ebb6..a2261aeb9ac8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/manifests.ts @@ -12,7 +12,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_MEDIA_ROOT_ENTITY_TYPE, UMB_MEDIA_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, conditions: [ From 7bfcfdf62554d0e6bed7cc9b97fdfe59353f7f4f Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 9 Oct 2025 13:53:48 +0100 Subject: [PATCH 15/19] Removed the double-localizations (of `actions_viewActionsFor`) as the "umb-entity-actions-bundle" component handles this now. --- .../picker/clipboard-entry-picker.element.ts | 2 +- ...ntity-actions-table-column-view.element.ts | 2 +- .../menu-item-layout.element.ts | 42 ++++++++++--------- ...idebar-menu-with-entity-actions.element.ts | 21 +++++----- .../tree-item-base/tree-item-element-base.ts | 2 +- 5 files changed, 37 insertions(+), 32 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts b/src/Umbraco.Web.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts index 9f67b19f5cd6..244be5167905 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/clipboard/clipboard-entry/picker/clipboard-entry-picker.element.ts @@ -156,7 +156,7 @@ export class UmbClipboardEntryPickerElement extends UmbLitElement { slot="actions" .entityType=${item.entityType} .unique=${item.unique} - .label=${this.localize.term('actions_viewActionsFor', [item.name])}> + .label=${this.localize.string(item.name)}> `; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.ts index d2ca007786c1..925ccd4ca98d 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/global-components/entity-actions-table-column-view/entity-actions-table-column-view.element.ts @@ -14,7 +14,7 @@ export class UmbEntityActionsTableColumnViewElement extends UmbLitElement { + .label=${this.localize.string((this.value as any).name)}> `; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/menu/components/menu-item-layout/menu-item-layout.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/menu/components/menu-item-layout/menu-item-layout.element.ts index fdc2c07b7abf..b957066e6fde 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/menu/components/menu-item-layout/menu-item-layout.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/menu/components/menu-item-layout/menu-item-layout.element.ts @@ -1,4 +1,4 @@ -import { html, customElement, property, ifDefined, state } from '@umbraco-cms/backoffice/external/lit'; +import { customElement, html, ifDefined, property, state, when } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { ensureSlash } from '@umbraco-cms/backoffice/router'; import { debounce } from '@umbraco-cms/backoffice/utils'; @@ -72,24 +72,28 @@ export class UmbMenuItemLayoutElement extends UmbLitElement { } override render() { - return html` - - ${this.entityType - ? html` - ` - : ''} - - `; + return html` + + + ${when( + this.entityType, + () => html` + + `, + )} + + + `; } override disconnectedCallback() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/menu/section-sidebar-menu-with-entity-actions/section-sidebar-menu-with-entity-actions.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/menu/section-sidebar-menu-with-entity-actions/section-sidebar-menu-with-entity-actions.element.ts index 4b4d2c6ea968..4dbcb61fb151 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/menu/section-sidebar-menu-with-entity-actions/section-sidebar-menu-with-entity-actions.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/menu/section-sidebar-menu-with-entity-actions/section-sidebar-menu-with-entity-actions.element.ts @@ -21,17 +21,18 @@ export class UmbSectionSidebarMenuWithEntityActionsElement extends UmbSectionSid } override renderHeader() { + const label = this.localize.string(this.manifest?.meta?.label ?? ''); return html` - - `; + + `; } static override styles = [ diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts index 2bef1e47c3fe..69f63472422b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts @@ -137,7 +137,7 @@ export abstract class UmbTreeItemElementBase< .hasChildren=${this._hasChildren} .showChildren=${this._isOpen} .caretLabel=${this.localize.term('visuallyHiddenTexts_expandChildItems') + ' ' + this._label} - label=${this._label} + label=${this._label ?? ''} href="${ifDefined(this._isSelectableContext ? undefined : this._href)}"> ${this.renderIconContainer()} ${this.renderLabel()} ${this.#renderActions()} ${this.#renderChildItems()} From df4ffe5d646a570085f49b7748c8a7b424ba9c04 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 9 Oct 2025 13:54:08 +0100 Subject: [PATCH 16/19] imports tidy-up --- .../entity-actions-bundle.element.ts | 12 ++++++------ .../entity-action/common/create/create.action.ts | 11 +++-------- .../documents/entity-actions/create/create.action.ts | 5 ++--- .../media/entity-actions/create/create.action.ts | 5 ++--- 4 files changed, 13 insertions(+), 20 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts index d0dca47e8b74..3e2dd4903706 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/components/entity-actions-bundle/entity-actions-bundle.element.ts @@ -1,10 +1,10 @@ import { UmbEntityContext } from '../../entity/entity.context.js'; -import type { UmbEntityAction, ManifestEntityActionDefaultKind } from '@umbraco-cms/backoffice/entity-action'; -import type { PropertyValueMap } from '@umbraco-cms/backoffice/external/lit'; -import { html, nothing, customElement, property, state, ifDefined, css } from '@umbraco-cms/backoffice/external/lit'; -import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; +import { css, customElement, html, ifDefined, nothing, property, state } from '@umbraco-cms/backoffice/external/lit'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; import { UmbExtensionsManifestInitializer, createExtensionApi } from '@umbraco-cms/backoffice/extension-api'; +import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; +import type { PropertyValueMap } from '@umbraco-cms/backoffice/external/lit'; +import type { UmbEntityAction, ManifestEntityActionDefaultKind } from '@umbraco-cms/backoffice/entity-action'; @customElement('umb-entity-actions-bundle') export class UmbEntityActionsBundleElement extends UmbLitElement { @@ -105,12 +105,12 @@ export class UmbEntityActionsBundleElement extends UmbLitElement { } event.stopPropagation(); - await this._firstActionApi?.execute().catch(() => { }); + await this._firstActionApi?.execute().catch(() => {}); } override render() { if (this._numberOfActions === 0) return nothing; - return html`${this.#renderMore()} ${this.#renderFirstAction()} `; + return html`${this.#renderMore()}${this.#renderFirstAction()}`; } #renderMore() { diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts index c9a8b3bc7bf4..322a5ceef06b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/entity-action/common/create/create.action.ts @@ -2,20 +2,15 @@ import { UmbEntityActionBase } from '../../entity-action-base.js'; import type { UmbEntityActionArgs } from '../../types.js'; import type { MetaEntityActionCreateKind } from './types.js'; import { UMB_ENTITY_CREATE_OPTION_ACTION_LIST_MODAL } from './modal/constants.js'; +import { createExtensionApi, UmbExtensionsManifestInitializer } from '@umbraco-cms/backoffice/extension-api'; import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; -import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; -import { - type UmbExtensionManifestInitializer, - createExtensionApi, - UmbExtensionsManifestInitializer, - type PermittedControllerType, -} from '@umbraco-cms/backoffice/extension-api'; import type { ManifestEntityCreateOptionAction, UmbEntityCreateOptionAction, } from '@umbraco-cms/backoffice/entity-create-option-action'; -import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; +import type { PermittedControllerType, UmbExtensionManifestInitializer } from '@umbraco-cms/backoffice/extension-api'; +import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; export class UmbCreateEntityAction extends UmbEntityActionBase { #hasSingleOption = true; diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts index 6529f9e41fd3..9f6f4898cad8 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/entity-actions/create/create.action.ts @@ -1,10 +1,9 @@ import { UmbDocumentItemRepository } from '../../item/index.js'; import { UMB_DOCUMENT_CREATE_OPTIONS_MODAL } from './document-create-options-modal.token.js'; -import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action'; +import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; -import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; +import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action'; export class UmbCreateDocumentEntityAction extends UmbEntityActionBase { constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { diff --git a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts index 46ccd4c41127..b8b65c17ff6a 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/media/media/entity-actions/create/create.action.ts @@ -1,10 +1,9 @@ import { UmbMediaItemRepository } from '../../repository/index.js'; import { UMB_MEDIA_CREATE_OPTIONS_MODAL } from './media-create-options-modal.token.js'; -import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action'; +import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; import { UmbEntityActionBase } from '@umbraco-cms/backoffice/entity-action'; import type { UmbControllerHost } from '@umbraco-cms/backoffice/controller-api'; -import { umbOpenModal } from '@umbraco-cms/backoffice/modal'; -import { UmbLocalizationController } from '@umbraco-cms/backoffice/localization-api'; +import type { UmbEntityActionArgs } from '@umbraco-cms/backoffice/entity-action'; export class UmbCreateMediaEntityAction extends UmbEntityActionBase { constructor(host: UmbControllerHost, args: UmbEntityActionArgs) { From b5a8410372086528cc4ca67ac4a6339376245dac Mon Sep 17 00:00:00 2001 From: leekelleher Date: Thu, 9 Oct 2025 14:19:37 +0100 Subject: [PATCH 17/19] Simplified localization key condition --- .../tree-item/tree-item-base/tree-item-element-base.ts | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts b/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts index e8a200ff09ee..2932c22a3c97 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/tree/tree-item/tree-item-base/tree-item-element-base.ts @@ -138,6 +138,9 @@ export abstract class UmbTreeItemElementBase< // Note: Currently we want to prevent opening when the item is in a selectable context, but this might change in the future. // If we like to be able to open items in selectable context, then we might want to make it as a menu item action, so you have to click ... and chose an action called 'Edit' override render() { + const caretLabelKey = this._isOpen + ? 'visuallyHiddenTexts_collapseChildItems' + : 'visuallyHiddenTexts_expandChildItems'; return html` + href=${ifDefined(this._isSelectableContext ? undefined : this._href)}> ${this.renderIconContainer()} ${this.renderLabel()} ${this.#renderActions()} ${this.#renderChildItems()} ${this.#renderPaging()} From 74925b5521f0bad3f9b77b06ba22578d0864e94e Mon Sep 17 00:00:00 2001 From: OskarKruger Date: Fri, 10 Oct 2025 14:12:39 +0200 Subject: [PATCH 18/19] switched to new localization key for other sections for new labeling --- .../src/packages/core/collection/action/create/manifests.ts | 2 +- .../src/packages/dictionary/entity-action/manifests.ts | 2 +- .../document-blueprints/entity-actions/create/manifests.ts | 2 +- .../documents/document-types/entity-actions/create/manifests.ts | 2 +- .../documents/documents/user-permissions/document/manifests.ts | 2 +- .../src/packages/language/entity-actions/manifests.ts | 2 +- .../packages/members/member-group/entity-actions/manifests.ts | 2 +- .../packages/members/member/entity-actions/create/manifests.ts | 2 +- .../templating/partial-views/entity-actions/create/manifests.ts | 2 +- .../templating/scripts/entity-actions/create/manifests.ts | 2 +- .../packages/templating/templates/entity-actions/manifests.ts | 2 +- 11 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/collection/action/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/core/collection/action/create/manifests.ts index 429fb41b26b9..c12d8a346313 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/collection/action/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/collection/action/create/manifests.ts @@ -12,7 +12,7 @@ export const manifests: Array = element: () => import('./collection-create-action.element.js'), weight: 1200, meta: { - label: '#actions_create', + label: '#actions_createFor', }, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/manifests.ts index 66c2670c34f8..b267083ba959 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/dictionary/entity-action/manifests.ts @@ -13,7 +13,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_DICTIONARY_ENTITY_TYPE, UMB_DICTIONARY_ROOT_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#general_create', + label: '#actions_createFor', additionalOptions: true, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/manifests.ts index b945f804e0ab..03f28adc56b3 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-blueprints/entity-actions/create/manifests.ts @@ -11,7 +11,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_DOCUMENT_BLUEPRINT_ROOT_ENTITY_TYPE, UMB_DOCUMENT_BLUEPRINT_FOLDER_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/manifests.ts index f0a18c7cb745..d80976449b20 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/document-types/entity-actions/create/manifests.ts @@ -17,7 +17,7 @@ export const manifests: Array = ], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, headline: '#create_createUnder #treeHeaders_documentTypes', }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document/manifests.ts index 03bebae42416..f8aec35d4bfd 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/documents/documents/user-permissions/document/manifests.ts @@ -65,7 +65,7 @@ const permissions: Array = [ forEntityTypes: [UMB_DOCUMENT_ENTITY_TYPE], meta: { verbs: ['Umb.Document.Create'], - label: '#actions_create', + label: '#actions_createFor', description: '#actionDescriptions_create', }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/language/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/language/entity-actions/manifests.ts index f917dc1d27f2..0e7d7d346627 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/language/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/language/entity-actions/manifests.ts @@ -23,7 +23,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_LANGUAGE_ROOT_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member-group/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member-group/entity-actions/manifests.ts index e450465c720a..e00131cd07df 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member-group/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member-group/entity-actions/manifests.ts @@ -12,7 +12,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_MEMBER_GROUP_ROOT_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/members/member/entity-actions/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/members/member/entity-actions/create/manifests.ts index 9216d08ffc3a..a382103aa3da 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/members/member/entity-actions/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/members/member/entity-actions/create/manifests.ts @@ -11,7 +11,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_MEMBER_ROOT_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/manifests.ts index 6ba2c40dc8c8..242d9100a719 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/partial-views/entity-actions/create/manifests.ts @@ -11,7 +11,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_PARTIAL_VIEW_ROOT_ENTITY_TYPE, UMB_PARTIAL_VIEW_FOLDER_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/create/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/create/manifests.ts index 68cb772ad2b0..3c94201b59ed 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/create/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/scripts/entity-actions/create/manifests.ts @@ -11,7 +11,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_SCRIPT_ROOT_ENTITY_TYPE, UMB_SCRIPT_FOLDER_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, }, diff --git a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/entity-actions/manifests.ts b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/entity-actions/manifests.ts index 1ee92fff8159..4485d593ffeb 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/templating/templates/entity-actions/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/templating/templates/entity-actions/manifests.ts @@ -13,7 +13,7 @@ export const manifests: Array = [ forEntityTypes: [UMB_TEMPLATE_ENTITY_TYPE, UMB_TEMPLATE_ROOT_ENTITY_TYPE], meta: { icon: 'icon-add', - label: '#actions_create', + label: '#actions_createFor', additionalOptions: true, }, }, From e0b5e4bdedbbf50e6d7e3689021cfa7b7ef032b2 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Mon, 13 Oct 2025 10:52:19 +0100 Subject: [PATCH 19/19] Bumped `@umbraco/playwright-testhelpers` 16.0.55 https://github.com/umbraco/Umbraco.Playwright.Testhelpers/releases/tag/release%2F16.0.55 --- tests/Umbraco.Tests.AcceptanceTest/package-lock.json | 8 ++++---- tests/Umbraco.Tests.AcceptanceTest/package.json | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json index b1e7b97b7a08..6a65872266d9 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package-lock.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package-lock.json @@ -8,7 +8,7 @@ "hasInstallScript": true, "dependencies": { "@umbraco/json-models-builders": "^2.0.40", - "@umbraco/playwright-testhelpers": "^16.0.50", + "@umbraco/playwright-testhelpers": "^16.0.55", "camelize": "^1.0.0", "dotenv": "^16.3.1", "node-fetch": "^2.6.7" @@ -67,9 +67,9 @@ } }, "node_modules/@umbraco/playwright-testhelpers": { - "version": "16.0.50", - "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-16.0.50.tgz", - "integrity": "sha512-2tHQUdv8lCV4O47hGMvyC+JJfG4//fSSE/gUOVfFNDEHzhU5mSZ8f9oGKob8XOv2RB7ynZFYtIIxEMZIWrGFDA==", + "version": "16.0.55", + "resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-16.0.55.tgz", + "integrity": "sha512-715l112FHB7snWq0sY7e0fUD2ppWSSysBKHFhcQkGGw+3Gbo68Z6iXfeAketzKohWji19un4KC3mvZU0IICr9g==", "license": "MIT", "dependencies": { "@umbraco/json-models-builders": "2.0.40", diff --git a/tests/Umbraco.Tests.AcceptanceTest/package.json b/tests/Umbraco.Tests.AcceptanceTest/package.json index 6deebfb3fdcb..adf43dd3260b 100644 --- a/tests/Umbraco.Tests.AcceptanceTest/package.json +++ b/tests/Umbraco.Tests.AcceptanceTest/package.json @@ -22,7 +22,7 @@ }, "dependencies": { "@umbraco/json-models-builders": "^2.0.40", - "@umbraco/playwright-testhelpers": "^16.0.50", + "@umbraco/playwright-testhelpers": "^16.0.55", "camelize": "^1.0.0", "dotenv": "^16.3.1", "node-fetch": "^2.6.7"