diff --git a/.github/README.md b/.github/README.md index 195d4f9a36..33cb2d41d6 100644 --- a/.github/README.md +++ b/.github/README.md @@ -38,6 +38,14 @@ Some important documentation links to get you started: - [Getting to know Umbraco](https://docs.umbraco.com/umbraco-cms/fundamentals/get-to-know-umbraco) - [Tutorials for creating a basic website and customizing the editing experience](https://docs.umbraco.com/umbraco-cms/tutorials/overview) +## Backoffice Preview + +Want to see the latest backoffice UI in action? Check out our live preview: + +**[backofficepreview.umbraco.com](https://backofficepreview.umbraco.com/)** + +This preview is automatically deployed from the main branch and showcases the latest backoffice features and improvements. It runs from mock data and persistent edits are not supported. + ## Get help If you need a bit of feedback while building your Umbraco projects, we are [chatty on Discord](https://discord.umbraco.com). Our Discord server serves as a social space for all Umbracians. If you have any questions or need some help with a problem, head over to our [dedicated forum](https://forum.umbraco.com/) where the Umbraco Community will be happy to help. diff --git a/src/Umbraco.Core/Services/ContentTypeEditing/MediaTypeEditingService.cs b/src/Umbraco.Core/Services/ContentTypeEditing/MediaTypeEditingService.cs index 8a626215b4..4955eeec9c 100644 --- a/src/Umbraco.Core/Services/ContentTypeEditing/MediaTypeEditingService.cs +++ b/src/Umbraco.Core/Services/ContentTypeEditing/MediaTypeEditingService.cs @@ -175,7 +175,7 @@ internal sealed class MediaTypeEditingService : ContentTypeEditingServiceBase !color.legacy); + @state() + private _isSearching = false; + constructor() { super(); this.consumeContext(UMB_ICON_REGISTRY_CONTEXT, (context) => { @@ -44,8 +47,10 @@ export class UmbIconPickerModalElement extends UmbModalBaseElement 0; this._iconsFiltered = this.#icons.filter((icon) => icon.name.toLowerCase().includes(value.toLowerCase())); } else { + this._isSearching = false; this._iconsFiltered = this.#icons; } } @@ -54,8 +59,12 @@ export class UmbIconPickerModalElement extends UmbModalBaseElement
- { - if (e.key === 'Enter' || e.key === ' ') this.#clearIcon(); - }}> - ${this.renderIcons()} { + if (e.key === 'Enter' || e.key === ' ') this.#clearIcon(); + }}> + + + ` + : nothing} + ${this.renderIcons()} (UmbLitElement, undefined) + implements UmbPropertyEditorUiElement +{ + @property({ type: Boolean }) + mandatory = false; + + protected override firstUpdated(): void { + this.addValidator( + 'valueMissing', + () => 'Icon is required', + () => this.mandatory && !this._icon, + ); + } + @property() - public set value(v: string) { - this._value = v ?? ''; - const parts = this._value.split(' '); + public override set value(v: string) { + const val = v ?? ''; + super.value = val; + + const parts = val.split(' '); if (parts.length === 2) { this._icon = parts[0]; this._color = parts[1].replace('color-', ''); } else { - this._icon = this._value; + this._icon = val; this._color = ''; } } - public get value() { - return this._value; + + public override get value() { + return (super.value as string) ?? ''; } - private _value = ''; @state() private _icon = ''; @@ -53,7 +70,7 @@ export class UmbPropertyEditorUIIconPickerElement extends UmbLitElement implemen icon: this._icon, color: this._color, }, - data: { placeholder: this._placeholderIcon }, + data: { placeholder: this._placeholderIcon, showEmptyOption: !this.mandatory }, }).catch(() => undefined); if (!data) return;