KamoCRM

Signature previews show what the email will actually print

Fixkamo-internal
Shipped
September 24, 2026 at 8:09 AM UTC
Author
Kamo
Commit
0e480d4

**************** drew the live preview and the Header/Signature thumbnails from data that raced itself. It also disagreed with the composer about what a signature prints, and it had a few places where edits leaked or stuck. THE PREVIEWS - The member's and organization's details were COPIED into each scope's stored config once, when they first arrived. The saved template loading afterwards replaced the whole config with blanks. That usually happened, because it is a separate request. So did the organization request landing after the member one, and every switch of source. Which details showed (name, company, social icons) depended on network timing. Nothing is copied now: the store holds only what is saved, and the details are layered on at render time (editorState.ts, composePreviewConfig). - The details now come from buildTemplateContent, the function that fills a composed message. The editor had its own copy, and it differed from the composer three ways. Job title, department and mobile were always blank. The Company and Department previews showed the signed-in member's name, address, phone and social links, which those signatures never print. The Company scope also started from a hard-coded "John Doe" sample. - The thumbnails drew the raw config, so a line switched off in Content still showed on every thumbnail. Both columns now draw the same composed, field-filtered config. - The signature layouts interpolated details unescaped (the header layouts always escaped). "Smith & <Sons>" lost "<Sons>", a quote in a name broke the alt attribute, and org-typed text was live markup. Social and company links typed without a scheme were relative hrefs, and script URLs are dropped. A custom disclaimer keeps its line breaks. - The company signature printed the organization's main number twice: once as its phone and again as "Company Phone (Main)". The two lines now skip a number already printed. This also fixes composed mail, which uses the same renderer. ROBUSTNESS - Dirty tracking compares only what a save writes (mapConfigToBackend), per scope, derived at render time. The old re-snapshot read a stale closure, so Save could light up on load. - "Discard changes" switched source and discarded nothing. Returning showed the edits as if saved, and org-wide toggle edits rode along into the next scope's save. It now restores the saved template and toggles. - "Save & switch" switched even when the save failed. It now switches only on success. - One loading flag served all three scopes. Switching away mid-load and back left the spinner up for good. Loads are now tracked per scope. - A failed template or field-config load showed the defaults, and saving then overwrote the real signature with them. It now shows an error with Retry, and Save stays off. - A badge library that failed to load wiped every uploaded badge from the selection on the next save. The prune now waits for a library that actually loaded. - Legal: "Write custom disclaimer" could not be chosen with an empty box, and clearing the box collapsed it mid-edit. The choice is now stored. - Colour fields wrote partial hex ("#12") straight into the config, and the blur "revert" put back the value it had already overwritten. Typing is held until it is a whole colour; shorthand #abc expands. - Removed the per-render console.log debugging in the preview and the field-toggle handler.

All changes

Like what you see shipping?

All of it arrives in your workspace on its own. Start on the free plan and read this page again in a month.

Start Free ForeverView Pricing