Files
home-information/docs/dev
Tony C d7d2d0e67c CollectionView interaction-intent model + panel ROW/TILE rename (#341)
* Phase 1: Spec doc for ROW/TILE rename and CollectionView integration

Update entity-state-panels.md to describe the new framework shape before any
code lands. Renames the LIST/GRID DisplayContext vocabulary to ROW/TILE,
documents per-context size budgets and CSS variables, and adds a
CollectionView integration section covering the four CollectionViewType
values, the whole-card click contract, and the controller pointer-event
convention. Acts as the spec the implementation commits in later phases
will target.

* Phase 2: Rename DisplayContext LIST/GRID to ROW/TILE

Pure rename, zero functional change. Updates the panel-framework
vocabulary to match what authors actually design for (shape), not what
consumers do with the result (layout):

  DisplayContext.LIST  -> DisplayContext.ROW
  DisplayContext.GRID  -> DisplayContext.TILE

Cascade:

- Enum values in entity/enums.py.
- All panel.py declarations (fallback, camera, smoke_detector, thermostat):
  panel object names (*_list -> *_row, *_grid -> *_tile), display_contexts,
  template_name paths.
- Template file renames via git mv: list.html -> row.html,
  grid.html -> tile.html across all four panel directories.
- CSS class hooks and content classes per panel: --list -> --row,
  --grid -> --tile, list-meta -> row-meta, grid-overlay -> tile-overlay,
  grid-temp -> tile-temp.
- Interim mapping in collection_manager (still binary is_grid vs is_list;
  Phase 3 expands to four-value dispatch).
- Test fixture maps in test_state_panel_framework.py.

All 2974 tests pass; lint clean.

* Phase 3: Expand CollectionViewType to four values; rewire camera bypass

Adds DEFAULT and SECURITY values to CollectionViewType (in addition to
existing GRID and LIST), placing DEFAULT first so it becomes the default
for new collections. CollectionType is untouched.

The wrapper-template camera bypass (entity_card_list.html /
entity_card_grid.html) and the grid_css_class branch in transient_models
are rewired from collection.collection_type.is_cameras to
collection.collection_view_type.is_security. Functional behavior is
unchanged at this phase; the trigger shifts from CollectionType-driven
to ViewType-driven, and Phase 4 will retire the bypass altogether in
favor of the panel framework path.

Migration 0003 is data-only: any existing CAMERAS-typed collection has
its collection_view_type_str set to 'SECURITY' to preserve the camera-
montage rendering through the new SECURITY-driven bypass.

Tests cover the four-value classification (every value classifies as
exactly one of is_default/is_grid/is_list/is_security) and persistence
through the model property accessor for DEFAULT and SECURITY.

All 2976 tests pass; lint clean.

* Phase 4: CollectionView wrapper rewrite + adaptive CSS + GRID_LARGE

Replaces the old GRID/LIST card wrappers with four per-CollectionViewType
templates, drops the is_security camera bypass entirely, and switches to
adaptive CSS column counts driven by panel size budgets.

CollectionViewType expands to five values: DEFAULT (icon+name index, no
panel), GRID (adaptive tiles), GRID_LARGE (bigger tiles for camera
montages and dial-heavy panels — 2 cols on tablet, 3 on standard desktop,
4 on wide desktop), LIST (full-width rows), SECURITY (aspirational
placeholder, renders like GRID today).

Whole-card click model: each wrapper is a <div data-async data-href>.
Antinode picks up the click via div[data-async] (extended to read URL
from data-href when href is not valid HTML5 on the element). Inner
antinode-managed links (camera live view) stop propagation naturally,
so the outer card click does not fire when the user clicks an inner
action target. Non-antinode interactive elements (controllers) must
stop propagation per the documented panel-author convention.

Edit mode disables inner interactivity globally via a CSS rule
([hi-edit="True"] .entity-card * { pointer-events: none }) so card
clicks always reach the outer wrapper and open the edit pane —
panel authors do not need to gate their own handlers on edit state.

Fallback panel TILE/ROW templates now render entity icon + name + the
state list, making them self-contained. Stateless entities no longer
produce blank cards.

Migration of CAMERAS-typed collections to SECURITY (from Phase 3)
stands; users who want the original 2-col montage visual can opt into
GRID_LARGE on a per-collection basis.
2026-05-18 12:52:14 -05:00
..
2026-04-20 10:05:04 -05:00
2025-09-25 18:31:38 -05:00

Home Information Logo

Developer Documentation

See the markdown files in this directory for various developer-related documentation.

The code is the best documentation for lower-level details, but there are some higher-level concepts that are useful to help orient developers. This is the place for that high-level, developer-specific documentation.