Skip to content

feat: add conversational style emails for some notifications#1886

Draft
kolaente wants to merge 14 commits intomainfrom
feat-conversational-emails
Draft

feat: add conversational style emails for some notifications#1886
kolaente wants to merge 14 commits intomainfrom
feat-conversational-emails

Conversation

@kolaente
Copy link
Member

No description provided.

@tink-bot tink-bot force-pushed the feat-conversational-emails branch from 84b2b78 to 3559686 Compare March 3, 2026 14:38
kolaente added 14 commits March 5, 2026 13:24
- Add new conversational HTML template without Vikunja logo
- Use GitHub color palette (#f6f8fa, #0969da, #24292f, #d1d9e0)
- Implement system fonts (-apple-system, BlinkMacSystemFont)
- Set max-width 700px with proper padding
- Add inline action links with arrow (→) instead of buttons
- Include proper footer styling with conditional borders
- Maintain backward compatibility with existing formal template
- Add Conversational() method to Mail struct for template selection
- Add IsConversational() method for testing conversational flag
- Implement CreateConversationalHeader() for GitHub-style header lines
- Header format: {Username} {action} ({Project} > {Task})
- Use GitHub blue color (#0969da) for task links
- Add proper margin and styling for conversational headers
- Add tests for conversational flag functionality
- Test template selection logic (conversational vs formal)
- Verify GitHub-style header line format and styling
- Test action link font size consistency (14px)
- Add translation system integration tests
- Ensure backward compatibility with existing formal emails
- Test footer rendering and action link styling
- Add GetAvatarURL() method to User model
- Support configurable avatar sizes with 20px default for emails
- Use ServicePublicURL config for full avatar URLs
- Fallback to relative URLs when public URL not configured
- Prepare foundation for avatar integration in email headers
- Add action translation keys for conversational notifications
- Include keys for comments, mentions, and assignments
- Add fallback translation for project names
- Support parameterized translations for assigned user names
- Prepare for full internationalization of conversational emails

Translation keys added:
- notifications.common.actions.left_comment
- notifications.common.actions.mentioned_you_comment
- notifications.common.actions.mentioned_you
- notifications.common.actions.mentioned_you_new_task
- notifications.common.actions.assigned_you
- notifications.common.actions.assigned_themselves
- notifications.common.actions.assigned_user
- notifications.common.fallbacks.project
- Update TaskCommentNotification to use conversational template
- Update TaskAssignedNotification for all assignment scenarios
- Update UserMentionedInTaskNotification for mentions and new tasks
- Replace hard-coded strings with i18n translation keys
- Add project title fetching with translated fallbacks
- Generate GitHub-style header lines for all interactive notifications
- Maintain formal style for system notifications (unchanged)

Interactive notifications now use:
- Conversational email template (no logo, GitHub styling)
- Translated action descriptions
- Project context in header lines
- Consistent 14px font sizing
- Document GitHub-inspired design requirements
- Specify dual template system (formal vs conversational)
- Define color palette and typography standards
- Outline notification categorization (interactive vs system)
- Include implementation guidelines and examples
- Provide visual comparison between email styles
- Add Project field to TaskCommentNotification, TaskAssignedNotification,
  and UserMentionedInTaskNotification structs
- Populate Project when creating notifications in listeners
- Remove project fetching from ToMail methods
- Remove unused fallback translation key
- Remove unused db import from notifications.go
- Remove extra blank lines in mail.go (gofmt)
- Use require.NoError instead of assert.NoError in mail_test.go (testifylint)
The TaskCommentNotification now requires a Project field for
conversational email headers. Add project lookup in test setup
to prevent nil pointer dereference.
@tink-bot tink-bot force-pushed the feat-conversational-emails branch from 3559686 to acb1af2 Compare March 5, 2026 12:25
@github-actions
Copy link

github-actions bot commented Mar 5, 2026

Preview Deployment

Preview deployments for this PR are available at:

URL Tag Commit
https://pr-1886.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:pr-1886 latest
https://sha-acb1af22b500464c1223ba611ca1dacedf27f948.preview.vikunja.dev ghcr.io/go-vikunja/vikunja:sha-acb1af22b500464c1223ba611ca1dacedf27f948 acb1af2

The preview environment will start automatically on first visit. Subsequent pushes to this PR will update the pr-1886 image — the preview picks up the new version on restart. The per-commit URLs point to a specific version and will not change.

Run locally with Docker
docker pull ghcr.io/go-vikunja/vikunja:pr-1886
docker run -p 3456:3456 ghcr.io/go-vikunja/vikunja:pr-1886

Last updated for commit acb1af2

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