Skip to content

Commit 2cdcacb

Browse files
authored
V15/feature/notification-whitespace (#18190)
* feat: adds `white-space: pre-line` to all notification messages * chore: remove invalid values
1 parent 3157601 commit 2cdcacb

File tree

3 files changed

+5
-5
lines changed

3 files changed

+5
-5
lines changed

src/Umbraco.Web.UI.Client/src/packages/core/notification/layouts/default/notification-layout-default.element.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,6 @@ import {
66
ifDefined,
77
nothing,
88
css,
9-
styleMap,
109
} from '@umbraco-cms/backoffice/external/lit';
1110
import { UmbTextStyles } from '@umbraco-cms/backoffice/style';
1211
import type { UmbNotificationDefaultData, UmbNotificationHandler } from '@umbraco-cms/backoffice/notification';
@@ -24,7 +23,7 @@ export class UmbNotificationLayoutDefaultElement extends LitElement {
2423
override render() {
2524
return html`
2625
<uui-toast-notification-layout id="layout" headline="${ifDefined(this.data.headline)}" class="uui-text">
27-
<div id="message" style=${styleMap({ whiteSpace: this.data.whitespace })}>${this.data.message}</div>
26+
<div id="message">${this.data.message}</div>
2827
${this.#renderStructuredList(this.data.structuredList)}
2928
</uui-toast-notification-layout>
3029
`;
@@ -56,6 +55,9 @@ export class UmbNotificationLayoutDefaultElement extends LitElement {
5655
static override styles = [
5756
UmbTextStyles,
5857
css`
58+
#message {
59+
white-space: pre-line;
60+
}
5961
.structured-list ul {
6062
margin: 0;
6163
}

src/Umbraco.Web.UI.Client/src/packages/core/notification/notification.context.ts

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,6 @@ export interface UmbNotificationDefaultData {
1212
message: string;
1313
headline?: string;
1414
structuredList?: Record<string, Array<unknown>>;
15-
whitespace?: 'normal' | 'pre-line' | 'pre-wrap' | 'nowrap' | 'pre';
1615
}
1716

1817
/**

src/Umbraco.Web.UI.Client/src/packages/core/temporary-file/temporary-file-manager.class.ts

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,9 @@ export class UmbTemporaryFileManager<
8989
headline: 'Upload',
9090
message: `
9191
${this.#localization.term('media_invalidFileSize')}: ${item.file.name} (${formatBytes(item.file.size)}).
92-
92+
9393
${this.#localization.term('media_maxFileSize')} ${formatBytes(maxFileSize)}.
9494
`,
95-
whitespace: 'pre-line',
9695
},
9796
});
9897
return false;

0 commit comments

Comments
 (0)