Two bugs in Greg's panel, both diagnosed, neither fixed yet. Held on purpose so they can go out with everything else under one version bump.
Full write-up, including the code for both fixes and the test list, is on branch claude/greg-config-expansion-1xb8gu at .github/NEXT.md. That file is the working copy. This issue is just the tracker.
What happens
Open the cog in Greg's panel, change any setting, and the settings close immediately without saving. You have to click the cog again to get back in and press Apply.
Only below 1000px wide. The settings block is rendered twice, inline in the right-hand column on wide screens and inside the cog balloon on narrow ones, and above 1000px the cog and balloon are display:none. So it never shows up on a desktop browser, and it shows up on every interaction on a phone.
Cause
The click-outside-to-close handler in _wire() uses this.contains(e.target). That is correct in a normal page and wrong inside a shadow DOM: a listener on document sees event.target retargeted to the outermost shadow host, <home-assistant>, never to anything of Greg's. So it reports every click on the page as being outside the panel, the settings included. The cog itself only survives because its handler calls e.stopPropagation() first.
Fix is event.composedPath(), which crosses shadow boundaries and returns the nodes actually clicked.
Second one, found while in there
The .balloon rule has no max-height and no overflow, and it holds nine fields, Apply, Advanced settings and the whole uninstall block at 300px wide. On a short screen the bottom of it runs off the viewport with no way to reach it, which is why the uninstall button is effectively unreachable on a phone.
Waiting on
Note for whenever this ships
PANEL_JS_URL is /greg_panel/greg-panel.js?v={VERSION}, so a panel change is invisible to anyone already on v1.6.0 until the version changes and busts the cache. Neither fix can reach a single user without a release. Beta first.
Two bugs in Greg's panel, both diagnosed, neither fixed yet. Held on purpose so they can go out with everything else under one version bump.
Full write-up, including the code for both fixes and the test list, is on branch
claude/greg-config-expansion-1xb8guat.github/NEXT.md. That file is the working copy. This issue is just the tracker.What happens
Open the cog in Greg's panel, change any setting, and the settings close immediately without saving. You have to click the cog again to get back in and press Apply.
Only below 1000px wide. The settings block is rendered twice, inline in the right-hand column on wide screens and inside the cog balloon on narrow ones, and above 1000px the cog and balloon are
display:none. So it never shows up on a desktop browser, and it shows up on every interaction on a phone.Cause
The click-outside-to-close handler in
_wire()usesthis.contains(e.target). That is correct in a normal page and wrong inside a shadow DOM: a listener ondocumentseesevent.targetretargeted to the outermost shadow host,<home-assistant>, never to anything of Greg's. So it reports every click on the page as being outside the panel, the settings included. The cog itself only survives because its handler callse.stopPropagation()first.Fix is
event.composedPath(), which crosses shadow boundaries and returns the nodes actually clicked.Second one, found while in there
The
.balloonrule has nomax-heightand nooverflow, and it holds nine fields, Apply, Advanced settings and the whole uninstall block at 300px wide. On a short screen the bottom of it runs off the viewport with no way to reach it, which is why the uninstall button is effectively unreachable on a phone.Waiting on
Note for whenever this ships
PANEL_JS_URLis/greg_panel/greg-panel.js?v={VERSION}, so a panel change is invisible to anyone already on v1.6.0 until the version changes and busts the cache. Neither fix can reach a single user without a release. Beta first.