Skip to content

Guides and examples: email providers, i18n, monorepos, MJML and Beefree, upgrading to 0.3 - #71

Open
ivoIturrieta wants to merge 8 commits into
feat/migrate-mjml-beefreefrom
feat/guides
Open

ivoIturrieta wants to merge 8 commits into
feat/migrate-mjml-beefreefrom
feat/guides

Conversation

@ivoIturrieta

@ivoIturrieta ivoIturrieta commented Oct 16, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on the MJML and Beefree importers PR (#70), which is stacked on the 0.3.0 library PR (#69): it shows only the guides and examples. Merge it after both, with its base changed to main first. The repo's tests only run on pull requests into main or develop, so CI starts here once the base is main; until then, the validation below was run locally, with #70's head (which has #69's final head, bc81fd5) merged in.

What

  • Email providers: the content-workflows example sends with 14 providers. Mailgun, Azure, MailerSend, Scaleway, Plunk, Lettermint, Brevo, Inbound and EUSend are added, each tested against mocked endpoints. Guide: email providers.
  • i18n example: one template in English and Arabic with react-intl, react-i18next and next-intl, including right-to-left output. It runs in CI. Guide: translations and right-to-left, written for 0.3 (inline <FormattedMessage>/<Trans> children, right alignment by default in RTL, Tailwind's logical classes following the direction, a class provider such as <IntlProvider> around the root, and an async component failing a synchronous render).
  • Migrating from MJML: leads with npx @unlayer/migrate <dir> --from mjml: what becomes editable blocks, what stays MJML's HTML, includes, MJML 3, what the check compares against. The hand mapping stays, for tuning the output.
  • Migrating from Beefree (new): the JSON it reads, the HTML export to put beside it so the template is checked, ? for unverified, and the declared differences.
  • Upgrading: what changes from 0.2 to 0.3 and what to check (16 items: a part that fails fails the render by default, the text block's markup, images sized in their slot, the editor's base stylesheet, the Provider, right-to-left alignment, async components and a <Suspense> around the template, how the plain text differs, React's ids, migrate's range, …), what else changed (a class component around the root is unwrapped), the new entries (Tailwind's logical classes follow the text direction; Markdown keeps raw HTML to an allowlist), and the 0.1 to 0.2 guide.
  • Monorepos: one Elements copy, React resolution and workspaces (what two copies of React do with 0.3's renderer), previewing with a small render script.
  • No unpublished packages: the guides don't mention the local preview package or the CLI commands that need it.
  • READMEs: point to the Elements skill in unlayer/unlayer-skills, and list @unlayer/migrate as published, with its MJML and Beefree sources. The changelog only gets a line pointing to the upgrade guide (its 0.1.1 to 0.2.1 history is in @unlayer/react-elements 0.3.0: Tailwind, Markdown, code, fonts, async, codegen and editor-parity fixes #69).

Validation

  • The merge of @unlayer/migrate: MJML and Beefree importers (--from mjml|beefree) #70's head had no conflicts. The packages' tests pass on the merged branch (react 1,540, migrate 361, from-react-email 344, convert-core 219, shared 126), and the typechecks are clean.
  • content-workflows: typecheck and 13/13 tests pass. i18n: typecheck and 4/4 pass.
  • A replay of the repo's CI workflow on a clean checkout, the new i18n step included, passes every step.
  • The MJML and Beefree guides' output was checked by running the CLI on the committed fixtures with the merged build (MJML 19 ✓; Beefree 10 ✓ and 7 ?). --strict, includes outside the folder, MJML 3, unknown Beefree versions and the Elements version check were run before the merge, which doesn't change that code; migrate's tests for them pass.
  • Each upgrade item was checked by rendering with 0.2.1 and with 0.3.0 (@unlayer/react-elements 0.3.0: Tailwind, Markdown, code, fonts, async, codegen and editor-parity fixes #69's final head for the ones this update adds: the plain text, a class component around the root, error boundaries, a <Suspense> around the template, Tailwind's logical classes in right-to-left), and so were the i18n and monorepo guides' statements about errors, class providers and two copies of React.
  • Every relative link in the changed docs resolves.

ivoIturrieta and others added 5 commits October 16, 2026 08:02
… i18n example

The content-workflows example adds Mailgun, Azure, MailerSend, Scaleway,
Plunk, Lettermint, Brevo, Inbound and EUSend, each tested against a
mocked endpoint. The new i18n example renders one template in English
and Arabic with react-intl, react-i18next and next-intl, right to left
included, and runs in CI.

Co-Authored-By: Claude Code (Claude Opus 5.5 xhigh) <noreply@anthropic.com>
The monorepo guide previews templates with a small render script, so it
needs nothing that isn't published. The READMEs point to the Elements
skill in unlayer/unlayer-skills, and list @unlayer/migrate as published,
with its MJML and Beefree sources.

Co-Authored-By: Claude Code (Claude Opus 5.5 xhigh) <noreply@anthropic.com>
The MJML guide leads with `--from mjml` (what becomes blocks, what stays
MJML's HTML, includes, MJML 3, what the check compares against), with
the hand mapping kept for tuning. The Beefree guide covers the JSON it
reads, the HTML export to check against, and declared differences. Both
were checked by running the CLI on the committed fixtures.

Co-Authored-By: Claude Code (Claude Opus 5.5 xhigh) <noreply@anthropic.com>
What changes from 0.2 to 0.3 and what to check (the text block's markup,
images sized in their slot, the editor's base stylesheet, the Provider,
right-to-left alignment, migrate's range), and the 0.1 to 0.2 guide.
The changelog points to it.

Co-Authored-By: Claude Code (Claude Opus 5.5 xhigh) <noreply@anthropic.com>
The example runs on Node 20 (its script and test pass there), but the
Azure SDK's packages declare Node 22 or newer, so the guide and the
example's README say to use 22+ to send with Azure.

Co-Authored-By: Claude Code (Claude Opus 5.5 xhigh) <noreply@anthropic.com>
@ivoIturrieta
ivoIturrieta marked this pull request as ready for review October 16, 2026 15:24
ivoIturrieta and others added 3 commits October 17, 2026 12:13
The 0.2 to 0.3 section now says that Elements renders templates with a
renderer of its own (no react-dom in a render, each component run once,
Next.js's server layers and edge runtimes, and the Pages Router edge
route's `unstable_allowDynamic` with webpack), that it checks the
installed React (`UNLAYER_SKIP_REACT_CHECK=1`), that a part that fails
throws a `RenderError` by default (`onError` and `omitted` to leave it
out), that async and suspending components fail the synchronous
renderers, and that `useId()` gives React's own ids, with `idPrefix`
among what's new. A Row that doesn't fit its layout fails the render
now, where the guide said it was left out.

Co-Authored-By: Claude Code (Claude Opus 5.5 xhigh) <noreply@anthropic.com>
Co-Authored-By: Claude Code (Claude Opus 5.5 xhigh) <noreply@anthropic.com>
The upgrade guide gives React 18.0 to 18.3 as supported, says that a render
throws by default and that error boundaries don't catch, what a <Suspense>
around the template does, how the plain text differs from 0.2's, that a class
component around the root is unwrapped, and, under what's new, that Tailwind's
logical classes follow the text direction and that Markdown keeps raw HTML to
an allowlist. The i18n guide says an async component fails the render and that
a class provider's root settings are read; the monorepo guide says what two
copies of React do now that Elements renders without react-dom.

Co-Authored-By: Claude Code (Claude Opus 5.5 xhigh) <noreply@anthropic.com>

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant