Compare commits

...
1 Commits
Author SHA1 Message Date
WendelinandClaude Opus 5.5 00312420d8 Remove clicking the title to enlarge the more info dialog (#56176)
Clicking the title of the more info dialog made it fill the screen, but
nothing showed that this was possible. For a camera it only added black
bars, since its info view already fits the picture. Cameras also no
longer open at the large width: their info view and the image's size the
dialog from the picture, and their other views are as wide as those of
any other entity. A large width passed by the caller still works.

Co-authored-by: Claude Opus 5.5 <[email protected]>
2026-11-26 15:24:20 +01:00
2 changed files with 3 additions and 27 deletions

No files matched your search

+2 -17
View File
@@ -149,8 +149,6 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
@property({ type: Boolean, reflect: true }) public large = false;
@state() private _fill = false;
// The dialog grows with the camera's or image's picture, as high as there
// is room for
@state() private _mediaAspectRatio?: number;
@@ -217,7 +215,6 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
this._detailsYamlMode = false;
this.large = params.large ?? false;
this._fill = false;
this._open = true;
this._loadEntityRegistryEntry();
}
@@ -701,13 +698,7 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
return html`
<ha-adaptive-dialog
.open=${this._open}
.width=${
this._fill
? "full"
: this.large || mediaAspectRatio
? "large"
: "medium"
}
.width=${this.large || mediaAspectRatio ? "large" : "medium"}
class=${classMap({
camera: domain === "camera",
image: domain === "image",
@@ -751,7 +742,7 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
></ha-icon-button-prev>
`
}
<span slot="headerTitle" @click=${this._enlarge} class="title">
<span slot="headerTitle" class="title">
${
breadcrumb.length > 0
? !__DEMO__ && isAdmin
@@ -1168,12 +1159,6 @@ export class MoreInfoDialog extends DirtyStateProviderMixin<
this._cameraControlsHeight = ev.detail.height;
}
private _enlarge() {
withViewTransition(() => {
this._fill = !this._fill;
});
}
private _handleOpened() {
window.addEventListener("dialog-closed", this._enableEscapeKeyClose);
window.addEventListener("show-dialog", this._disableEscapeKeyClose);
+1 -10
View File
@@ -1,7 +1,6 @@
import type { PropertyValues } from "lit";
import type { HASSDomEvent } from "../common/dom/fire_event";
import { mainWindow } from "../common/dom/get_main_window";
import { computeDomain } from "../common/entity/compute_domain";
import { replaceCurrentUrl } from "../common/navigate";
import {
createMoreInfoUrl,
@@ -12,8 +11,6 @@ import type { MoreInfoDialogParams } from "../dialogs/more-info/ha-more-info-dia
import type { Constructor } from "../types";
import type { HassBaseEl } from "./hass-base-mixin";
const LARGE_MORE_INFO_DOMAINS = ["camera"];
declare global {
// for fire event
interface HASSDomEvents {
@@ -47,13 +44,7 @@ export default <T extends Constructor<HassBaseEl>>(superClass: T) =>
{
entityId: ev.detail.entityId,
view,
large:
ev.detail.large ??
(ev.detail.entityId
? LARGE_MORE_INFO_DOMAINS.includes(
computeDomain(ev.detail.entityId)
)
: false),
large: ev.detail.large,
data: ev.detail.data,
returnUrl,
},