Style every email with OPEN branding and the OPEN logo

Open
#306 4 comments 0 reactions 0 assignees View on GitHub

Maintainers usually reply within 1 day

Nobody has claimed this yet.

Assessment

Difficulty
5/5
Estimated time
Over a week
Newbie friendliness
35/100
Issue type
Feature
Clarity
Mostly clear
Activity status
Active
Tech stack
html, python
Domain
frontend

Research direction

Read the Email section of CLAUDE.md, ADR 0016, ADR 0041, and the related issue #36 to understand the existing email rules and decisions. Inspect templates/emails/base_message.html, templates/emails/action_link.html, the match email templates, and apps/emails/tests/hygiene.py. First resolve the listed logo, font, and permission decisions in an ADR; done means every email meets the stated branding and hygiene criteria, with rendering and contrast checked across the named clients.

Written by the indexing model from the issue text.

Description

area:email enhancement priority:p2 size:M

Context: OPEN's emails use a placeholder style that does not follow the OPEN brand in openpickleball/brand-assets. The shared layout (templates/emails/base_message.html) has a white background, #1a1a1a text, Arial, and the word "OPEN" in bold plain text with no logo. The action button (templates/emails/action_link.html) and the match tables use a green (#1a5c38) and grays (#555555, #dddddd) that are not in the brand palette. Every email OPEN sends should look like OPEN: the allauth account emails (verification, password reset, account already exists) and the match emails (confirmation request, dispute, hold, and recorded match notices).

The brand assets define:

  • The ivory palette (colors.json): background #f7f3e8, text #17150f, muted #4d493f, line #d8d1bf, faint #6c6658, surface #fcfaf3. There is also a black palette.
  • The OPEN mark (logo/), as SVG in white, black, ivory, and ink. Use ink or black on an ivory background. Keep clear space of at least a quarter of the mark's width, and do not stretch, rotate, or recolor it.
  • The wordmark in Krona One, uppercase, with letter spacing of about 0.1em. Headlines and body text use Instrument Sans.

What blocks the logo today: the email rules from #36 (CLAUDE.md, Email) forbid images and external stylesheets and fonts, and apps/emails/tests/hygiene.py refuses <img, src=, url(, <link, and @import. Adding the logo means relaxing those rules on purpose, in an ADR. The rules exist so emails carry no tracking and leak nothing about the reader, so the new rule must keep that.

Decisions needed:

  • How to include the logo. Options:
    • A PNG of the mark at a fixed, public, cacheable URL on an OPEN domain (for example on openpb.org). Same URL for every recipient, with no query string and no per-message value, so loading it reveals nothing beyond what any remote image does. Many clients block remote images until the reader allows them, so it needs alt="OPEN" and a layout that still reads well without it.
    • An inline attachment (CID). Shows without a remote load in most clients, but queue_email() refuses attachments today, and it makes every message larger.
    • No image: the wordmark as styled live text only. Meets the current rules but does not show the mark.
  • Fonts. Most email clients ignore web fonts, and loading them breaks the no-external-fonts rule. The suggestion is font stacks that name 'Krona One' and 'Instrument Sans' first, with Arial and Helvetica after, and no @font-face.
  • Whether the brand-assets permission note ("Use of the name and logo needs permission until brand guidelines are published") needs an explicit OK for OPEN's own emails.

Tasks:

  • Record the decisions above in an ADR that amends the #36 email rules (and ADR 0016 if the attachment route is chosen)
  • Restyle templates/emails/base_message.html with the ivory palette, the logo or wordmark at the top, and the brand font stacks
  • Restyle templates/emails/action_link.html (button in ink on ivory, or as the ADR decides) and the match email tables to use brand colors only
  • Check templates/emails/base_message.txt keeps the "OPEN" heading so text-only readers see the same name
  • Update apps/emails/tests/hygiene.py to allow exactly the approved logo (one fixed URL or one CID) and still refuse every other image, script, stylesheet, font, and link
  • Check color contrast for text and the button meets WCAG AA on the ivory background
  • Check rendering in the common clients (Gmail web and app, Apple Mail, Outlook), including with images blocked and in dark mode
  • Update the Email section of CLAUDE.md
  • Tests

Acceptance criteria:

  • Every HTML email OPEN sends uses only brand palette colors and shows the OPEN mark (or the wordmark, if the ADR decides against an image)
  • No template hardcodes a color outside the brand palette
  • The hygiene checks pass on every template and every rendered message, and still fail on any other image, remote resource, or link outside FRONTEND_URL
  • An email with images blocked still shows "OPEN" and reads cleanly
  • Text versions are unchanged apart from their content

Related: #36 (email template rules), #35, ADR 0016, ADR 0041

Size: M

Dominant language
Python
Stars
0
Forks
1
Avg merge
1h 7m
Merged PRs (30d)
206

Getting set up

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from openpickleball/backend

All issues in openpickleball/backend

Similar issues

More Python issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.