Rename digest keys Popular/HasPopular → Latest/HasLatest #7

Merged
matt merged 1 commit from mailship-hq0-rename-stale-digest-template-keys-popula-194 into main 2026-09-14 17:05:53 +00:00
Collaborator

mailship-hq0

The buildParameters method returns events sorted newest-first (by created_at, slice(0,100)), and the .mjml section already displays them under the heading "Latest Activity". The object keys Popular / HasPopular no longer describe what they hold, so this PR renames them to Latest / HasLatest.

Changes

  • src/digest.ts — rename return keys Popular → Latest and HasPopular → HasLatest in buildParameters.
  • src/emails/digest.mjml — update Mustache tags {{#HasPopular}} / {{#Popular}} / {{/Popular}} / {{/HasPopular}} to mirror the new names.
  • script/render-preview.mjs — update the sample fixture data to use HasLatest / Latest so the preview script stays in sync.

How to test

Run pnpm run preview:digest and open digest-preview.html to confirm the template still renders correctly.

mailship-hq0 The `buildParameters` method returns events sorted newest-first (by `created_at`, `slice(0,100)`), and the `.mjml` section already displays them under the heading "Latest Activity". The object keys `Popular` / `HasPopular` no longer describe what they hold, so this PR renames them to `Latest` / `HasLatest`. **Changes** - `src/digest.ts` — rename return keys `Popular` → `Latest` and `HasPopular` → `HasLatest` in `buildParameters`. - `src/emails/digest.mjml` — update Mustache tags `{{#HasPopular}}` / `{{#Popular}}` / `{{/Popular}}` / `{{/HasPopular}}` to mirror the new names. - `script/render-preview.mjs` — update the sample fixture data to use `HasLatest` / `Latest` so the preview script stays in sync. **How to test** Run `pnpm run preview:digest` and open `digest-preview.html` to confirm the template still renders correctly.
hudson added 1 commit 2026-09-14 17:01:26 +00:00
The buildParameters function returns events sorted newest-first
(sortBy created_at, slice(0,100)), and the mjml section is already
labeled 'Latest Activity'. The object keys Popular/HasPopular no
longer reflect the semantics, so rename them to Latest/HasLatest.
matt approved these changes 2026-09-14 17:05:50 +00:00
matt merged commit f3ccade029 into main 2026-09-14 17:05:53 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference: matt/mailship#7
No description provided.