Merge branch 'release/16.0' into v16/dev

# Conflicts:
#	tests/Umbraco.Tests.AcceptanceTest/package-lock.json
#	tests/Umbraco.Tests.AcceptanceTest/package.json
This commit is contained in:
Niels Lyngsø
2025-05-01 22:13:01 +02:00
21 changed files with 77 additions and 38 deletions

View File

@@ -7,13 +7,17 @@
<ItemGroup>
<GlobalPackageReference Include="Nerdbank.GitVersioning" Version="3.7.115" />
<GlobalPackageReference Include="StyleCop.Analyzers" Version="1.2.0-beta.556" />
<GlobalPackageReference Include="Umbraco.Code" Version="2.2.0" />
<GlobalPackageReference Include="Umbraco.Code" Version="2.3.0" />
<GlobalPackageReference Include="Umbraco.GitVersioning.Extensions" Version="0.2.0" />
</ItemGroup>
<!-- Microsoft packages -->
<ItemGroup>
<PackageVersion Include="Microsoft.AspNetCore.Mvc.Razor.RuntimeCompilation" Version="9.0.4" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.10.0" /> <!-- TODO: Update the hard-dependency that Umbraco.Code has on 4.10.0 to allow update of this to latest (4.13.0). -->
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp" Version="4.13.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Common" Version="4.13.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.CSharp.Workspaces" Version="4.13.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.Common" Version="4.13.0" />
<PackageVersion Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" Version="4.13.0" />
<PackageVersion Include="Microsoft.Data.Sqlite" Version="9.0.4" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.Sqlite" Version="9.0.4" />
<PackageVersion Include="Microsoft.EntityFrameworkCore.SqlServer" Version="9.0.4" />

View File

@@ -106,6 +106,12 @@ export class UmbInputBlockTypeElement<
presetAlias: 'element',
},
},
// TODO: hide the queryParams and filter config under a "elementTypesOnly" field. [MR]
search: {
queryParams: {
isElementType: true,
},
},
pickableFilter: (docType) =>
// Only pick elements:
docType.isElement &&

View File

