Skip to content

Edit the font import in the panel, mark changed heading styles, drop the title and preview panels - #645

Merged
pierre-b merged 2 commits into
devfrom
feat/email-editor-panel-leftovers
Nov 18, 2026
Merged

pierre-b merged 2 commits into
devfrom
feat/email-editor-panel-leftovers

Conversation

@pierre-b

Copy link
Copy Markdown
Contributor

Follow-up of #642: the three points it left out. Console only.

Font import edited in the panel

  • The « Edit Font Import » popover is gone: the panel shows a popular Google Font picker, the font name and the stylesheet, each written on blur or Enter (one undo step per edit; picking a popular font writes the name and the stylesheet in one step).
  • The stylesheet must be an http(s) address (protocol-relative included) or a Liquid output; javascript:, data:, mailto: and relative addresses stay in the field, in red, and are not written. The link button opens a web address only (fontStylesheetUrl).
  • A warning stays visible while the name or the stylesheet is missing. An emptied field keeps the saved value; a font import is removed by deleting the block.

Heading styles show what changed

  • A dot and a per-row reset on the rows of the chosen level that differ from its defaults (the reset writes the level's default back and says so: « Reset … to the default value »).
  • A dot on the levels H1–H6 that differ; « Reset Hn » only for a changed level; the closed Headings section counts the changed fields.
  • Numbers and pixel lengths are compared by value (0 and 0px, 1.30 and 1.3), colours by their hex.

No panel for mj-title and mj-preview

The server rewrites both blocks from the template's subject and preview text on every save (updateEmailMetadataBlocks in internal/service/template_service.go), and both editors that show the email tree (CreateTemplateDrawer, TemplateTranslationsTab) hide them, so an edit made in their panel would not last. The blocks stay; their panel components and strings are removed.

Checks

  • tsc, eslint src, the full console suite and vite build pass on the branch merged with dev.
  • New tests checked by mutation (each one fails when its line is reverted).
  • Browser pass in Chrome on an imported email: font picker and undo, refused stylesheet and Escape, warning on a new empty font block, heading dots, row reset, level dots and the section count.

…the title and preview panels

The font import is edited in the settings panel instead of a popover: a
popular Google Font fills in the name and the stylesheet in one step, the
name and the stylesheet are written on blur, and a stylesheet must be an
http(s) address or a Liquid output. A warning stays visible while the name
or the stylesheet is missing.

Heading styles show which rows and levels differ from their defaults, with
a reset per row; « Reset Hn » appears only for a changed level, and the
closed Headings section counts the changed fields.

mj-title and mj-preview have no panel any more: the server rewrites both
blocks from the template's subject and preview text on every save, and the
editors that show the email tree hide them.
@codecov

codecov Bot commented Nov 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 90.46%. Comparing base (bec5eb3) to head (9062d68).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #645   +/-   ##
=======================================
  Coverage   90.46%   90.46%           
=======================================
  Files         391      391           
  Lines       76560    76560           
=======================================
+ Hits        69258    69260    +2     
+ Misses       4742     4741    -1     
+ Partials     2560     2559    -1     
Flag Coverage Δ
unit 90.46% <ø> (+<0.01%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@pierre-b
pierre-b merged commit 182137b into dev Nov 18, 2026
14 checks passed
@pierre-b
pierre-b deleted the feat/email-editor-panel-leftovers branch November 18, 2026 19:41
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