Skip to content

Backend/emails: Support side-by-side buttons in generic emails#8715

Merged
tristanlabelle merged 5 commits into
developfrom
backend/feature/email-blocks-two-buttons
May 25, 2026
Merged

Backend/emails: Support side-by-side buttons in generic emails#8715
tristanlabelle merged 5 commits into
developfrom
backend/feature/email-blocks-two-buttons

Conversation

@tristanlabelle

@tristanlabelle tristanlabelle commented May 20, 2026

Copy link
Copy Markdown
Contributor

The host request received emails require showing two buttons side by side (view and quick decline). In the generic email system, if we see two "action" blocks in a row, we collapse them into a single "two buttons" block.

  1. Modify blocks.mjml to add a two-buttons block, regenerate its html.
  2. Update the renderer to merge adjacent ActionBlocks into TwoButtonHTMLBlocks (only for HTML emails).
  3. Add slots=True and use asdict

Fixes #8713

Testing

Locally modified an email to add a second action:

        builder.action(donate_link, "donate_action")
        builder.action("https://example.com", "donate_action")
image

Backend checklist

  • Added tests for any new code or added a regression test if fixing a bug
  • Run the backend locally and it works
  • Added migrations if there are any database changes, rebased onto develop if necessary for linear migration history

For maintainers

  • Maintainers can push commits to my branch
  • Maintainers can merge this PR for me

@vercel

vercel Bot commented May 20, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
couchers Ready Ready Preview May 20, 2026 8:22am

Request Review

@tristanlabelle
tristanlabelle marked this pull request as ready for review May 20, 2026 08:28
@tristanlabelle
tristanlabelle requested a review from aapeliv as a code owner May 20, 2026 08:28
@tristanlabelle
tristanlabelle requested review from a team and WouldYouKindly May 20, 2026 08:28
@tristanlabelle
tristanlabelle merged commit 17c1a30 into develop May 25, 2026
9 checks passed
@tristanlabelle
tristanlabelle deleted the backend/feature/email-blocks-two-buttons branch May 25, 2026 17:33
@github-actions

Copy link
Copy Markdown
Contributor

📝 Release Notes

This PR does not need to be included in release notes.

Reason: This is a backend email template improvement to support side-by-side buttons in emails, mainly enabling a better layout for host request emails. While end users may see a small visual improvement, it is a narrow implementation detail rather than a significant new feature, major UX improvement, or important bug fix affecting many users.

🤖 Bot Debug Information

Model: couchers.openai.gpt-5.4
Decision: exclude
Reasoning: This is a backend email template improvement to support side-by-side buttons in emails, mainly enabling a better layout for host request emails. While end users may see a small visual improvement, it is a narrow implementation detail rather than a significant new feature, major UX improvement, or important bug fix affecting many users.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support an email block with two buttons

2 participants