@@ -126,15 +126,16 @@ export class UmbContentTypeWorkspaceEditorHeaderElement extends UmbLitElement {
display: flex;
flex: 1 1 auto;
flex-direction: column;
gap: var(--uui-size-space-1);
}
#name {
width: 100%;
z-index: 1;
}
#description {
width: 100%;
margin-top: 1px;
--uui-input-height: var(--uui-size-8);
--uui-input-border-color: transparent;
}
@@ -147,6 +148,8 @@ export class UmbContentTypeWorkspaceEditorHeaderElement extends UmbLitElement {
font-size: var(--uui-size-8);
height: 60px;
width: 60px;
--uui-button-border-color: transparent;
--uui-button-border-color-hover: var(--uui-color-border);
}
`,
];

View File

@@ -101,13 +101,6 @@ export class UmbBodyLayoutElement extends LitElement {
this._headerSlotHasChildren = this.#hasNodes(e);
this.#setSlotVisibility(e.target as HTMLElement, this._headerSlotHasChildren);
}}></slot>
<slot
id="navigation-slot"
name="navigation"
@slotchange=${(e: Event) => {
this._navigationSlotHasChildren = this.#hasNodes(e);
this.#setSlotVisibility(e.target as HTMLElement, this._navigationSlotHasChildren);
}}></slot>
<slot
id="action-menu-slot"
name="action-menu"
@@ -115,6 +108,13 @@ export class UmbBodyLayoutElement extends LitElement {
this._actionsMenuSlotHasChildren = this.#hasNodes(e);
this.#setSlotVisibility(e.target as HTMLElement, this._actionsMenuSlotHasChildren);
}}></slot>
<slot
id="navigation-slot"
name="navigation"
@slotchange=${(e: Event) => {
this._navigationSlotHasChildren = this.#hasNodes(e);
this.#setSlotVisibility(e.target as HTMLElement, this._navigationSlotHasChildren);
}}></slot>
</div>
<!-- This div should be changed for the uui-scroll-container when it gets updated -->
@@ -204,7 +204,6 @@ export class UmbBodyLayoutElement extends LitElement {
box-sizing: border-box;
min-width: 0;
}
#navigation-slot {
margin-left: auto;
}

View File

@@ -1,11 +1,13 @@
import { UMB_PICKER_CONTEXT } from '../picker.context.token.js';
import type { UmbPickerContext } from '../picker.context.js';
import type { ManifestPickerSearchResultItem } from './result-item/picker-search-result-item.extension.js';
import { customElement, html, nothing, repeat, state } from '@umbraco-cms/backoffice/external/lit';
import { customElement, html, nothing, property, repeat, state } from '@umbraco-cms/backoffice/external/lit';
import { UmbLitElement } from '@umbraco-cms/backoffice/lit-element';
import type { UmbSearchRequestArgs } from '@umbraco-cms/backoffice/search';
import type { UmbEntityModel } from '@umbraco-cms/backoffice/entity';
type PickableFilterMethodType<T extends UmbEntityModel = UmbEntityModel> = (item: T) => boolean;
@customElement('umb-picker-search-result')
export class UmbPickerSearchResultElement extends UmbLitElement {
@state()
@@ -20,6 +22,9 @@ export class UmbPickerSearchResultElement extends UmbLitElement {
@state()
_isSearchable: boolean = false;
@property({ attribute: false })
pickableFilter: PickableFilterMethodType = () => true;
#pickerContext?: UmbPickerContext;
constructor() {
@@ -30,10 +35,15 @@ export class UmbPickerSearchResultElement extends UmbLitElement {
this.observe(
this.#pickerContext?.search.searchable,
(isSearchable) => (this._isSearchable = isSearchable ?? false),
'obsSearchable',
);
this.observe(this.#pickerContext?.search.query, (query) => (this._query = query));
this.observe(this.#pickerContext?.search.searching, (query) => (this._searching = query ?? false));
this.observe(this.#pickerContext?.search.resultItems, (items) => (this._items = items ?? []));
this.observe(this.#pickerContext?.search.query, (query) => (this._query = query), 'obsQuery');
this.observe(
this.#pickerContext?.search.searching,
(query) => (this._searching = query ?? false),
'obsSearching',
);
this.observe(this.#pickerContext?.search.resultItems, (items) => (this._items = items ?? []), 'obsResultItems');
});
}
@@ -58,11 +68,15 @@ export class UmbPickerSearchResultElement extends UmbLitElement {
}
#renderResultItem(item: UmbEntityModel) {
console.log('pickableFilter', this.pickableFilter(item));
return html`
<umb-extension-with-api-slot
type="pickerSearchResultItem"
.filter=${(manifest: ManifestPickerSearchResultItem) => manifest.forEntityTypes.includes(item.entityType)}
.elementProps=${{ item }}></umb-extension-with-api-slot>
.elementProps=${{
item,
disabled: !this.pickableFilter(item),
}}></umb-extension-with-api-slot>
`;
}
}

View File

@@ -13,8 +13,9 @@ export class UmbDefaultPickerSearchResultItemElement extends UmbPickerSearchResu
id=${item.unique}
icon=${item.icon ?? 'icon-document'}
select-only
selectable
?selectable=${!this.disabled}
?selected=${this._isSelected}
?disabled=${this.disabled}
@deselected=${() => this.pickerContext?.selection.deselect(item.unique)}
@selected=${() => this.pickerContext?.selection.select(item.unique)}>
</umb-ref-item>

View File

@@ -18,6 +18,9 @@ export abstract class UmbPickerSearchResultItemElementBase<ItemType extends UmbN
return this.#item;
}
@property({ type: Boolean })
disabled?: boolean;
@state()
_isSelected = false;
@@ -49,8 +52,9 @@ export abstract class UmbPickerSearchResultItemElementBase<ItemType extends UmbN
<umb-ref-item
name=${item.name}
select-only
selectable
?selectable=${!this.disabled}
?selected=${this._isSelected}
?disabled=${this.disabled}
@deselected=${() => this.pickerContext?.selection.deselect(item.unique)}
@selected=${() => this.pickerContext?.selection.select(item.unique)}>
</umb-ref-item>

View File

@@ -159,7 +159,7 @@ export class UmbTreePickerModalElement<TreeItemType extends UmbTreeItemModelBase
#renderSearch() {
return html`
<umb-picker-search-field></umb-picker-search-field>
<umb-picker-search-result></umb-picker-search-result>
<umb-picker-search-result .pickableFilter=${this.data?.pickableFilter}></umb-picker-search-result>
`;
}

View File

@@ -90,9 +90,8 @@ export class UmbWorkspaceEditorElement extends UmbLitElement {
<umb-body-layout main-no-padding .headline=${this.headline} ?loading=${this.loading}>
${this.#renderBackButton()}
<slot name="header" slot="header"></slot>
${this.#renderViews()}
<slot name="action-menu" slot="action-menu"></slot>
${this.#renderRoutes()}
${this.#renderViews()} ${this.#renderRoutes()}
<slot></slot>
${when(
!this.enforceNoFooter,

View File

@@ -56,10 +56,10 @@ export class UmbWorkspaceEntityActionMenuElement extends UmbLitElement {
? html`
<uui-button
id="action-button"
data-mark="workspace:action-menu-button"
popovertarget="workspace-entity-action-menu-popover"
label=${this.localize.term('general_actions')}>
${this.localize.term('general_actions')}
<uui-symbol-expand .open=${this._popoverOpen}></uui-symbol-expand>
<uui-symbol-more></uui-symbol-more>
</uui-button>
<uui-popover-container
id="workspace-entity-action-menu-popover"
@@ -84,8 +84,8 @@ export class UmbWorkspaceEntityActionMenuElement extends UmbLitElement {
css`
:host {
height: 100%;
margin-left: calc(var(--uui-size-layout-1) * -1);
}
:host > uui-button {
height: 100%;
}

View File

@@ -13,8 +13,9 @@ export class UmbDocumentTypePickerSearchResultItemElement extends UmbPickerSearc
id=${item.unique}
icon=${item.icon ?? 'icon-document'}
select-only
selectable
?selectable=${!this.disabled}
?selected=${this._isSelected}
?disabled=${this.disabled}
@deselected=${() => this.pickerContext?.selection.deselect(item.unique)}
@selected=${() => this.pickerContext?.selection.select(item.unique)}>
${when(

View File

@@ -13,8 +13,9 @@ export class UmbDocumentPickerSearchResultItemElement extends UmbPickerSearchRes
id=${item.unique}
icon=${item.documentType.icon ?? 'icon-document'}
select-only
selectable
?selectable=${!this.disabled}
?selected=${this._isSelected}
?disabled=${this.disabled}
@deselected=${() => this.pickerContext?.selection.deselect(item.unique)}
@selected=${() => this.pickerContext?.selection.select(item.unique)}>
</umb-ref-item>

View File

@@ -13,8 +13,9 @@ export class UmbMemberPickerSearchResultItemElement extends UmbPickerSearchResul
id=${item.unique}
icon=${item.memberType.icon ?? 'icon-user'}
select-only
selectable
?selectable=${!this.disabled}
?selected=${this._isSelected}
?disabled=${this.disabled}
@deselected=${() => this.pickerContext?.selection.deselect(item.unique)}
@selected=${() => this.pickerContext?.selection.select(item.unique)}>
</umb-ref-item>

View File

@@ -74,10 +74,12 @@ export class UmbWebhookWorkspaceEditorElement extends UmbLitElement {
#name {
width: 100%;
z-index: 1;
}
#description {
width: 100%;
margin-top: -1px;
--uui-input-height: var(--uui-size-8);
--uui-input-border-color: transparent;
}

View File

@@ -1,4 +1,4 @@
<Project Sdk="Microsoft.NET.Sdk.Web">
<Project Sdk="Microsoft.NET.Sdk.Web">
<PropertyGroup>
<RootNamespace>Umbraco.Cms.Web.UI</RootNamespace>
<IsPackable>false</IsPackable>
@@ -24,6 +24,11 @@
<ItemGroup>
<!-- Add design/build time support for EF Core migrations -->
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" PrivateAssets="all" />
<!-- Explicit transitive references to avoid warnings on build - see https://github.com/dotnet/efcore/issues/35143-->
<PackageReference Include="Microsoft.CodeAnalysis.Common" />
<PackageReference Include="Microsoft.CodeAnalysis.CSharp.Workspaces" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.Common" />
<PackageReference Include="Microsoft.CodeAnalysis.Workspaces.MSBuild" />
</ItemGroup>
<ItemGroup>

View File

@@ -8,7 +8,7 @@
"hasInstallScript": true,
"dependencies": {
"@umbraco/json-models-builders": "^2.0.33",
"@umbraco/playwright-testhelpers": "^16.0.8",
"@umbraco/playwright-testhelpers": "^16.0.9",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"node-fetch": "^2.6.7"
@@ -66,10 +66,9 @@
}
},
"node_modules/@umbraco/playwright-testhelpers": {
"version": "16.0.8",
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-16.0.8.tgz",
"integrity": "sha512-7uSrljmpNXzVl1okX7aW3s1Btynbshx49GY3U5vBrmwUqFBOnHVQI7yZYFe5DViGI8EM1jCAq9UdRKqrM3SyHg==",
"license": "MIT",
"version": "16.0.9",
"resolved": "https://registry.npmjs.org/@umbraco/playwright-testhelpers/-/playwright-testhelpers-16.0.9.tgz",
"integrity": "sha512-nfoRZNYrD2PP6k/GljiINCEA8VM6uvOAlqmkhYOdiTzrgLmVRqZExsNskm1BhlcxDhE6+XZlpjTcFIotFBKLFQ==",
"dependencies": {
"@umbraco/json-models-builders": "2.0.33",
"node-fetch": "^2.6.7"

View File

@@ -21,7 +21,7 @@
},
"dependencies": {
"@umbraco/json-models-builders": "^2.0.33",
"@umbraco/playwright-testhelpers": "^16.0.8",
"@umbraco/playwright-testhelpers": "^16.0.9",
"camelize": "^1.0.0",
"dotenv": "^16.3.1",
"node-fetch": "^2.6.7"

View File

@@ -58,7 +58,7 @@ test('can delete a member group', {tag: '@smoke'}, async ({umbracoApi, umbracoUi
// Act
await umbracoUi.memberGroup.clickMemberGroupLinkByName(memberGroupName);
await umbracoUi.memberGroup.clickActionsButton();
await umbracoUi.memberGroup.clickActionButton();
await umbracoUi.memberGroup.clickDeleteButton();
await umbracoUi.memberGroup.clickConfirmToDeleteButton();

View File

@@ -217,7 +217,7 @@ test('can delete member', {tag: '@smoke'}, async ({umbracoApi, umbracoUi}) => {
// Act
await umbracoUi.member.clickMemberLinkByName(memberName);
await umbracoUi.memberGroup.clickActionsButton();
await umbracoUi.memberGroup.clickActionButton();
await umbracoUi.memberGroup.clickDeleteButton();
await umbracoUi.memberGroup.clickConfirmToDeleteButton();

View File

@@ -115,7 +115,7 @@ test('can delete a user group', async ({umbracoApi, umbracoUi}) => {
await umbracoUi.userGroup.clickUserGroupWithName(userGroupName);
// Act
await umbracoUi.userGroup.clickActionsButton();
await umbracoUi.userGroup.clickActionButton();
await umbracoUi.userGroup.clickDeleteButton();
await umbracoUi.userGroup.clickConfirmToDeleteButton();

View File

@@ -1,6 +1,6 @@
{
"$schema": "https://raw.githubusercontent.com/dotnet/Nerdbank.GitVersioning/main/src/NerdBank.GitVersioning/version.schema.json",
"version": "16.0.0-rc",
"version": "16.0.0-rc2",
"assemblyVersion": {
"precision": "build"
},