Skip to content

Commit 9592ebb

Browse files
committed
Release 3.2.1: fix text module reverting to Sample Text on upgrade
Default rich_text_content is now empty so mergeWithDefaults no longer overwrites legacy text from pre-3.2.0 configs. Maybe 3.2.0 was not as stable as I thought it would be — this patch addresses the regression described in RELEASE_NOTES. Made-with: Cursor
1 parent 101de29 commit 9592ebb

9 files changed

Lines changed: 23 additions & 14 deletions

File tree

RELEASE_NOTES.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# 🎉 Ultra Card - The Ultimate Home Assistant Card Experience
22

3+
## Version 3.2.1
4+
5+
Maybe 3.2.0 was not as stable as I thought it would be — this patch release fixes a regression where **Text** modules created before the WYSIWYG update could display **“Sample Text”** after upgrading from 3.1.x, instead of your saved content. The default `rich_text_content` now stays empty until you edit in the WYSIWYG editor, so legacy `text` values are preserved correctly when the config is merged with defaults.
6+
7+
---
8+
39
## Version 3.2.0
410

511
Ultra Card 3.2.0 is the biggest release since 3.0 — packed with new modules, a smarter editor, and a faster card under the hood. Here's everything that's new since 3.1.0.

dist/debug-info.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
11
// Ultra Card Debug Info
2-
// Version: 3.2.0
3-
// Build Date: 2026-04-06T14:48:40.317Z
2+
// Version: 3.2.1
3+
// Build Date: 2026-04-06T16:53:46.255Z
44
// Build Mode: production

dist/ultra-card.js

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

dist/version.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
/**
22
* Ultra Card Version
3-
* v3.2.0
3+
* v3.2.1
44
*
55
* This file is auto-generated from src/version.ts
66
* DO NOT MODIFY DIRECTLY
@@ -13,6 +13,6 @@ function setVersion(value) {
1313
}
1414

1515
// Set default version (will be overridden by card)
16-
setVersion('3.2.0');
16+
setVersion('3.2.1');
1717

1818
export { version, setVersion };

package-lock.json

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "ultra-card",
3-
"version": "3.2.0",
3+
"version": "3.2.1",
44
"description": "Ultra Card - A modular card builder for Home Assistant",
55
"main": "dist/ultra-card.js",
66
"scripts": {

src/modules/text-module.ts

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,11 @@ export class UltraTextModule extends BaseUltraModule {
5454
template: '',
5555
unified_template_mode: false,
5656
unified_template: '',
57-
// Rich text (WYSIWYG) content — always active for non-template mode
58-
rich_text_content: '<p>Sample Text</p>',
57+
// Rich text (WYSIWYG) content — empty by default so that
58+
// _getEffectiveRichContent() falls through to the legacy `text` field.
59+
// This prevents overwriting user text when mergeWithDefaults adds the key
60+
// to configs that predate the WYSIWYG feature (pre-3.2.0).
61+
rich_text_content: '',
5962
// Hover configuration
6063
enable_hover_effect: true,
6164
hover_background_color: 'var(--divider-color)',

src/version.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,4 @@
77
* Build timestamp: 2026-01-27
88
*/
99

10-
export const VERSION = '3.2.0';
10+
export const VERSION = '3.2.1';

ultra-card.js

Lines changed: 2 additions & 2 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)