mirror of
https://github.com/Matysh/houseplan-card
synced 2026-09-30 19:58:50 +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.