Skip to content

What's New in 3.4.0-beta10

Pre-release
Pre-release

Choose a tag to compare

@WJDDesigns WJDDesigns released this 15 May 03:55

🔧 Improvements

  • Improved every module editor to look and feel identical with a canonical UI refactor - 51 modules (every *-module.ts) had their renderGeneralTab migrated off bespoke <input type="file">, <ha-switch>, <ha-icon-picker>, raw <select>, and ~10 hand-rolled segmented-button class names (option-btn, layout-style-option, view-mode-btn, style-btn, control-button-group, position-option, position-grid, alignment-btn, orientation-btn, species-btn) plus the old filter-chip pattern. Every module now renders through the same shared helpers (renderFileField, renderChipListField, renderSegmentedField, renderIconField, renderColorField, renderSliderField, renderEntityPickerWithVariables, renderFieldSection, renderSettingsSection) so file uploads, icon pickers, segmented controls, chip lists, color pickers, and sliders look pixel-identical from one module to the next — no more "this module's source picker looks slightly different from that module's".
  • Improved file uploads with a new <ultra-file-picker> component - Single source of truth for module file/image uploads: primary-color "Choose file" button, dashed drop-zone framing, current-file chip with × to clear, toast notifications on success/failure, and an uploading spinner state. Replaces ~12 different hand-rolled <input type="file"> implementations that each had their own dashed-zone, button color, and path-display behavior.
  • Improved icon pickers with a new <ultra-icon-field> component - Wraps <ha-icon-picker> with the same field-title / field-description typography used by every other shared field helper, so an icon picker in one module is visually indistinguishable from one in another module.
  • Improved segmented controls with a new <ultra-segmented> component - Single mutually-exclusive-string picker used everywhere (source-type, alignment, direction, layout-style, badge corner, etc.). Auto-picks grid layout (4 → 2×2, 6 → 3-col, 9 → 3×3) so the old "3 buttons + 1 leftover wrap" pattern is gone, and supports an icon per option for visual segmented choices.
  • Improved chip lists with a new <ultra-chip-list> component - One implementation for "list of strings or entity ids with add/remove" UI. Three modes (free-text for keywords, entity with ha-entity-picker for entity ids, select for domain dropdowns) and two variants (primary for additive lists, exclude red chips for exclusion lists). Replaces every per-module domain-chips / filter-chip implementation.
  • Improved sliders by switching renderSliderField to HA-native <ha-slider> - The slider track and thumb now visually match every other slider in Home Assistant (settings dialogs, light brightness, etc.) instead of a custom <input type="range">. The Hover Effects animation Duration slider in global-actions-tab.ts was migrated to the same native slider so all slider-style numeric inputs across the editor look identical. The shared layout-tab test harness was updated to recognize <ha-slider> as an interactive control.
  • Improved Auto Entity List pinned/hidden entity UX - Pinned and hidden entity lists now render as friendly-name chips you click to expand inline overrides (vs. the previous "expand the row" pattern). The ha-entity-picker is remounted after each selection so the combobox reliably clears, the chip text uses the entity's friendly name (falling back to the entity id slug), and active chips get a subtle ring so the currently-edited entity is obvious.
  • Improved global Design tab consistency - The background-image uploader was migrated to <ultra-file-picker> and the responsive-mode toggle now goes through UcFormUtils.boolean instead of a raw <ha-switch>, removing the last in-module "this looks different from everything else" widgets in the Design tab.
  • Improved Bar module General tab structure - The percentage-type picker, configuration sub-modes, "Bar Percentage Entity", and "Limit Value Entity" fields are now all contained inside a single visible .settings-section box instead of floating outside the section frame, matching every other module's section-wrapped layout.

🚀 New Features

  • Added a canonical-patterns static test that blocks every forbidden bespoke widget - New src/modules/__tests__/module-canonical-general-tab.test.ts (~285 lines) scans every module's renderGeneralTab for ~15 forbidden patterns (<input type="file">, <input type="checkbox">, <ha-switch>, <ha-icon-picker>, raw <select>, option-btn, layout-style-option, view-mode-btn, style-btn, control-button-group, position-option, position-grid, alignment-btn, orientation-btn, species-btn, filter-chip, bare conditional-fields-group without a header, nested injectUcFormStyles inside a <style> tag). Every module must either be in the explicit CANONICAL_ENFORCED_MODULES list (60+ modules) or have a documented carve-out reason, so any future module that reintroduces a bespoke widget fails CI. A companion regression-guard test pins the shared .settings-section CSS (background, border-radius, padding) so a future refactor cannot silently strip the visible section box again.
  • Added BaseUltraModule.renderFileField, renderChipListField, renderSegmentedField, renderIconField, and renderColorField helpers - The canonical module-authoring API now covers every common widget out of the box. Each helper handles the field-title / field-description typography, container spacing, and triggerPreviewUpdate wiring so module authors never have to think about it.
  • Added <ultra-segmented> icon support per option - Segmented options can declare a mdi: icon that renders above the label, replacing per-module hand-rolled "icon + label inside a button" segmented widgets (people layout, virtual pet species, etc.).

🐛 Bug Fixes

  • Fixed renderUcForm label semantics by renaming hideLabelsshowLabels - The fifth argument now reads naturally: pass showLabels: true only when the schema has friendly human-readable label strings. The previous double-negative (hideLabels = true to hide labels) led to several modules leaking raw underscored field names (_add_data_item etc.) into the UI when authors forgot to pass hideLabels. The default flips so the common case (no labels) is correct without explicit opt-in.
  • Fixed Auto Entity List entity-picker reset after each pin/hide selection - The ha-entity-picker used to keep the previously-selected entity in its text field after a pin/hide, so the next add could silently re-target the same entity. The picker is now remounted with a fresh keyed() block after every selection, mirroring HA's own behavior.

🌐 Translations

  • Added new editor strings across all 13 languages - New translation keys for "Choose file" / "Remove file" upload labels, the attribute-entity description, Auto-entity-list direction / alignment / badge-corner labels, info-module data-item type labels (Location / Battery / Time Info / Media / Sensor / Device State / Attribute / Toggle), pinned/hidden-entity chip add labels and override headings, and the dropdown Template-Mode section now ship in Catalan, Czech, Danish, German, English (US/GB), Spanish, French, Italian, Dutch, Polish, Swedish, Norwegian (Bokmål / Nynorsk / generic).