Skip to content

Feature: Add avatar color and initials generator #177#1291

Open
wolfyres wants to merge 3 commits into
Stellar-Mail:mainfrom
wolfyres:feature/avatar-generator
Open

Feature: Add avatar color and initials generator #177#1291
wolfyres wants to merge 3 commits into
Stellar-Mail:mainfrom
wolfyres:feature/avatar-generator

Conversation

@wolfyres

@wolfyres wolfyres commented Jun 28, 2026

Copy link
Copy Markdown

Closes #177

🎯 Context

This PR introduces utilities to generate consistent sender avatar colors and initials for demo personas. To ensure zero risk to the core product, these utilities and their preview components have been strictly isolated to the demo admin tooling, bypassing all production app-shell and UI components.

🛠️ Key Changes

Implemented getAvatarColor as a deterministic seed helper to hash a string (like a sender name) into a consistent hex color from a predefined palette.

Built the AvatarPreview component to allow dashboard maintainers to easily visualize and verify the generated avatars for fake personas.

Added a robust local test suite (avatar-helpers.test.ts) to guarantee the color hashing and initial extraction remain completely deterministic.

Confirmed all files are scoped exclusively to src/features/demo-admin-dashboard/.

wolfyres added 3 commits June 28, 2026 19:03
Added utility functions to extract initials and generate avatar colors.
Adds AvatarPreview component for visualizing user avatars with initials and colors.
Added unit tests for avatar helper functions including getInitials and getAvatarColor.
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.

Add avatar color and initials generator

1 participant