From 3d10dc9745f2a23ed6e5206e915eb251a26bd62c Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Tue, 10 Jun 2025 20:54:12 -0400 Subject: [PATCH 1/2] agenda: Show full title in clockinfo instead of truncated Previously, all event titles would be truncated to 12 characters when displayed in a clock info. This hides some information, and completely breaks event titles containing embedded images (i.e. converted emojis). This change simply removes the truncation, allowing the full title and full images to be shown. --- apps/agenda/ChangeLog | 1 + apps/agenda/agenda.clkinfo.js | 2 +- apps/agenda/metadata.json | 2 +- 3 files changed, 3 insertions(+), 2 deletions(-) diff --git a/apps/agenda/ChangeLog b/apps/agenda/ChangeLog index 327b18e34..ebbbbebb8 100644 --- a/apps/agenda/ChangeLog +++ b/apps/agenda/ChangeLog @@ -18,3 +18,4 @@ 0.16: Correct date for all day events in negative timezones, improve locale display 0.17: Fixed "Today" and "Tomorrow" labels displaying in non-current weeks 0.18: Correct date in clockinfo for all-day events in negative timezones +0.19: Show full title in clockinfo instead of truncated diff --git a/apps/agenda/agenda.clkinfo.js b/apps/agenda/agenda.clkinfo.js index fe56257b0..a9e371bff 100644 --- a/apps/agenda/agenda.clkinfo.js +++ b/apps/agenda/agenda.clkinfo.js @@ -64,7 +64,7 @@ agenda.forEach((entry, i) => { - var title = entry.title.slice(0,12); + var title = entry.title; // All day events are always in UTC and always start at 00:00:00, so we // need to "undo" the timezone offsetting to make sure that the day is // correct. diff --git a/apps/agenda/metadata.json b/apps/agenda/metadata.json index b841ecaff..bfa529ea5 100644 --- a/apps/agenda/metadata.json +++ b/apps/agenda/metadata.json @@ -1,7 +1,7 @@ { "id": "agenda", "name": "Agenda", - "version": "0.18", + "version": "0.19", "description": "Simple agenda", "icon": "agenda.png", "screenshots": [{"url":"screenshot_agenda_overview.png"}, {"url":"screenshot_agenda_event1.png"}, {"url":"screenshot_agenda_event2.png"}], From e2971e538e6bbdcf373524ed3ef6341860d8ab3d Mon Sep 17 00:00:00 2001 From: Randy Heydon Date: Thu, 19 Jun 2025 15:29:05 -0400 Subject: [PATCH 2/2] agenda: Change clockinfo title truncation to preserve images. The previous commit to remove truncation caused long titles that were not well handled by some clocks. This commit instead uses truncation based on string wrapping, which maintains limited-length titles, but now preserves images (e.g. emojis) embedded in the titles. --- apps/agenda/ChangeLog | 2 +- apps/agenda/agenda.clkinfo.js | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/apps/agenda/ChangeLog b/apps/agenda/ChangeLog index ebbbbebb8..4d2e28096 100644 --- a/apps/agenda/ChangeLog +++ b/apps/agenda/ChangeLog @@ -18,4 +18,4 @@ 0.16: Correct date for all day events in negative timezones, improve locale display 0.17: Fixed "Today" and "Tomorrow" labels displaying in non-current weeks 0.18: Correct date in clockinfo for all-day events in negative timezones -0.19: Show full title in clockinfo instead of truncated +0.19: Change clockinfo title truncation to preserve images diff --git a/apps/agenda/agenda.clkinfo.js b/apps/agenda/agenda.clkinfo.js index a9e371bff..07c48e751 100644 --- a/apps/agenda/agenda.clkinfo.js +++ b/apps/agenda/agenda.clkinfo.js @@ -64,7 +64,7 @@ agenda.forEach((entry, i) => { - var title = entry.title; + var title = g.setFont("6x8").wrapString(entry.title,100)[0]; // All day events are always in UTC and always start at 00:00:00, so we // need to "undo" the timezone offsetting to make sure that the day is // correct.