From 58bb318b848458f7b34c48b2ca010b65ddeeffa7 Mon Sep 17 00:00:00 2001 From: leekelleher Date: Tue, 28 May 2024 16:55:23 +0100 Subject: [PATCH] Document Type Workspace, used flexbox for actions so to have more control over the layout/spacing. --- .../content-type-design-editor.element.ts | 97 +++++++++++-------- 1 file changed, 57 insertions(+), 40 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 5046c9228a..8c87055a6d 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 @@ -369,7 +369,7 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements return html` - - Add tab - `; + return html` + + + Add tab + + `; } renderActions() { @@ -399,37 +401,41 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements ? this.localize.term('general_reorderDone') : this.localize.term('general_reorder'); - return html`
- ${this._compositionRepositoryAlias - ? html` - - ${this.localize.term('contentTypeEditor_compositions')} - ` - : ''} - - - ${sortButtonText} - -
`; + return html` +
+ ${this._compositionRepositoryAlias + ? html` + + ${this.localize.term('contentTypeEditor_compositions')} + ` + : ''} + + + ${sortButtonText} + +
+ `; } renderTabsNavigation() { if (!this._tabs || this._tabs.length === 0) return; - return html`
- - ${this.renderRootTab()} - ${repeat( - this._tabs, - (tab) => tab.id, - (tab) => this.renderTab(tab), - )} - -
`; + return html` +
+ + ${this.renderRootTab()} + ${repeat( + this._tabs, + (tab) => tab.id, + (tab) => this.renderTab(tab), + )} + +
+ `; } renderRootTab() { @@ -439,14 +445,16 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements // If we don't have any root groups and we are not in sort mode, then we don't want to render the root tab. return nothing; } - return html` - ${this.localize.term('general_generic')} - `; + return html` + + ${this.localize.term('general_generic')} + + `; } renderTab(tab: UmbPropertyTypeContainerModel) { @@ -563,10 +571,19 @@ export class UmbContentTypeDesignEditorElement extends UmbLitElement implements flex-wrap: nowrap; } - .flex { + #container-list { display: flex; } + #tabs-group { + display: flex; + } + + #actions { + display: flex; + gap: var(--uui-size-space-2); + } + uui-tab-group { flex-wrap: nowrap; }