Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor Campaigns and Templates to allow transactional emails, automations, and A/B tests #355

Open
7 tasks
wmnnd opened this issue Dec 4, 2024 · 0 comments
Assignees
Labels
enhancement New feature or request

Comments

@wmnnd
Copy link
Contributor

wmnnd commented Dec 4, 2024

Current situation

At the moment, all email content is stored directly attached to a specific campaign. Templates only define certain aspects of that email such as the footer or theme colors. This makes it difficult to add A/B tests or one-off emails (i.e. transactional emails or automations)

Solution

The concept of a Template needs to be redefined. In the future, a Template is where email content (text/mjml/html) is stored. In addition to that, Layouts are introduced. Layouts are very similar to Templates but they have a content slot for the Template editor. Layouts can be plain text, html, or mjml. A Template may or may not use a Layout. Templates also include the email subject. HTML layouts are only compatible with HTML templates. MJML templates can be used with the MJML/Block editor as well as the Markdown editor.

Plain Text Example

Plain-text layouts must include the {{ content }} placeholder.

{{ content }}

---
The footer is part of the Layout

MJML Example

MJML Layouts must include the keila-content tag as a child of mj-body.

<mjml>
  <mj-head>
    <mj-attributes>
      <mj-all font-family="Comic Sans MS" />
    </mj-attributes>
  </mj-head>
  <mj-body>
    <keila-content />
    <mj-section>
      <mj-column>
        <mj-text>
          This is a Layout footer in MJML
        </mj-text>
      </mj-column>
    </mj-section>
  </mj-body>
</mjml>

Necessary Steps

  • Existing Templates must be automatically migrated to MJML Layouts or migrated to "LegacyTemplates" for later deprecation.
  • Cerberus layouts are dropped in favor of full MJML support or marked for later deprecation.
  • Block editor needs to be either dropped, replaced with a new MJML editor, or migrated to MJML
  • New MJML editor needs to have read-only support for the layout part of the email
  • Markdown editor needs to be updated to work with MJML
  • Plain text editor needs to be updated to work with Layouts
  • Campaigns and Templates have a many-to-many relationship with potential annotations such as the rate at which they should be used (e.g. template 1 is sent to 30% of recipients, template 2 to 70%)
@wmnnd wmnnd self-assigned this Dec 4, 2024
@github-project-automation github-project-automation bot moved this to Inbox & Ideas in Roadmap to 1.0 Dec 4, 2024
@wmnnd wmnnd added the enhancement New feature or request label Dec 4, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Inbox & Ideas
Development

No branches or pull requests

1 participant