Skip to content

feat(email): replace unicode checkmark with inline PNG image#172

Merged
rubenhensen merged 1 commit into
mainfrom
email-inline-checkmark
Jun 4, 2026
Merged

feat(email): replace unicode checkmark with inline PNG image#172
rubenhensen merged 1 commit into
mainfrom
email-inline-checkmark

Conversation

@rubenhensen

Copy link
Copy Markdown
Contributor

Summary

  • Replace the unicode ✓ glyph inside the signer-verified circle with an inline PNG attachment referenced via cid:pg-check
  • Embed templates/email/check.png (matches the checkmark used on the download page) into the multipart/related body alongside the existing pg-logo
  • Render quality is now consistent across mail clients that previously styled the unicode glyph differently

Test plan

  • cargo check / cargo build succeeds
  • Send a staging email and confirm the checkmark renders inside the circle in Gmail, Outlook, and Apple Mail
  • Plain-text alternative is unaffected

The signer-verified circle previously rendered a unicode `✓`
glyph which is styled inconsistently across mail clients. Embed a
PNG of the PostGuard checkmark via `cid:pg-check` to match the
shape used in the download page UI.
@dobby-coder

dobby-coder Bot commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Dobby has received the request! Routing to the right specialist now...

@dobby-coder dobby-coder Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code review

Inline PNG checkmark via cid:pg-check cleanly mirrors the existing pg-logo attachment pattern; build, clippy, and the email test suite (27/27) all pass.

Rule compliance

[WCAG 2.2 AA] alt="" marks the checkmark as decorative — the previous unicode glyph was announced as "check mark" by some screen readers. Defensible because the surrounding files_from/sender_email copy carries the "verified signer" meaning, but alt="verified" would preserve the signal more cleanly. Non-blocking.

<div style="margin-bottom:12px;">
<span style="display:inline-block;width:32px;height:32px;line-height:32px;border-radius:50%;border:2px solid #5F7381;text-align:center;font-size:16px;color:#5F7381;box-sizing:border-box;">&#10003;</span>
<span style="display:inline-block;width:32px;height:32px;line-height:32px;border-radius:50%;border:2px solid #5F7381;text-align:center;box-sizing:border-box;">
<img src="cid:pg-check" alt="" width="16" height="13" style="display:inline-block;vertical-align:middle;" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Code review] [Rule: wcag-aa-compliance] alt="" makes the checkmark decorative; the previous &#10003; was announced as "check mark" by some screen readers. Consider alt="verified" to preserve the signer-verified signal. Defensible as-is since the surrounding copy carries the meaning.

<div style="margin-bottom:12px;">
<span style="display:inline-block;width:32px;height:32px;line-height:32px;border-radius:50%;border:2px solid #5F7381;text-align:center;font-size:16px;color:#5F7381;box-sizing:border-box;">&#10003;</span>
<span style="display:inline-block;width:32px;height:32px;line-height:32px;border-radius:50%;border:2px solid #5F7381;text-align:center;box-sizing:border-box;">
<img src="cid:pg-check" alt="" width="16" height="13" style="display:inline-block;vertical-align:middle;" />

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Code review] Source PNG is 128×107 (~1.196) but rendered at 16×13 (~1.231) — minor horizontal stretch. Either render at 16×14 or crop the source. Sub-pixel at display size, likely imperceptible.

@rubenhensen rubenhensen merged commit 313bd8b into main Jun 4, 2026
7 checks passed
@rubenhensen rubenhensen deleted the email-inline-checkmark branch June 4, 2026 11:31
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