mirror of
https://github.com/Matysh/houseplan-card
synced 2026-07-31 08:28:31 +00:00
Three owner reports: - The content frame behind the default zoom only looked at rooms, and devices are allowed to stand outside every one of them — a gate sensor by the fence was left outside the opening view. contentBounds() takes the marker positions now, and they count as content even on a space with no rooms at all. - Entering an editor 'strangely shifted' the plan. The stage height was 100dvh minus a hard-coded 118px of header, and the editor header is ~90px taller than that: the whole scene slid down by the difference and its bottom went below the fold. The card now measures where the stage actually starts (HA toolbar, margins and our header included) and gives it the rest of the viewport; the measurement is deferred a frame because setting state straight from a ResizeObserver callback trips the 'undelivered notifications' error, which smoke_dialog_zombie rightly counts as a page error. - Zoom stopped at the base fit. The floor is 0.4× now, and zoomed out the clamp centres the content instead of pinning it to the top-left corner — with the view larger than the plan there is nothing to clamp against. New smoke: smoke_zoom_out.mjs (editor keeps the stage inside the viewport, 0.4 floor, centring, the device-stretched frame); a unit test for the extra points of contentBounds. Not released — the next release goes out after the v1.49.0 audit.
Synthetic demo home
A fully fictional house (plans, devices, states) used for README screenshots, the demo GIF and headless smoke tests — so no real home data ever appears in public materials.
srv/demo.html— self-contained host page:<ha-icon>/<ha-card>stubs and a fakehass(registries, states,callWS,callService, floors).srv/assets/— generated plan SVGs andicons.js(node demo/gen_icons.mjs, needs the repo's devDependencies). The card bundle is copied fromdist/:cp dist/houseplan-card.js demo/srv/assets/.serve.mjs— playwright launcher (route interception, no web server).smoke_*.mjs— feature smoke tests; run with a Chromium installed viaPLAYWRIGHT_BROWSERS_PATH=<dir> npx playwright install chromium-headless-shell.
Note for sandboxed sessions: /tmp does not survive; this directory is the
persistent home of the harness (docs/DEVELOPMENT.md has the LD_LIBRARY_PATH recipe).