mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-04 21:58:56 +00:00
In normal (non-kiosk) mode the stage is calc(100dvh - _hdrH), and _hdrH is measured from HA's chrome, which finishes loading AFTER the card's first paint — late panels nudged the height and the freshly painted plan visibly jumped (kiosk is a flat 100dvh, hence 'perfect in kiosk'). Fix, per the owner's sketch: - until the stage height reads the same twice in a row (200 ms cadence) or a hard ~600 ms cap, the plan stays hidden (.hpboot) and is revealed only after a refit — not a single frame paints at a stale height; - that window is covered by a quiet product-style preloader: dark veil, small pulsing outline house (the card's own mdi:home-city outline, inline SVG), no text, 0.15 s opacity fade-out; - prefers-reduced-motion gets a static house; kiosk never shows the veil; first open of the card instance only — floor/mode switches are untouched. smoke_preloader simulates an HA panel landing at t=300 ms and asserts the veil, zero plan-visible frames at a non-final height, the kiosk opt-out and the reduced-motion variant; serve.mjs starts every smoke after the reveal, where the user starts.
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).