Polish optional notification email layout and unsubscribe footer #365

Open
opened 2026-06-05 13:41:27 -05:00 by Codex · 0 comments
Member

The optional notification emails sent by FriendAddedYou, MentionedInBlogEntry, and MentionedInBlogEntryComment currently use Laravel's default notification mail layout. The test emails confirm delivery works, but the rendered emails feel plain and place the unsubscribe URL prominently in the message body.

This issue tracks polishing the shared notification email presentation without changing which notification events are sent. Event coverage for additional notification settings remains tracked separately in #361.

Scope

  • Customize the Laravel notification mail layout used by optional notification emails.
  • Show the existing gamepad-padded@2x.png image above the MyVideoGameList header text.
  • Move the default "If you're having trouble clicking..." subcopy directly underneath the primary action button area.
  • Move optional notification unsubscribe copy into the email footer.
  • Replace the raw unsubscribe URL in the body with linked footer text.
  • Preserve plain-text email output.
  • Keep password reset, email verification, and other required account/security emails safe and readable.

Acceptance Criteria

  • Optional notification emails render the gamepad image above the MyVideoGameList header text.
  • The gamepad image uses the existing app asset at public/images/gamepad-padded@2x.png or an equivalent public URL derived from that asset.
  • The primary message body no longer shows the raw unsubscribe-all URL.
  • Footer copy includes unsubscribe here as linked text using the per-user unauthenticated unsubscribe-all URL.
  • Footer copy also includes a small separator and Unsubscribe from all notifications, linked to the same unsubscribe-all URL unless a more specific all-notifications URL exists by implementation time.
  • The "If you're having trouble clicking the ..." fallback URL appears visually beneath the primary action button/subcopy area, not above the closing/signature area.
  • The three currently-sent optional notification emails continue to include working action buttons and unsubscribe links.
  • Required account/security emails remain readable and are not broken by the shared template changes.
  • The email still has a usable plain-text representation with action and unsubscribe URLs visible.

Test Coverage Required

  • Add focused tests rendering the three optional notification emails and asserting:
    • the gamepad image is present in the HTML output,
    • the raw unsubscribe URL is not in the main intro lines,
    • the footer contains linked unsubscribe copy,
    • the action button and fallback URL are still present,
    • the text output includes action and unsubscribe URLs.
  • Add or update regression coverage for password reset and email verification rendering if shared mail components are customized.
  • Run focused notification mail rendering tests and existing unsubscribe/security-mail tests.
  • Run vendor/bin/pint --dirty --format agent before closeout.

Progress Checklist

  • Audit Laravel notification mail rendering and current published mail component state
  • Publish/customize Laravel mail components if needed
  • Add gamepad image above the mail header text
  • Move button fallback URL copy beneath the action button area
  • Move optional notification unsubscribe copy into the footer
  • Keep plain-text notification emails readable
  • Add focused HTML/text rendering tests for current optional notifications
  • Confirm required account/security mail rendering still works

Implementation References

  • Laravel Markdown mail component customization uses php artisan vendor:publish --tag=laravel-mail and publishes views under resources/views/vendor/mail.
  • Laravel docs: Markdown mailables, customizing components.
The optional notification emails sent by `FriendAddedYou`, `MentionedInBlogEntry`, and `MentionedInBlogEntryComment` currently use Laravel's default notification mail layout. The test emails confirm delivery works, but the rendered emails feel plain and place the unsubscribe URL prominently in the message body. This issue tracks polishing the shared notification email presentation without changing which notification events are sent. Event coverage for additional notification settings remains tracked separately in #361. ## Scope - Customize the Laravel notification mail layout used by optional notification emails. - Show the existing `gamepad-padded@2x.png` image above the `MyVideoGameList` header text. - Move the default "If you're having trouble clicking..." subcopy directly underneath the primary action button area. - Move optional notification unsubscribe copy into the email footer. - Replace the raw unsubscribe URL in the body with linked footer text. - Preserve plain-text email output. - Keep password reset, email verification, and other required account/security emails safe and readable. ## Acceptance Criteria - Optional notification emails render the gamepad image above the `MyVideoGameList` header text. - The gamepad image uses the existing app asset at `public/images/gamepad-padded@2x.png` or an equivalent public URL derived from that asset. - The primary message body no longer shows the raw unsubscribe-all URL. - Footer copy includes `unsubscribe here` as linked text using the per-user unauthenticated unsubscribe-all URL. - Footer copy also includes a small separator and `Unsubscribe from all notifications`, linked to the same unsubscribe-all URL unless a more specific all-notifications URL exists by implementation time. - The "If you're having trouble clicking the ..." fallback URL appears visually beneath the primary action button/subcopy area, not above the closing/signature area. - The three currently-sent optional notification emails continue to include working action buttons and unsubscribe links. - Required account/security emails remain readable and are not broken by the shared template changes. - The email still has a usable plain-text representation with action and unsubscribe URLs visible. ## Test Coverage Required - Add focused tests rendering the three optional notification emails and asserting: - the gamepad image is present in the HTML output, - the raw unsubscribe URL is not in the main intro lines, - the footer contains linked unsubscribe copy, - the action button and fallback URL are still present, - the text output includes action and unsubscribe URLs. - Add or update regression coverage for password reset and email verification rendering if shared mail components are customized. - Run focused notification mail rendering tests and existing unsubscribe/security-mail tests. - Run `vendor/bin/pint --dirty --format agent` before closeout. ## Progress Checklist - [ ] Audit Laravel notification mail rendering and current published mail component state - [ ] Publish/customize Laravel mail components if needed - [ ] Add gamepad image above the mail header text - [ ] Move button fallback URL copy beneath the action button area - [ ] Move optional notification unsubscribe copy into the footer - [ ] Keep plain-text notification emails readable - [ ] Add focused HTML/text rendering tests for current optional notifications - [ ] Confirm required account/security mail rendering still works ## Implementation References - Laravel Markdown mail component customization uses `php artisan vendor:publish --tag=laravel-mail` and publishes views under `resources/views/vendor/mail`. - Laravel docs: [Markdown mailables](https://laravel.com/docs/13.x/mail#markdown-mailables), [customizing components](https://laravel.com/docs/13.x/mail#customizing-the-components).
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
MyVideoGameList/myvideogamelist.com#365
No description provided.