Skip to content

Redesign the email editor's settings panel - #642

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

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

Conversation

@pierre-b

Copy link
Copy Markdown
Contributor

Redesign of the right-hand settings panel of the visual email editor, in the Nuit claire theme. Console only: no Go, API or migration change.

What changes

  • Panel: no block header; the display condition comes first, as a sentence strip (« Shown if contact.first_name is true ») with its result on the test data; then collapsible sections that show a summary of their values and the count of set fields when closed. A section the user toggles stays so for the next block of the same type.
  • Set and inherited values: a field whose value differs from the inherited one (the type's mj-attributes, then the editor's MJML defaults; for a social element, what its mj-social passes) shows a dot and a reset that writes the inherited value back. Unset fields show the inherited value as their placeholder.
  • Help: every help line, tip box and bound moves into an info icon with a tooltip; only warnings and errors stay visible.
  • Field kit (ui/fields/): number with unit, segmented controls, corners, spacing box (with the button's inner padding nested), border, colour (the email's own colours first), font, background, and a draft text field that replaces the « Set value » popovers.
  • Undo steps: texts and links are written on blur or Enter (Escape reverts), one undo step per edit; typed numbers coalesce into one step per focus. Every write goes into the block as it is in the email now, so a change made meanwhile (AI assistant) is kept.

Fixes along the way

  • An image background keeps its colour as a fallback (it was cleared, leaving Outlook with no background).
  • Inherited values: Section, Social and Social element read this.getDefaults() instead of mj-attributes; Button, Image, Divider showed « center » whatever was inherited.
  • Unset paddings and imported padding shorthands showed 0.
  • The root mjml panel showed « TODO »: selecting it now shows the empty state.
  • Button and image get target, rel and title; a social element gets a Label field (its content) and a custom icon on any network; « Twitter » leaves the list for new elements.
  • Liquid examples inside messages ({{ url }}, {{ variable }}) rendered as « {} »; also in the font import popover.
  • es: the « Cover » background size was translated « Portada ».

Behaviour changes worth knowing

  • Typing 0 now writes 0px (it wrote nothing).
  • Column width is a number with % or px (it was free text).
  • A reset writes the inherited value explicitly rather than removing the attribute: the canvas falls back on the editor's defaults and the sent email on MJML's, which differ.
  • ColorPickerWithPresets, StringPopoverInput, PaddingInput, BorderInput, BorderRadiusInput, BackgroundInput, FontStyleInput, AlignSelector, WidthInput, WidthPxInput, HeightInput, InputLayout and PanelLayout are replaced by the kit and deleted.

Known limits

  • The font import keeps its popover; heading styles have no set dots.
  • mj-title and mj-preview panels exist but are not reachable in the editor (imported titles and preview texts go to the template settings).

Checks

  • tsc, eslint src, the full console suite and vite build pass.
  • Browser pass in Chrome over every reachable block type (button, section, text, column, image, divider, spacer, social, social element, body, wrapper, group, raw HTML, Liquid, font, CSS, breakpoint, default attributes, display condition); it found and fixed a focus loss in the link field (antd remounts an Input whose suffix appears or disappears) and the « {} » rendering.

Docs: Notifuse/docs#70 (to merge with this PR). The editor screenshot of the docs will be retaken after the merge.

The right-hand panel of the visual editor is rebuilt on a shared field kit
in the Nuit claire theme: collapsible sections that summarise their values,
a dot and a reset on fields whose value differs from the inherited one, help
in info tooltips, the display condition as a sentence strip, and a colour
picker that offers the email's own colours first.

Texts and links are typed in place and written on blur or Enter, so a word
is one undo step; typed numbers coalesce into one step per focus. Writes go
into the block as it is in the email now, so a change made meanwhile (AI
assistant) is kept.

Also fixed: an image background keeps its colour as a fallback; inherited
values come from mj-attributes (and, for a social element, from its
mj-social); unset or shorthand paddings no longer show 0; the root panel's
« TODO » is gone; button and image get target, rel and title; a social
element gets a label field and a custom icon on any network; Liquid
examples in messages no longer render as « {} ».
@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.47%. Comparing base (32b8bf6) to head (33b481c).

Additional details and impacted files
@@           Coverage Diff           @@
##              dev     #642   +/-   ##
=======================================
  Coverage   90.46%   90.47%           
=======================================
  Files         390      390           
  Lines       76569    76569           
=======================================
+ Hits        69271    69274    +3     
+ Misses       4740     4738    -2     
+ Partials     2558     2557    -1     
Flag Coverage Δ
unit 90.47% <ø> (+<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 b0c53d0 into dev Nov 18, 2026
14 checks passed
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