From d4fc0318f73f66d8e7c039b1acc81b0dbaec4c87 Mon Sep 17 00:00:00 2001 From: Paul Bottein Date: Fri, 9 May 2025 18:37:14 +0200 Subject: [PATCH] Fix domain max-width in entity picker (#25400) --- src/components/entity/ha-entity-combo-box.ts | 4 +++- src/components/ha-combo-box-item.ts | 2 +- src/dialogs/quick-bar/ha-quick-bar.ts | 4 ++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/src/components/entity/ha-entity-combo-box.ts b/src/components/entity/ha-entity-combo-box.ts index 6941afb5a9..5d31baa43b 100644 --- a/src/components/entity/ha-entity-combo-box.ts +++ b/src/components/entity/ha-entity-combo-box.ts @@ -178,7 +178,9 @@ export class HaEntityComboBox extends LitElement { : nothing} ${item.domain_name && !showEntityId ? html` -
${item.domain_name}
+
+ ${item.domain_name} +
` : nothing} diff --git a/src/components/ha-combo-box-item.ts b/src/components/ha-combo-box-item.ts index 8e69a732d2..663421d287 100644 --- a/src/components/ha-combo-box-item.ts +++ b/src/components/ha-combo-box-item.ts @@ -39,7 +39,7 @@ export class HaComboBoxItem extends HaMdListItem { font-family: var(--ha-font-family-code); font-size: var(--ha-font-size-xs); } - [slot="trailing-supporting-text"] { + ::slotted(.domain) { font-size: var(--ha-font-size-s); font-weight: var(--ha-font-weight-normal); line-height: var(--ha-line-height-normal); diff --git a/src/dialogs/quick-bar/ha-quick-bar.ts b/src/dialogs/quick-bar/ha-quick-bar.ts index 68833ad0bf..21b1215e06 100644 --- a/src/dialogs/quick-bar/ha-quick-bar.ts +++ b/src/dialogs/quick-bar/ha-quick-bar.ts @@ -386,7 +386,7 @@ export class QuickBar extends LitElement { ` : nothing} ${item.translatedDomain && !showEntityId - ? html`
+ ? html`
${item.translatedDomain}
` : nothing} @@ -1027,7 +1027,7 @@ export class QuickBar extends LitElement { font-size: var(--ha-font-size-xs); } - ha-md-list-item [slot="trailing-supporting-text"] { + ha-md-list-item .domain { font-size: var(--ha-font-size-s); font-weight: var(--ha-font-weight-normal); line-height: var(--ha-line-height-normal);