feat: Gravatar Support (OP#804, v0.3.1) #15

Merged
Mike Bros merged 5 commits from feature/804-gravatar-support into release/v0.3.1 2026-02-17 20:36:02 +00:00
Contributor

Summary

  • OP#820: Implemented gravatar URL generation from email hash (internal/gravatar package)
  • OP#821: Added admin toggle to enable/disable gravatar globally (migration + settings UI)
  • OP#822: Integrated avatar rendering in header dropdown (28px), profile page (128px), and impersonate list (32px)
  • OP#823: Unit tests for URL generation, email normalization, and template render fallbacks

Verification

  • Enable gravatar in Admin > Settings > Avatars and verify avatar appears in user dropdown
  • Visit /user/{username} profile page and confirm large avatar renders
  • Visit /admin/impersonate and confirm user list shows avatars
  • Disable gravatar toggle and verify all surfaces fall back to initials/icons
  • Test with a user that has no email — should show initials fallback
## Summary - OP#820: Implemented gravatar URL generation from email hash (`internal/gravatar` package) - OP#821: Added admin toggle to enable/disable gravatar globally (migration + settings UI) - OP#822: Integrated avatar rendering in header dropdown (28px), profile page (128px), and impersonate list (32px) - OP#823: Unit tests for URL generation, email normalization, and template render fallbacks ## Verification - [x] Enable gravatar in Admin > Settings > Avatars and verify avatar appears in user dropdown - [x] Visit /user/{username} profile page and confirm large avatar renders - [x] Visit /admin/impersonate and confirm user list shows avatars - [x] Disable gravatar toggle and verify all surfaces fall back to initials/icons - [x] Test with a user that has no email — should show initials fallback ## Links - Epic: [OP#804](https://project.bros.ninja/work_packages/804)
Implements GravatarURL helper that generates gravatar.com URLs from
user email addresses using MD5 hashing with identicon fallback.

Closes OP#820

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Adds gravatar_enabled boolean to app_settings (migration 00010),
wires it through LoadSettings/UpdateSettings, and adds a checkbox
in the admin General settings panel.

Closes OP#821

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Integrates gravatar rendering across all user-facing UI surfaces:
- Header user dropdown (28px)
- Public user profile page (128px)
- Admin impersonate user list (32px)

Each location falls back to initials/icons when gravatar is disabled
or user has no email.

Closes OP#822

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
test(gravatar): add unit tests for gravatar support
All checks were successful
CI / security (pull_request) Successful in 1m5s
CI / build (pull_request) Successful in 2m2s
CI / test (pull_request) Successful in 2m17s
CI / lint (pull_request) Successful in 2m47s
bb883bec9d
Tests cover:
- URL generation with correct MD5 hash
- Email normalization (case, whitespace)
- Empty/whitespace email returns empty string
- Size parameter variations
- Header template renders gravatar img vs initial fallback
- Profile template renders gravatar img vs initial fallback

Closes OP#823

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
feat(header): persist navigation header across all pages
All checks were successful
CI / test (pull_request) Successful in 1m20s
CI / security (pull_request) Successful in 1m44s
CI / build (pull_request) Successful in 1m47s
CI / lint (pull_request) Successful in 2m33s
7efe4715c7
Extract buildHeaderData helper and render the shared Header component
on admin, settings, and profile pages. Dashboard-specific elements
(search, dashboard switcher, edit toggle) are conditionally hidden on
non-dashboard pages via the IsDashboardPage flag.

Refs OP#804

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Mike Bros approved these changes 2026-02-17 20:35:55 +00:00
Mike Bros merged commit b679333573 into release/v0.3.1 2026-02-17 20:36:02 +00:00
Mike Bros deleted branch feature/804-gravatar-support 2026-02-17 20:36:02 +00:00
Sign in to join this conversation.
No reviewers
No labels
No milestone
No project
No assignees
2 participants
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
mike/gashy!15
No description provided.