From 1056772609a9c573b01a51e17accd7d8d39799e2 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 26 Nov 2024 13:29:52 +0100 Subject: [PATCH 1/7] not-yet-exposed --- src/Umbraco.Web.UI.Client/src/assets/lang/da-dk.ts | 12 +++++++----- src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts | 2 ++ src/Umbraco.Web.UI.Client/src/assets/lang/en.ts | 2 ++ 3 files changed, 11 insertions(+), 5 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/da-dk.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/da-dk.ts index 224cf316de03..e05c6d62dedd 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/da-dk.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/da-dk.ts @@ -1284,12 +1284,12 @@ export default { rollbackTo: 'Tilbagerulning til', selectVersion: 'Vælg version', view: 'Vis', - created: 'Created', - currentVersion: 'Current version', + created: 'Oprettet', + currentVersion: 'Nuværende version', pagination: 'Showing version %0% to %1% of %2% versions', - versions: 'Versions', - currentDraftVersion: 'Current draft version', - currentPublishedVersion: 'Current published version', + versions: 'Versioner', + currentDraftVersion: 'Nuværende kladde version', + currentPublishedVersion: 'Nuværende udgivet version', }, scripts: { editscript: 'Rediger script', @@ -2368,6 +2368,8 @@ export default { variantName ? `Opret ${name} for ${variantName}` : `Create ${name}`, insertBlock: 'Indsæt Block', labelInlineMode: 'Indsæt på linje med tekst', + notExposedLabel: 'ikke oprettet', + notExposedDescription: 'Denne Block er endnu ikke oprettet for denne variant', }, contentTemplatesDashboard: { whatHeadline: 'Hvad er Indholdsskabeloner?', diff --git a/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts b/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts index 3cd822caf09d..ca86fd2c12fa 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en-us.ts @@ -2531,6 +2531,8 @@ export default { variantName ? `Create ${name} for ${variantName}` : `Create ${name}`, insertBlock: 'Insert Block', labelInlineMode: 'Display inline with text', + notExposedLabel: 'Draft', + notExposedDescription: 'This Block is not yet created for this variant', }, contentTemplatesDashboard: { whatHeadline: 'What are Document Blueprints?', 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 e5a5eeadc29a..b67170534335 100644 --- a/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts +++ b/src/Umbraco.Web.UI.Client/src/assets/lang/en.ts @@ -2579,6 +2579,8 @@ export default { variantName ? `Create ${name} for ${variantName}` : `Create ${name}`, insertBlock: 'Insert Block', labelInlineMode: 'Display inline with text', + notExposedLabel: 'Draft', + notExposedDescription: 'This Block is not yet created for this variant', }, contentTemplatesDashboard: { whatHeadline: 'What are Document Blueprints?', From f62325ca35e214803a4b2d5f4cf47d7993512458 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 26 Nov 2024 13:30:06 +0100 Subject: [PATCH 2/7] add tag --- .../block-list-entry.element.ts | 2 +- .../inline-list-block.element.ts | 20 +++++++++++++++---- .../ref-list-block/ref-list-block.element.ts | 13 +++++++++++- 3 files changed, 29 insertions(+), 6 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/block-list-entry/block-list-entry.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/block-list-entry/block-list-entry.element.ts index 43b85da13a83..3765bda03430 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/block-list-entry/block-list-entry.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/block-list-entry/block-list-entry.element.ts @@ -345,7 +345,7 @@ export class UmbBlockListEntryElement extends UmbLitElement implements UmbProper look="secondary" color=${this._contentInvalid ? 'danger' : ''} href=${this._workspaceEditContentPath}> - + ${this._contentInvalid ? html`!` : nothing} diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/inline-list-block/inline-list-block.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/inline-list-block/inline-list-block.element.ts index f6749f63d33a..c6dacb068201 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/inline-list-block/inline-list-block.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/inline-list-block/inline-list-block.element.ts @@ -10,7 +10,7 @@ import { type UmbApiConstructorArgumentsMethodType, } from '@umbraco-cms/backoffice/extension-api'; import { umbExtensionsRegistry } from '@umbraco-cms/backoffice/extension-registry'; -import { css, customElement, html, property, state } from '@umbraco-cms/backoffice/external/lit'; +import { css, customElement, html, nothing, property, state } from '@umbraco-cms/backoffice/external/lit'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; import { UmbTextStyles } from '@umbraco-cms/backoffice/style'; @@ -153,7 +153,7 @@ export class UmbInlineListBlockElement extends UmbLitElement { - ${this._isOpen === true ? this.#renderInside() : ''} + ${this._isOpen === true ? this.#renderInside() : nothing} `; } @@ -168,12 +168,17 @@ export class UmbInlineListBlockElement extends UmbLitElement { + ${this.unpublished + ? html`` + : nothing} `; } #renderInside() { if (this._exposed === false) { - return html` + ${this.unpublished + ? html`` + : nothing} `; } @@ -37,6 +42,12 @@ export class UmbRefListBlockElement extends UmbLitElement { uui-ref-node { min-height: var(--uui-size-16); } + uui-tag { + margin-left: 0.5em; + margin-bottom: -0.3em; + margin-top: -0.3em; + vertical-align: text-top; + } :host([unpublished]) umb-icon, :host([unpublished]) umb-ufm-render { opacity: 0.6; From ac4d15d0c2ec173ec845f75b7366af5574aa4e44 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 26 Nov 2024 14:00:36 +0100 Subject: [PATCH 3/7] implement id for expose button --- .../inline-list-block/inline-list-block.element.ts | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/inline-list-block/inline-list-block.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/inline-list-block/inline-list-block.element.ts index c6dacb068201..a435aeb4c076 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/inline-list-block/inline-list-block.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-list/components/inline-list-block/inline-list-block.element.ts @@ -178,7 +178,7 @@ export class UmbInlineListBlockElement extends UmbLitElement { #renderInside() { if (this._exposed === false) { - return html` Date: Tue, 26 Nov 2024 14:00:45 +0100 Subject: [PATCH 4/7] implement tag for grid --- .../block-grid-block-inline.element.ts | 18 +++++++++++++++--- .../block-grid-block.element.ts | 14 +++++++++++++- .../ref-grid-block/ref-grid-block.element.ts | 5 ++--- 3 files changed, 30 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block-inline/block-grid-block-inline.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block-inline/block-grid-block-inline.element.ts index 72a3dd82a5cd..730b29b66e17 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block-inline/block-grid-block-inline.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block-inline/block-grid-block-inline.element.ts @@ -2,7 +2,7 @@ import { UMB_BLOCK_GRID_ENTRY_CONTEXT } from '../../context/block-grid-entry.con import type { UmbBlockGridWorkspaceOriginData } from '../../workspace/block-grid-workspace.modal-token.js'; import { UMB_BLOCK_GRID_ENTRIES_CONTEXT } from '../../context/block-grid-entries.context-token.js'; import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; -import { css, customElement, html, property, state } from '@umbraco-cms/backoffice/external/lit'; +import { css, customElement, html, nothing, property, state } from '@umbraco-cms/backoffice/external/lit'; import type { UmbPropertyTypeModel } from '@umbraco-cms/backoffice/content-type'; import '../block-grid-areas-container/index.js'; import '../ref-grid-block/index.js'; @@ -172,6 +172,11 @@ export class UmbBlockGridBlockInlineElement extends UmbLitElement { + ${this.unpublished + ? html`` + : nothing} `; } @@ -205,7 +210,7 @@ export class UmbBlockGridBlockInlineElement extends UmbLitElement { #exposeButton { width: 100%; - min-height: var(--uui-size-layout-3); + min-height: var(--uui-size-16); } #host { @@ -239,7 +244,7 @@ export class UmbBlockGridBlockInlineElement extends UmbLitElement { border-color: var(--uui-color-disabled-standalone); } - :host([unpublished]) #open-part { + :host([unpublished]) #open-part #content { opacity: 0.6; } @@ -305,6 +310,13 @@ export class UmbBlockGridBlockInlineElement extends UmbLitElement { font-weight: 700; } + uui-tag { + margin-left: 0.5em; + margin-bottom: -0.3em; + margin-top: -0.3em; + vertical-align: text-top; + } + :host(:not([disabled])) #open-part:hover #icon { color: var(--uui-color-interactive-emphasis); } diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block/block-grid-block.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block/block-grid-block.element.ts index 94364384e3cf..1152209f51e9 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block/block-grid-block.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-block/block-grid-block.element.ts @@ -1,5 +1,5 @@ import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element'; -import { css, customElement, html, property } from '@umbraco-cms/backoffice/external/lit'; +import { css, customElement, html, nothing, property } from '@umbraco-cms/backoffice/external/lit'; import type { UmbBlockDataType } from '@umbraco-cms/backoffice/block'; import type { UmbBlockEditorCustomViewConfiguration } from '@umbraco-cms/backoffice/block-custom-view'; @@ -31,6 +31,11 @@ export class UmbBlockGridBlockElement extends UmbLitElement { href=${(this.config?.showContentEdit ? this.config?.editContentPath : undefined) ?? ''}> + ${this.unpublished + ? html`` + : nothing} `; } @@ -43,6 +48,13 @@ export class UmbBlockGridBlockElement extends UmbLitElement { umb-block-grid-areas-container::part(area) { margin: var(--uui-size-2); } + + uui-tag { + margin-left: 0.5em; + margin-bottom: -0.3em; + margin-top: -0.3em; + vertical-align: text-top; + } :host([unpublished]) umb-icon, :host([unpublished]) umb-ufm-render { opacity: 0.6; diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.ts index 2d97c182fc68..ada866ea7f9b 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/ref-grid-block/ref-grid-block.element.ts @@ -32,9 +32,8 @@ export class UmbRefGridBlockElement extends UUIRefNodeElement { #open-part { display: flex; - min-height: var( - --uui-size-layout-2 - ); /* TODO: We should not do this, but it is a quick fix for now to ensure that the top part of a block gets a minimum height. */ + min-height: var(--uui-size-16); + padding: calc(var(--uui-size-2) + 1px); } :host([unpublished]) #open-part { From d5ddce592ceda5082a46715ddf07bb8a6940899e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 26 Nov 2024 14:05:10 +0100 Subject: [PATCH 5/7] style --- .../components/block-grid-entry/block-grid-entry.element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts index 02ed6b730f3b..e9bf5f7f37b4 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-grid/components/block-grid-entry/block-grid-entry.element.ts @@ -511,7 +511,7 @@ export class UmbBlockGridEntryElement extends UmbLitElement implements UmbProper look="secondary" color=${this._contentInvalid ? 'danger' : ''} href=${this._workspaceEditContentPath}> - + ${this._contentInvalid ? html`!` : nothing} From 768b17a4b78288a6484f710d324fa03da3c2674e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 26 Nov 2024 14:05:48 +0100 Subject: [PATCH 6/7] use plus icon in rte blocks --- .../components/block-rte-entry/block-rte-entry.element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.ts index 2f325a36bc0a..111ebfa97e86 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/block-rte-entry/block-rte-entry.element.ts @@ -292,7 +292,7 @@ export class UmbBlockRteEntryElement extends UmbLitElement implements UmbPropert look="secondary" color=${this._contentInvalid ? 'danger' : ''} href=${this._workspaceEditContentPath}> - + ${this._contentInvalid ? html`!` : nothing} From a745fc1d79ed6ccc02b2eeade7ae49f239a0760c Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Tue, 26 Nov 2024 14:10:08 +0100 Subject: [PATCH 7/7] empty commit --- .../block-rte/components/ref-rte-block/ref-rte-block.element.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.ts b/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.ts index cf937888148d..fe7065062bef 100644 --- a/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.ts +++ b/src/Umbraco.Web.UI.Client/src/packages/block/block-rte/components/ref-rte-block/ref-rte-block.element.ts @@ -39,7 +39,7 @@ export class UmbRefRteBlockElement extends UmbLitElement { override render() { return html` - + `; }