Releases: skavan/super-text-input
Releases · skavan/super-text-input
Release list
v0.3.28
0.3.27
v0.3.27
Fixed
- Button
tap_actionwith{{ value }}now uses the live input value (issue #5). Previously the click handler readthis._element.value— the Lit reactive property, which only updates after Home Assistant pushes the entity state back. Withupdate_mode: blur(default), the button click triggers blur → service-call → HA round-trip, but the click handler runs before that round-trip completes, so{{ value }}substituted the stale previous value (or empty string on first use). The handler now reads from the live DOM<input>element instead, so whatever the user just typed comes through correctly. {{ value }}substitution is also now safe for special characters. The old path didJSON.stringify(actionConfig).replace(...).JSON.parse(...)— typing"or\would silently break the JSON roundtrip and the action would fire with garbage or not fire at all. The substitution now walks the action config object and only touches string leaves, so any character is preserved verbatim.
v0.3.26
Fixed config ui to catchup with codebase
What's new in v0.3.22
Editor (visual config) overhaul
The whole config dialog was broken in HA 2026.4+ — HA replaced the underlying ha-textfield, ha-select, and ha-selector-boolean components. This release rewires the editor to use their replacements.
- All text fields (Name, Label, Placeholder, Update Frequency) now render correctly
- Update Mode dropdown shows + accepts both options
- Update Mode defaults to "On Blur" when unset (matches card behavior)
- "Debounce Time" relabeled to "Update Frequency (ms)"
- Two new switches hoisted from YAML to the form: Hide Label and Compact Buttons
Internal
- Forward-compat hardening around HA 2026.4 wa-input internals (see Forward-compat notes)
- See CHANGELOG.md for the per-version detail
v0.3.18
v0.3.18
Fixed
- Regression from v0.3.17: the
isConnectedcheck in_injectCompactButtonStylesran on synchronously-created buttons before they were attached to the DOM, so the inject bailed and the hover overlay reverted to a 50 % circle. Now only checksisConnectedon retries (depth > 0).
v0.3.17 — Code review pass
Fixed
_injectCompactButtonStylesno longer leaksCSSStyleSheetinstances on eachsetConfig. The sheet is cached on the button host (button._stiOuterSheet/button._stiInnerSheet) and reused viareplaceSync, mirroring thewaInput._stiSheetpattern.tryInjectretry chain now cancels in-flight timers and respectsisConnectedon retries, preventing orphaned chains from running on detached buttons after rapidsetConfigcalls._applyDeepInputStylesuses a per-instance version token so two rapid config changes can't race each other's writes toadoptedStyleSheets.
Changed
- Underscored YAML style keys (
padding_left) are normalized to hyphens (padding-left) once at config-load time. Every downstream reader now sees one canonical form. _applyOuterInputStylesonly runs when_configchanges (was running on every keystroke in realtime mode).- Added
FORWARD-COMPATcomments at the three brittle wa-input touchpoints (label.label,[part="base"]::after,ha-button::after) so future maintainers know which selectors break first when HA bumps.
v0.3.16
Added
- Hover/ripple overlay now follows the button's
border-radius. A button withborder-radius: 12 pxgets a rounded-rect hover instead of a circle. Implemented by overridingha-button::afterand::beforein the inner shadow.
v0.3.15
Added
style.editor.vertical-align(top/center/bottom, also acceptsmiddle). Defaults tobottom(classic look, value text just above the underline). Useful for slim /hide_labelcards where the value should sit in the middle of the pill.- The button's
border-radiusnow propagates into the innerha-buttonshadow so the visible shape and the hover bounds are consistent in size (shape correction in v0.3.16 finished the job).
v0.3.14
Added
- Buttons under 48 px auto-trigger the inner-button shrink, so the hover overlay matches the visible button (was always 48 px before).
compact_buttons: truecontinues to force this for all buttons regardless of size.
v0.3.13
Changed
- Editor
padding-leftandpadding-bottomdefaults are now independent ofhide_label. Togglinghide_labelno longer shifts the value text horizontally or away from the underline.
v0.3.10 – v0.3.12 — HA 2026.4 compatibility
Added
- Detect
ha-input(HA 2026.4+) vs.ha-textfield(legacy) at module load and style each path appropriately. compact_buttonscard-level flag for slim layouts.- New style keys:
line-color,line-gap,label-color,label-font-size,label-font-weight,label-line-height,label-padding-{top,right,bottom,left},placeholder-color,padding-{top,right,bottom,left},border-color,border-width. - Built-in button templates:
clear,toast,more-info. - Inner
<div id="sti-inner">wrapper so card padding can inset the buttons and editor properly instead of smashing them against the card edge.
Fixed
- iPhone keyboard close in realtime mode (issue #1) — solved by rendering the input via a real Lit template so the DOM node is reconciled across re-renders.
- Space key not registering (issue #2) — same root cause as #1.
- Card layout collision when both leading and trailing buttons were present.
- Button
sizeconfig is now honoured on HA 2026.4+ (the old code relied on--mdc-icon-button-size, which the newha-icon-buttonignores).