Skip to content

feat: print email#128

Closed
saiththerobo wants to merge 2 commits into
maathimself:mainfrom
saiththerobo:feat/print-email
Closed

feat: print email#128
saiththerobo wants to merge 2 commits into
maathimself:mainfrom
saiththerobo:feat/print-email

Conversation

@saiththerobo
Copy link
Copy Markdown
Contributor

Summary

Adds a print action to the message pane. Clicking the Print button (or pressing Ctrl+P / Cmd+P) opens a clean printable page with the email header (From, To, Cc, Date, Subject) and full body, then triggers the browser print dialog automatically.

Changes

  • frontend/src/components/MessagePane.jsxhandlePrint function, toolbar button with label and ^P kbd hint, Ctrl+P listener wired through paneActionsRef
  • frontend/src/locales/{en,de,es,fr,it,ru,zhCN}.jsonmessage.print key added in all 7 locales

Testing

  • Open any message → click Print → browser print dialog opens with formatted header + body
  • Press Ctrl+P with a message open → same result
  • Press Ctrl+P with no message selected → falls through to browser default
  • Sender name containing & renders correctly in the print view (properly escaped)

Contributor License Agreement

By submitting this pull request I confirm that:

  • I have read and agree to the Contributor License Agreement.
  • My contribution is my own original work (or I have identified any
    third-party material and confirmed it is compatible with the CLA).
  • I have the right to submit this contribution under the terms of the CLA.

Adds a print button to the message pane toolbar and a Ctrl+P / Cmd+P
keyboard shortcut. Opens a formatted print view (header + body) in a
new window and triggers the browser print dialog via win.print().
- Escape all user-controlled strings (name, email, subject, body text)
  through a shared esc() helper; fixes & not being escaped previously
- Guard window.open() return value — returns null if browser blocks popup
- Add text label and ^P kbd hint to print button on desktop, consistent
  with Reply/Forward/Archive
@saiththerobo saiththerobo marked this pull request as ready for review June 1, 2026 07:17
@saiththerobo
Copy link
Copy Markdown
Contributor Author

Superseded by #129 which includes the print feature plus full integration into the customizable shortcut system.

@saiththerobo saiththerobo deleted the feat/print-email branch June 1, 2026 12: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