From ff743e484fd4d40dfdb479d56d0132980e039955 Mon Sep 17 00:00:00 2001 From: Alexander Bocken Date: Fri, 15 May 2026 13:01:41 +0200 Subject: [PATCH] Limit detailed view to lineal kin; rest as summary bullets MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Per-recipient: only direct ancestors and direct descendants within a configurable number of generations (default 3) get the full row treatment (avatar, icon, timeline). Everyone else falls through to a compact text-only bullet list at the bottom of the same section. - New tree preference NEWSLETTER_LINEAL_DEPTH (range 0–10, default 3) with a clearly-explained admin input. - RelationshipPathFinder::linealKin() does two cheap recursive expansions (ancestors and descendants only — no spouse or sibling traversal) and returns the xref set. Memoised per recipient within a dispatch run. - Avatar attachments are filtered per recipient to only the embeds actually referenced in their HTML, so summary-only rows no longer inflate per-email size with unused images. - Recipients with no PREF_TREE_ACCOUNT_XREF (external admin addresses, users not linked to a record) see the entire newsletter in detail — no lineal anchor to filter against. - German translations for the three new section kickers ("Other birthdays", etc.) and the admin input help text. --- resources/views/admin.phtml | 17 ++ resources/views/email.phtml | 195 ++++++++++++++++----- src/Configuration.php | 11 ++ src/Module.php | 10 ++ src/Services/NewsletterDispatchService.php | 75 +++++++- src/Services/RelationshipPathFinder.php | 74 ++++++++ 6 files changed, 339 insertions(+), 43 deletions(-) diff --git a/resources/views/admin.phtml b/resources/views/admin.phtml index 0ccd005..44d6ea9 100644 --- a/resources/views/admin.phtml +++ b/resources/views/admin.phtml @@ -47,6 +47,7 @@ use Illuminate\Support\Collection; $annivs = Configuration::includeAnniversaries($tree); $subject = Configuration::subjectPrefix($tree); $extras = $tree->getPreference(Configuration::PREF_EXTRA_RECIPIENTS, ''); + $lineal = Configuration::linealDepth($tree); $last_sent = Configuration::lastSentAt($tree); ?> @@ -129,6 +130,22 @@ use Illuminate\Support\Collection; +
+ +
+ + + + +
+
+