Skip to content

mergeViews

mergeViews(file): MergedPlate

Defined in: merge.ts:32

Turn the per-view captures in a plate file into the one plate a Skeleton renders.

Each view is kept whole — its own subtree, its own ids, its own rules — and shown only across the viewport range it owns, via @media display:none gates. We do NOT merge the views’ trees into one. An earlier design (ADR 0004) did, sharing common structure and forking the rest, but aligning two genuinely-different DOM trees (mobile stacked vs desktop two-column) without stable keys proved unreliable: every heuristic mis-paired some nodes and remapped one view’s rules onto another’s elements, corrupting both. A lone capture is pixel-faithful; keeping each view lone preserves that. The cost is a larger plate (roughly the sum of the views) — bounded by the plate size cap — in exchange for correctness.

Pure data-in/data-out — runs in node (plugin load) and in tests.

PlateFile

MergedPlate