fix: the summary panel settings dialog scrolls in Home Assistant

In HA hp-dialog renders ha-dialog, whose own `.body` is the scroller and
is not a flex container; `.summary-editor` (overflow:auto,
overscroll-behavior:contain, min-height:0) therefore grew to its content
and became a scroll container that never scrolls — Chromium stops wheel
and touch scroll chaining at such a child, so nothing moved (reproduced
on ha.jbstudio.pro, HA 2026.9.1, and in an isolated Playwright page).
hp-dialog gains an opt-in `flex-content` attribute forwarded as
ha-dialog's `flexcontent`, which lays the body out as a flex column: the
editor is height-bound again and scrolls itself, header and footer stay,
exactly as the native branch already did. Only the summary dialog opts in.

Smoke demo/smoke_summary_dialog_scroll.mjs stubs ha-dialog after the HA
2026.9 contract: wheel on desktop, touch swipe on a phone, dialog within
the viewport, and a witness that the stub reproduces the bug without
flexcontent. Docs screenshots: 11/11 pixel-identical (docs:accept
--identical, #512), fingerprint refreshed.

Mutants: summary-dialog-drops-flex-content, hp-dialog-ignores-flex-content.

Issue: #508
User-Visible: yes
This commit is contained in:
Codex
2026-09-09 19:49:18 +00:00
committed by claude[bot]
parent 6b592c13c0
commit e38beed796
53 changed files with 659 additions and 427 deletions
+1 -1
View File
@@ -61,7 +61,7 @@ export const renderSummaryPanelEditor: SummaryPanelEditorRenderer = (context) =>
...dialog, localShow: (event.target as HTMLInputElement).checked,
})} /></label>`;
return html`<hp-dialog .hass=${host.hass} data-kind="summary"
.title=${t('summary.settings')} wide
.title=${t('summary.settings')} wide flex-content
dismiss-on-scrim aria-busy=${String(dialog.busy)}
@hp-close=${close}>
<div class="body summary-editor" @click=${() => context.closeSource()}>