Skip to content

feat: social icons take a tone, separate from their shape - #860

Open
desheikh wants to merge 1 commit into
templatical:mainfrom
desheikh:feat/social-icon-color
Open

desheikh wants to merge 1 commit into
templatical:mainfrom
desheikh:feat/social-icon-color

Conversation

@desheikh

@desheikh desheikh commented Oct 7, 2026 •

Copy link
Copy Markdown
Contributor

Summary

Social icons always use each platform's brand color, so there's no way to get one-color icons, like dark icons in a footer or white icons on a colored band. This adds a color choice, separate from the shape, much like Mailchimp's social block.

  • iconStyle (the shape) gains "plain": just the glyph, no badge.
  • iconTone is new and optional: "brand" (the default), "dark" or "light".

The editor shows them as two selects, Style and Color.

brand (default) dark light
solid, rounded, square, circle brand badge, white glyph (today) dark badge, white glyph white badge, dark glyph
outlined brand outline (today) dark outline white outline
plain (new) glyph in brand color dark glyph white glyph

Existing templates and icon URLs don't change. The existing PNGs are generated byte-for-byte as today.

Linked issues

n/a

Type of change

  • New feature (non-breaking change that adds functionality)

Affected packages

  • @templatical/editor
  • @templatical/types
  • @templatical/renderer
  • apps/docs

Also touched: @templatical/import-mjml and @templatical/import-topol (they read the new tone), @templatical/template-tools and skills/templatical (regenerated schema).

Checklist

  • Tests added or updated (and they fail without my change)
  • pnpm run ci passes locally (lint + typecheck + build + test)
  • pnpm run test:e2e passes (only if this PR touches editor UI)
  • Docs updated — both apps/docs/<page>.md and apps/docs/de/<page>.md if user-facing
  • i18n keys added to both en.ts and de.ts if I added new strings
  • Changeset added (pnpm exec changeset)
  • PR title is descriptive and follows the existing convention

Notes for reviewers

  • Package size: every style in every tone is 306 PNGs, about 1.9 MB (today it's 85 PNGs, 540 KB). The PNGs are generated at build time, not committed.
  • Self-hosting: a tone's icons live at {style}-{tone}/{platform}.png. Anyone self-hosting icons through socialIconsBaseUrl needs to copy the new folders; the changeset says so.
  • Naming: it's iconTone, not iconColor, because every other *Color field holds a CSS color and the editor's palette check treats them that way.
  • Shared rules: the colors, glyph size and icon folder names live in @templatical/types, so the editor, the renderer and the PNG build can't drift apart.
  • Importers: the MJML importer reads a tone back from its folder, and Topol's black-and-white outlinedbw set now imports as outlined + dark.
  • Testing: I checked every combination by eye on light and dark backgrounds, and in Chrome an email with all of them loads every icon. Lint, typecheck and the suites pass locally; I haven't run pnpm run ci or e2e.

🤖 Generated with Claude Code

@desheikh
desheikh force-pushed the feat/social-icon-color branch from 619e4d8 to 26b7bd4 Compare October 7, 2026 04:10
iconStyle mixed shape with how color is applied, and a one-color icon had
no place in it. SocialIconsBlock gains an optional iconTone ("brand", the
default and what an absent value means, or "dark" or "light"), and
iconStyle gains "plain", the glyph alone. The editor shows them as Style
and Color.

It's iconTone rather than iconColor because every *Color field in the
block model holds a CSS color, and the editor's palette check reads them
that way.

The colors, glyph size and PNG folder names live in @templatical/types,
shared by the editor's inline SVG, the renderer and the PNG build, which
now writes every style in every tone. Brand-colored icons keep their URLs
and bytes. The MJML importer reads a tone back from its folder, and
Topol's outlinedbw set imports as outlined in dark.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@desheikh
desheikh force-pushed the feat/social-icon-color branch from 26b7bd4 to b140d24 Compare October 7, 2026 04: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