From 4e2b8b5aba34276feaa6202faee639eaa9af45e6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jesper=20M=C3=B8ller=20Jensen?= <26099018+JesmoDev@users.noreply.github.com> Date: Thu, 22 Dec 2022 13:24:23 +0100 Subject: [PATCH] removed padding from section-dashboards --- .../section-dashboards.element.ts | 23 +++++++++++-------- 1 file changed, 14 insertions(+), 9 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-dashboards/section-dashboards.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-dashboards/section-dashboards.element.ts index e83bdecb99..0b33847d70 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-dashboards/section-dashboards.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/sections/shared/section-dashboards/section-dashboards.element.ts @@ -7,7 +7,12 @@ import { UmbSectionContext } from '../section.context'; import { UmbObserverMixin } from '@umbraco-cms/observable-api'; import { createExtensionElement } from '@umbraco-cms/extensions-api'; import { UmbContextConsumerMixin } from '@umbraco-cms/context-api'; -import type { ManifestDashboard, ManifestDashboardCollection, ManifestSection, ManifestWithMeta } from '@umbraco-cms/models'; +import type { + ManifestDashboard, + ManifestDashboardCollection, + ManifestSection, + ManifestWithMeta, +} from '@umbraco-cms/models'; import { umbExtensionsRegistry } from '@umbraco-cms/extensions-registry'; @customElement('umb-section-dashboards') @@ -28,16 +33,14 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(UmbObse } #scroll-container { - width: calc(-300px + 100vw); - height: calc(100vh - 70px - 60px); // TODO: This is a temporary fix to get scrolling to work - // changed it so the height is correct but the fix is still not ideal. the 70px and 60px are the height of the blue top bar and the dashboard menu. Need a better solution still. + width: 100%; + height: 100%; } #router-slot { width: 100%; height: 100%; box-sizing: border-box; - padding: var(--uui-size-space-5); display: block; } `, @@ -85,7 +88,9 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(UmbObse ?.extensionsOfTypes(['dashboard', 'dashboardCollection']) .pipe( map((extensions) => - extensions.filter((extension) => (extension as ManifestWithMeta).meta.sections.includes(this._currentSectionAlias)) + extensions.filter((extension) => + (extension as ManifestWithMeta).meta.sections.includes(this._currentSectionAlias) + ) ) ), (dashboards) => { @@ -106,14 +111,14 @@ export class UmbSectionDashboardsElement extends UmbContextConsumerMixin(UmbObse if (dashboard.type === 'dashboardCollection') { return import('src/backoffice/dashboards/collection/dashboard-collection.element'); } - return createExtensionElement(dashboard) + return createExtensionElement(dashboard); }, setup: (component: Promise | HTMLElement, info: IRoutingInfo) => { this._currentDashboardPathname = info.match.route.path; // When its using import, we get an element, when using createExtensionElement we get a Promise. (component as any).manifest = dashboard; - if((component as any).then) { - (component as any).then((el: any) => el.manifest = dashboard); + if ((component as any).then) { + (component as any).then((el: any) => (el.manifest = dashboard)); } }, };