feat(plan): device markers are landmarks in the Plan editor

The Plan editor hid every device marker (display: none), so walls,
openings and stairs were placed against devices from memory. It now
shows them exactly as the Background editor does (#362): the same
markers as View, at the Background editor's effective opacity, fully
pointer-inert. The fade is filter: opacity(0.35) on each marker, not
on .devlayer, because room labels and room settings buttons share that
layer and stay opaque and interactive; filter multiplies the marker's
own opacity (.unavail -> 0.35 x 0.35), as the Background layer does.
Marker handlers already fail closed outside View/Devices.

demo/smoke_plan_device_landmarks.mjs proves AC1/AC2: same markers as
View, per-marker alpha equal to Background, core and capsule fall
through, a real click on a marker reaches the Walls tool and a room
settings button below, cursor and target unchanged, handlers inert, no
tabindex. Three mutants guard hiding, opacity override and the pointer
boundary. UX-MODES, DECOR-EDITOR, USER-GUIDE.ru mode table, changelogs.

Issue: #687
User-Visible: yes
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_018qZfe7YS4rqEMKoVeS3GKd
This commit is contained in:
Claude
2026-09-28 09:38:26 +03:00
parent cab4b4153a
commit 560849a1a7
9 changed files with 288 additions and 4 deletions
+5
View File
@@ -6,6 +6,11 @@
focus frame when it receives focus; it can still be reached with Tab and
followed with Enter or Space
([#686](https://github.com/Matysh/houseplan-card/issues/686)).
- The Plan editor now shows device markers as translucent landmarks, exactly as
the Background editor does: the same markers as View at 35% opacity. They
never react to clicks, hover or the cursor, so every Plan tool, room label and
room settings button works through them
([#687](https://github.com/Matysh/houseplan-card/issues/687)).
## v1.78.0-beta.7 — 2026-09-28
+5
View File
@@ -12,6 +12,11 @@
фокуса браузера; до неё по-прежнему можно дойти клавишей Tab и перейти по
Enter или Пробелу
([#686](https://github.com/Matysh/houseplan-card/issues/686)).
- Редактор плана теперь показывает значки устройств полупрозрачными ориентирами —
так же, как редактор подложки: те же значки, что в просмотре, с
непрозрачностью 35 %. Они не реагируют на клики, наведение и курсор, поэтому
все инструменты плана, подписи комнат и кнопки настроек комнат работают сквозь
них ([#687](https://github.com/Matysh/houseplan-card/issues/687)).
## v1.78.0-beta.7 — 2026-09-28
+1 -1
View File
@@ -22,7 +22,7 @@ light routing, device state or Home Assistant actions.
| Scale | Corner drag preserves aspect ratio. Hold `Shift` for independent axes. Furniture and custom images also have four one-axis middle handles and may cross the fixed edge to mirror. |
| Rotation | Ordinary decor uses 5° steps by default and `Shift` for free rotation. Furniture and custom images are free by default and `Shift` snaps to 45°. Lines use endpoint handles instead of a rotation handle. |
| Magnet targets | Only other decor objects and room contours: corners, edge centres, centres and edges. The image, devices and openings are excluded. |
| Context emphasis | Decor and its editing chrome stay fully opaque. Rooms, labels, devices, openings, positive-thickness walls and solid/dashed zero-thickness walls are contextual only and render at 35% opacity. The whole device presentation (core, ring, capsule, values and badges) is pointer-inert: it never hovers, opens, acts or drags, and the active Background tool receives a press through it. |
| Context emphasis | Decor and its editing chrome stay fully opaque. Rooms, labels, devices, openings, positive-thickness walls and solid/dashed zero-thickness walls are contextual only and render at 35% opacity. The whole device presentation (core, ring, capsule, values and badges) is pointer-inert: it never hovers, opens, acts or drags, and the active Background tool receives a press through it. The Plan editor shows devices the same way, as a per-marker 35% fade because room labels share the layer there (#687, `UX-MODES.md` › Plan). |
| View composition | All decor kinds form one layer above room/data fills, room hover fill, opening-tunnel fills and Glow base. Live Glow, sun, physical walls, opening symbols, devices and room labels remain above decor. The plan image remains below it (§3.3). |
| Compatibility | Legacy `width`, text `size/scale` and `plan_scale` remain readable. New writes use `width_cm`, `size_cm` and `plan_scale_x/y`. |
+1 -1
View File
@@ -258,7 +258,7 @@ Escape сначала отменяет активный диалог, меню,
| Режим | Основное назначение | Устройства | Комнаты/стены | Декор и проёмы |
|---|---|---|---|---|
| Просмотр | Контроль дома | Интерактивны; видны состояния, значения и подсказки | Комната подсвечивается при наведении; подсказка показывает название, чистую площадь, температуру, влажность и LQI | Видны, если не скрыты настройками пространства; проёмы не реагируют на клик, кроме значка замка |
| Редактор плана | Геометрия комнат, стен и проёмов | Скрыты | Интерактивны; видны кнопки настроек комнат, размеры и сетка | Проёмы всегда видны и редактируются; стены нулевой толщины рисуются полностью по оси |
| Редактор плана | Геометрия комнат, стен и проёмов | Не редактируются и полупрозрачны, как в редакторе подложки; клики и наведение проходят к инструментам плана | Интерактивны; видны кнопки настроек комнат, размеры и сетка | Проёмы всегда видны и редактируются; стены нулевой толщины рисуются полностью по оси |
| Редактор устройств | Позиции и параметры маркеров | Перетаскиваются; клик открывает настройки; доступны скрытые маркеры | Не редактируются | Служат фоном |
| Редактор подложки | Изображение, линии, фигуры, текст, мебель | Не редактируются и полупрозрачны | Комнаты и все стены полупрозрачны | Декор интерактивен и непрозрачен; скрытый в просмотре декор всё равно виден здесь |
| Киоск | Настенный экран | Интерактивны как в просмотре | Только отображение | Только отображение; редакторы отсутствуют |
+5
View File
@@ -172,6 +172,11 @@ tabs, the editor-close reserve, zoom and one gear whose menu holds the rest.
editor with the draw tool armed (an empty floor has nothing useful in View).
- ⚙ General settings (fill palette) lives here — it is about the plan's appearance.
- Devices are landmarks here exactly as in Background (#687, #362): the same
markers as View at 35% (each marker's own opacity multiplied, as the
Background layer does) and fully pointer-inert — every press, hover and
cursor belongs to the Plan tool, room label or room settings button below.
Room labels share the device layer and stay opaque and interactive.
- Independent partitions and columns are masonry for hit testing as well as
area/light: room hover stops at their physical bodies just as it stops at a
thick room wall. This does not split the room or change its HA area.