From 0de7a1096a05882485981b4d5f5f519559c68ea1 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Fri, 31 Jan 2025 13:09:32 +0100 Subject: [PATCH 1/2] feat: adds `white-space: pre-line` to all notification messages --- .../layouts/default/notification-layout-default.element.ts | 6 ++++-- .../src/packages/core/notification/notification.context.ts | 1 - 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts b/src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts index 85a36bdec01a..84b9bb5c1119 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts @@ -6,7 +6,6 @@ import { ifDefined, nothing, css, - styleMap, } from '@umbraco-cms/backoffice/external/lit'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; import type { UmbNotificationDefaultData, UmbNotificationHandler } from '@umbraco-cms/backoffice/notification'; @@ -24,7 +23,7 @@ export class UmbNotificationLayoutDefaultElement extends LitElement { override render() { return html` -
${this.data.message}
+
${this.data.message}
${this.#renderStructuredList(this.data.structuredList)}
`; @@ -56,6 +55,9 @@ export class UmbNotificationLayoutDefaultElement extends LitElement { static override styles = [ UmbTextStyles, css` + #message { + white-space: pre-line; + } .structured-list ul { margin: 0; } diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts b/src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts index 790da2268daa..5bdbf98670a6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts @@ -12,7 +12,6 @@ export interface UmbNotificationDefaultData { message: string; headline?: string; structuredList?: Record>; - whitespace?: 'normal' | 'pre-line' | 'pre-wrap' | 'nowrap' | 'pre'; } /** From b6b6be20fecf8123057b644db722957de8a2a789 Mon Sep 17 00:00:00 2001 From: Jacob Overgaard <752371+iOvergaard@users.noreply.github.com> Date: Fri, 31 Jan 2025 13:09:38 +0100 Subject: [PATCH 2/2] chore: remove invalid values --- .../core/temporary-file/temporary-file-manager.class.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts b/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts index 52b14b48c341..2af1555268b6 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts @@ -89,10 +89,9 @@ export class UmbTemporaryFileManager< headline: 'Upload', message: ` ${this.#localization.term('media_invalidFileSize')}: ${item.file.name} (${formatBytes(item.file.size)}). - + ${this.#localization.term('media_maxFileSize')} ${formatBytes(maxFileSize)}. `, - whitespace: 'pre-line', }, }); return false;