From eefae371942c0e5b65d1646a89c5098a3088b70b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Niels=20Lyngs=C3=B8?= Date: Thu, 30 Mar 2023 09:10:46 +0200 Subject: [PATCH] correcting weight on extension slot --- .../src/backoffice/search/manifests.ts | 2 +- .../components/extension-slot/extension-slot.element.ts | 3 ++- .../src/backoffice/users/current-user/manifests.ts | 4 ++-- .../users/current-user/user-profile-apps/manifests.ts | 6 +++--- 4 files changed, 8 insertions(+), 7 deletions(-) diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/search/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/search/manifests.ts index 9f3ad717e4..adc42d3da1 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/search/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/search/manifests.ts @@ -6,7 +6,7 @@ const headerApps: Array = [ alias: 'Umb.HeaderApp.Search', name: 'Header App Search', loader: () => import('./umb-search-header-app.element'), - weight: 10, + weight: 900, meta: { label: 'Search', icon: 'search', diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/extension-slot/extension-slot.element.ts b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/extension-slot/extension-slot.element.ts index 4ef98f15eb..ce6cb057b8 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/extension-slot/extension-slot.element.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/shared/components/extension-slot/extension-slot.element.ts @@ -97,7 +97,8 @@ export class UmbExtensionSlotElement extends UmbLitElement { // sort: // TODO: Make sure its right to have highest last? - this._extensions.sort((a, b) => a.weight - b.weight); + // should not sort here, its done by registry: + //this._extensions.sort((a, b) => a.weight - b.weight); } else { // Remove cause we could not get the component, so we will get rid of this. //this._extensions.splice(this._extensions.indexOf(extensionObject), 1); diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/manifests.ts index e5e1fad76b..2db8a84064 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/manifests.ts @@ -1,6 +1,6 @@ -import type { ManifestTypes } from '@umbraco-cms/backoffice/extensions-registry'; import { manifests as modalManifests } from './modals/manifests'; import { manifests as userProfileAppsManifests } from './user-profile-apps/manifests'; +import type { ManifestTypes } from '@umbraco-cms/backoffice/extensions-registry'; export const headerApps: Array = [ { @@ -8,7 +8,7 @@ export const headerApps: Array = [ alias: 'Umb.HeaderApp.CurrentUser', name: 'Current User', loader: () => import('./current-user-header-app.element'), - weight: 1000, + weight: 0, meta: { label: 'TODO: how should we enable this to not be set.', icon: 'TODO: how should we enable this to not be set.', diff --git a/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/user-profile-apps/manifests.ts b/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/user-profile-apps/manifests.ts index 5b4559b0ed..1a035797ab 100644 --- a/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/user-profile-apps/manifests.ts +++ b/src/Umbraco.Web.UI.Client/src/backoffice/users/current-user/user-profile-apps/manifests.ts @@ -6,7 +6,7 @@ export const userProfileApps: Array = [ alias: 'Umb.UserProfileApp.profile', name: 'Profile User Profile App', loader: () => import('./user-profile-app-profile.element'), - weight: 0, + weight: 900, meta: { label: 'Profile User Profile App', pathname: 'profile', @@ -17,7 +17,7 @@ export const userProfileApps: Array = [ alias: 'Umb.UserProfileApp.ExternalLoginProviders', name: 'External Login Providers User Profile App', loader: () => import('./user-profile-app-external-login-providers.element'), - weight: 100, + weight: 800, meta: { label: 'External Login Providers User Profile App', pathname: 'externalLoginProviders', @@ -39,7 +39,7 @@ export const userProfileApps: Array = [ alias: 'Umb.UserProfileApp.History', name: 'History User Profile App', loader: () => import('./user-profile-app-history.element'), - weight: 300, + weight: 100, meta: { label: 'History User Profile App', pathname: 'history',