From ae19812d86d3341668aca5af73bde4398d26a1c3 Mon Sep 17 00:00:00 2001 From: Krzysztof Polak Date: Sat, 14 Feb 2026 10:42:08 +0100 Subject: [PATCH 1/2] refactor: align template block names to group Standardize block type naming from section to group in TypeScript template and Slack mapping code to match builder conventions. Co-authored-by: Cursor --- .../services-local/slack-template-service.ts | 16 ++++++++-------- src/templates/emails/contact-form/config.ts | 4 ++-- src/templates/emails/inventory-level/config.ts | 6 +++--- src/templates/emails/order/completed/config.ts | 12 ++++++------ src/templates/emails/order/placed/config.ts | 12 ++++++------ src/templates/emails/order/updated/config.ts | 12 ++++++------ 6 files changed, 31 insertions(+), 31 deletions(-) diff --git a/src/modules/mpn-builder/services-local/slack-template-service.ts b/src/modules/mpn-builder/services-local/slack-template-service.ts index 4e82eed..d403a5c 100644 --- a/src/modules/mpn-builder/services-local/slack-template-service.ts +++ b/src/modules/mpn-builder/services-local/slack-template-service.ts @@ -341,14 +341,14 @@ export class SlackTemplateService extends BaseTemplateService { break } - case "group": { - // group → flatten children blocks - if (children.length > 0) { - const transformedChildren = this.transformBlocksForRendering(children) - result.push(...transformedChildren) - } - break - } + // case "group": { + // // group → flatten children blocks + // if (children.length > 0) { + // const transformedChildren = this.transformBlocksForRendering(children) + // result.push(...transformedChildren) + // } + // break + // } case "repeater": { // repeater → keep structure for later processing during interpolation diff --git a/src/templates/emails/contact-form/config.ts b/src/templates/emails/contact-form/config.ts index da7710a..213b10a 100644 --- a/src/templates/emails/contact-form/config.ts +++ b/src/templates/emails/contact-form/config.ts @@ -16,7 +16,7 @@ export const translations: Record = { */ export const templateBlocks = [ { - type: "section", + type: "group", id: "section-1", props: { blocks: [ @@ -35,7 +35,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-1", props: { blocks: [ diff --git a/src/templates/emails/inventory-level/config.ts b/src/templates/emails/inventory-level/config.ts index cd835ec..a02207a 100644 --- a/src/templates/emails/inventory-level/config.ts +++ b/src/templates/emails/inventory-level/config.ts @@ -14,7 +14,7 @@ export const translations: Record = { */ export const templateBlocks = [ { - type: "section", + type: "group", id: "section-1", props: { blocks: [ @@ -40,7 +40,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-2", props: { blocks: [ @@ -116,7 +116,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-3", props: { blocks: [ diff --git a/src/templates/emails/order/completed/config.ts b/src/templates/emails/order/completed/config.ts index e55f05c..ca3d948 100644 --- a/src/templates/emails/order/completed/config.ts +++ b/src/templates/emails/order/completed/config.ts @@ -14,7 +14,7 @@ export const translations: Record = { */ export const templateBlocks = [ { - type: "section", + type: "group", id: "section-1", props: { blocks: [ @@ -40,7 +40,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-2", props: { blocks: [ @@ -85,7 +85,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-3", props: { blocks: [ @@ -124,7 +124,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-4", props: { blocks: [ @@ -152,7 +152,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-5", props: { blocks: [ @@ -212,7 +212,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-6", props: { blocks: [ diff --git a/src/templates/emails/order/placed/config.ts b/src/templates/emails/order/placed/config.ts index 4c197e1..ba6848c 100644 --- a/src/templates/emails/order/placed/config.ts +++ b/src/templates/emails/order/placed/config.ts @@ -14,7 +14,7 @@ export const translations: Record = { */ export const templateBlocks = [ { - type: "section", + type: "group", id: "section-1", props: { blocks: [ @@ -40,7 +40,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-2", props: { blocks: [ @@ -85,7 +85,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-3", props: { blocks: [ @@ -124,7 +124,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-4", props: { blocks: [ @@ -152,7 +152,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-5", props: { blocks: [ @@ -212,7 +212,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-6", props: { blocks: [ diff --git a/src/templates/emails/order/updated/config.ts b/src/templates/emails/order/updated/config.ts index f0811bc..81e453c 100644 --- a/src/templates/emails/order/updated/config.ts +++ b/src/templates/emails/order/updated/config.ts @@ -14,7 +14,7 @@ export const translations: Record = { */ export const templateBlocks = [ { - type: "section", + type: "group", id: "section-1", props: { blocks: [ @@ -40,7 +40,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-2", props: { blocks: [ @@ -85,7 +85,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-3", props: { blocks: [ @@ -124,7 +124,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-4", props: { blocks: [ @@ -152,7 +152,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-5", props: { blocks: [ @@ -212,7 +212,7 @@ export const templateBlocks = [ type: "separator", }, { - type: "section", + type: "group", id: "section-6", props: { blocks: [ From a13023dda28af5c365ca0a99d229467eadc676c0 Mon Sep 17 00:00:00 2001 From: Krzysztof Polak Date: Sat, 14 Feb 2026 10:55:15 +0100 Subject: [PATCH 2/2] chore: add chanegset --- .changeset/eight-mammals-double.md | 5 +++++ 1 file changed, 5 insertions(+) create mode 100644 .changeset/eight-mammals-double.md diff --git a/.changeset/eight-mammals-double.md b/.changeset/eight-mammals-double.md new file mode 100644 index 0000000..60ba7be --- /dev/null +++ b/.changeset/eight-mammals-double.md @@ -0,0 +1,5 @@ +--- +"@codee-sh/medusa-plugin-notification-emails": patch +--- + +Rename blocks type