${devs.map((d) => this._renderDevice(d, view, showLqi))}
${this._renderVacuums(devs, view)}
${this._renderVacFit(view)}
@@ -17134,6 +17152,10 @@ class HouseplanCard extends LitElement {
}
}
}
+ // Plan keeps the same name-row geometry as the other modes, but the Area
+ // icon remains part of the draggable label instead of becoming a link.
+ const showAreaLink = !!r.area;
+ const areaLinkInteractive = !this._markup;
return html`
this._labelMove(e, r, space.id)}
@pointerup=${() => this._labelUp(r)}
@pointercancel=${() => this._labelUp(r)}
- >${r.name || (this._markup ? this._t('room.unnamed') : '')}${!this._markup && r.area
+ >${r.name || (this._markup ? this._t('room.unnamed') : '')}${showAreaLink
? html` { e.stopPropagation(); this._clickRoom(r); }}
- @pointerdown=${(e: Event) => e.stopPropagation()}>`
+ title=${areaLinkInteractive ? this._t('room.open_area') : nothing}
+ @click=${areaLinkInteractive
+ ? (e: Event) => { e.stopPropagation(); this._clickRoom(r); }
+ : nothing}
+ @pointerdown=${areaLinkInteractive
+ ? (e: Event) => e.stopPropagation()
+ : nothing}>`
: nothing}
${rows.length ? html`${rows}` : nothing}
${this._mode === 'plan'
diff --git a/src/styles.ts b/src/styles.ts
index 9bda9902..b55f73f1 100644
--- a/src/styles.ts
+++ b/src/styles.ts
@@ -873,7 +873,7 @@ export const cardStyles = css`
pointer-events: none; /* draggable only in plan mode (rule below) */
position: absolute;
transform: translate(-50%, -50%);
- font-size: calc(var(--icon-size, 2.5cqw) * 0.5 * var(--rl-scale, 1) * var(--rl-font, 1) * var(--rl-space, 1));
+ font-size: calc(var(--rl-icon-size, var(--icon-size, 2.5cqw)) * 0.5 * var(--rl-scale, 1) * var(--rl-font, 1) * var(--rl-space, 1));
font-weight: 700;
letter-spacing: 0.04em;
white-space: nowrap;
diff --git a/test/golden-matrix.test.mjs b/test/golden-matrix.test.mjs
index 89869964..1950df85 100644
--- a/test/golden-matrix.test.mjs
+++ b/test/golden-matrix.test.mjs
@@ -74,6 +74,11 @@ test('golden matrix has stable unique ids and bounded comparison thresholds', ()
assert.equal(scenario.mode, 'plan', scenario.id);
assert.equal(scenario.capture, 'page', scenario.id);
}
+ if (scenario.roomLabelParity) {
+ assert.equal(scenario.space, 'golden-lighting', scenario.id);
+ assert.equal(['view', 'plan'].includes(scenario.mode), true, scenario.id);
+ assert.equal(scenario.capture, 'page', scenario.id);
+ }
if (scenario.wallJunctionPreview) {
assert.equal(scenario.wallJunctions, true, scenario.id);
assert.equal(scenario.mode, 'plan', scenario.id);
@@ -102,6 +107,24 @@ test('golden matrix covers required geometry, rendering and adaptive surfaces',
assert.equal(new Set(GOLDEN_SCENARIOS.map((scenario) => scenario.theme)).has('dark'), true);
});
+test('room-label parity goldens pair View and Plan in light and dark themes', () => {
+ const scenarios = GOLDEN_SCENARIOS.filter((scenario) => scenario.roomLabelParity);
+ assert.deepEqual(scenarios.map(({ mode, theme }) => `${mode}-${theme}`).sort(), [
+ 'plan-dark', 'plan-light', 'view-dark', 'view-light',
+ ]);
+ for (const scenario of scenarios) {
+ const fixture = prepareGoldenFixture(scenario);
+ const space = fixture.config.spaces.find((item) => item.id === scenario.space);
+ assert.equal(space.settings.show_names, true);
+ assert.equal(space.settings.label_temp, true);
+ assert.equal(space.settings.label_lqi, true);
+ assert.equal(space.settings.label_light, true);
+ assert.deepEqual(Object.keys(fixture.layout).filter((id) => id.startsWith('rl_')).sort(), [
+ 'rl_light-left', 'rl_light-right',
+ ]);
+ }
+});
+
test('washer lifecycle goldens pair active and idle snapshots of one composite fixture', () => {
const active = GOLDEN_SCENARIOS.find((scenario) => scenario.id === 'washer-active-cycle-dark');
const idle = GOLDEN_SCENARIOS.find((scenario) => scenario.id === 'washer-idle-cycle-dark');
@@ -211,7 +234,7 @@ test('sun-ray golden requires browser-painted light from a state-only sun entity
assert.ok(scenario);
const fixture = prepareGoldenFixture(scenario);
const space = fixture.config.spaces.find((item) => item.id === scenario.space);
- assert.equal(GOLDEN_MATRIX_VERSION, 30);
+ assert.equal(GOLDEN_MATRIX_VERSION, 31);
assert.equal(space.settings.sun_rays, true);
assert.equal(scenario.northDeg, 90,
'the sign-sensitive golden must keep a non-zero north direction');