mirror of
https://github.com/Matysh/houseplan-card
synced 2026-10-07 15:09:30 +00:00
fix(settings): preserve established Display option order
Append battery visibility after the existing tooltip, radar and volumetric controls. The established 2.5D setting remains third. Extend the existing browser oracle to allow exactly the new fourth option while preserving its original first-three ordering requirement. Full Validate 37461167422 exposed the ordering regression. It was reproduced locally before the change; volumetric_setting, general_settings_form and settings_dialog_cards all pass after it. Record the final gzip measurement. Issue: #792 User-Visible: yes
This commit is contained in:
@@ -37,7 +37,11 @@ const res = await page.evaluate(async () => {
|
||||
out.dialogOpens = await openSettings();
|
||||
const display = q('.hpf-card[data-card="display"]');
|
||||
const ids = [...display.querySelectorAll('.hpf-toggle > input[type="checkbox"]')].map((i) => i.id);
|
||||
out.thirdInDisplay = JSON.stringify(ids) === JSON.stringify(['gs-room-tooltip', 'gs-radar-live', 'gs-volumetric-view']);
|
||||
out.thirdInDisplay = JSON.stringify(ids.slice(0, 3)) === JSON.stringify(['gs-room-tooltip', 'gs-radar-live', 'gs-volumetric-view']);
|
||||
// #792 appends its control without moving the established Display settings.
|
||||
out.batteryFollowsExisting = JSON.stringify(ids) === JSON.stringify([
|
||||
'gs-room-tooltip', 'gs-radar-live', 'gs-volumetric-view', 'gs-device-battery',
|
||||
]);
|
||||
const row = q('#gs-volumetric-view').closest('.hpf-toggle')?.parentElement ?? null;
|
||||
out.rowTitleAndIcon = !!row && row.textContent.includes(c._t('gs.volumetric_view'))
|
||||
&& !!row.querySelector('ha-icon[icon="mdi:cube-outline"]');
|
||||
|
||||
+2
-1
@@ -5,7 +5,8 @@
|
||||
- Battery-powered devices now show a compact charge indicator: green at 60–100%,
|
||||
amber at 20–59%, red below 20%, or grey with a question mark when unavailable.
|
||||
It sits beside the whole device face without a percentage label. General
|
||||
settings can hide it installation-wide; LED strips have no indicator
|
||||
settings can hide it installation-wide; the new option follows the existing
|
||||
Display controls without moving them. LED strips have no indicator
|
||||
([#792](https://github.com/Matysh/houseplan-card/issues/792)).
|
||||
|
||||
- Fixed creating a room from part of a longer independent wall failing with
|
||||
|
||||
@@ -11,7 +11,8 @@
|
||||
- У батарейных устройств появилась компактная индикация заряда: зелёная при
|
||||
60–100%, жёлтая при 20–59%, красная ниже 20%, серая с вопросом при отсутствии
|
||||
данных. Значок находится справа от всего блока устройства, без цифры процентов.
|
||||
Его можно отключить для всех карточек в общих настройках; у LED-лент значка нет
|
||||
Его можно отключить для всех карточек в общих настройках; новая опция добавлена
|
||||
после существующих строк «Отображения», не смещая их. У LED-лент значка нет
|
||||
([#792](https://github.com/Matysh/houseplan-card/issues/792)).
|
||||
|
||||
- Исправлен отказ создания комнаты на части длинной отдельной стены из-за
|
||||
|
||||
+1
-1
@@ -13,7 +13,7 @@ size must not leak into this independent frame. Demo fixtures use the same MDI
|
||||
paths so pixel tests do not substitute an emoji or an arbitrary test symbol.
|
||||
|
||||
The owner also approved a size-budget recalibration. Fresh source builds move
|
||||
initial View gzip from 301037 to 302537 bytes (+1500); the existing rolling
|
||||
initial View gzip from 301037 to 302532 bytes (+1495); the existing rolling
|
||||
ceiling 301040 plus its unchanged 2000-byte band already admits this result.
|
||||
The absolute wall moves to 320000 bytes, restoring 6.3% reserve over the measured
|
||||
pre-feature reference. Raw dist moves from 2705833 to 2712880 bytes; only that
|
||||
|
||||
@@ -95,11 +95,6 @@ export function renderGeneralSettingsDialog(this: HouseplanEditorRuntime): Templ
|
||||
title: supportT(lang, 'gs.show_room_tooltip'), caption: st('gs.show_room_tooltip_hint'),
|
||||
checked: d.showRoomTooltip, onChange: (v) => set({ showRoomTooltip: v }),
|
||||
})}
|
||||
${toggleRow({
|
||||
id: 'gs-device-battery', icon: 'mdi:battery-outline',
|
||||
title: st('gs.show_device_battery'), caption: st('gs.show_device_battery_hint'),
|
||||
checked: d.showDeviceBattery, onChange: (v) => set({ showDeviceBattery: v }),
|
||||
})}
|
||||
${toggleRow({
|
||||
id: 'gs-radar-live', icon: 'mdi:radar',
|
||||
title: st('gs.radar_show_live'), caption: st('gs.radar_show_live_hint'),
|
||||
@@ -109,6 +104,11 @@ export function renderGeneralSettingsDialog(this: HouseplanEditorRuntime): Templ
|
||||
id: 'gs-volumetric-view', icon: 'mdi:cube-outline',
|
||||
title: t('gs.volumetric_view'), caption: st('gs.volumetric_view_hint'),
|
||||
checked: d.volumetricView, onChange: (v) => set({ volumetricView: v }),
|
||||
})}
|
||||
${toggleRow({
|
||||
id: 'gs-device-battery', icon: 'mdi:battery-outline',
|
||||
title: st('gs.show_device_battery'), caption: st('gs.show_device_battery_hint'),
|
||||
checked: d.showDeviceBattery, onChange: (v) => set({ showDeviceBattery: v }),
|
||||
})}`,
|
||||
})}
|
||||
${formCard({
|
||||
|
||||
Reference in New Issue
Block a user