From 1f1a2176fd591c9f9bb9773c9c9cfc9690424755 Mon Sep 17 00:00:00 2001 From: martino <32328813+f3rs3n@users.noreply.github.com> Date: Tue, 29 Sep 2026 11:59:56 +0200 Subject: [PATCH] fix(notifications): wrap unbroken temperature email details --- AppImage/scripts/notification_channels.py | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/AppImage/scripts/notification_channels.py b/AppImage/scripts/notification_channels.py index 00dca079..60e0afd4 100644 --- a/AppImage/scripts/notification_channels.py +++ b/AppImage/scripts/notification_channels.py @@ -1038,6 +1038,11 @@ class EmailChannel(NotificationChannel): # Determine group for section header event_type = data.get('_event_type', '') group = data.get('_group', 'other') + # Keep unbroken recorded text inside the temperature email's table. + # Both properties are inline for mail clients; other events retain + # their original markup and layout. + temp_cell_wrap = 'word-wrap:break-word;overflow-wrap:break-word;word-break:break-word;' if event_type == 'temp_high' else '' + temp_table_layout = 'table-layout:fixed;' if event_type == 'temp_high' else '' section_label = _runtime_text(f'email.groups.{group}', data) report_label = _runtime_text('email.report', data, group=section_label) host_label = _runtime_text('email.host', data) @@ -1089,12 +1094,12 @@ class EmailChannel(NotificationChannel): if label: rows_html += f''' {label} - {value} + {value} ''' else: # Full-width row (no label, just description text) rows_html += f''' - {value} + {value} ''' # ── Reason / details block (long text, displayed separately) ── @@ -1104,7 +1109,7 @@ class EmailChannel(NotificationChannel): reason_html = f'''

{_runtime_text('email.details', data)}

-

{html_mod.escape(reason)}

+

{html_mod.escape(reason)}

''' # ── Clean subject for display (remove prefix if present) ── @@ -1153,7 +1158,7 @@ class EmailChannel(NotificationChannel): - +
{rows_html}