Rename digest keys Popular/HasPopular → Latest/HasLatest #7
Loading…
Reference in a new issue
No description provided.
Delete branch "mailship-hq0-rename-stale-digest-template-keys-popula-194"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
mailship-hq0
The
buildParametersmethod returns events sorted newest-first (bycreated_at,slice(0,100)), and the.mjmlsection already displays them under the heading "Latest Activity". The object keysPopular/HasPopularno longer describe what they hold, so this PR renames them toLatest/HasLatest.Changes
src/digest.ts— rename return keysPopular→LatestandHasPopular→HasLatestinbuildParameters.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 useHasLatest/Latestso the preview script stays in sync.How to test
Run
pnpm run preview:digestand opendigest-preview.htmlto confirm the template still renders correctly.